Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support module_tcpcheck on linux agents?

  • module_tcpcheck on linux agents?

    Posted by opike on December 20, 2010 at 20:38

    Windows agents can use module_tcpcheck and I tried using the same module with a linux agent but it doesn’t seem to be recognized. Just want to confirm if module_tcpcheck is available with linux agents and if not, what is the equivalent that people generally implement?

    luismi replied 14 years, 1 month ago 3 Members · 4 Replies
  • 4 Replies
  • opike

    Member
    December 27, 2010 at 19:47
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I ended up developing a perl script that writes a success/fail flag to stdout.

  • rsantaella

    Member
    January 25, 2011 at 20:32
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Can you share this script?

  • opike

    Member
    January 28, 2011 at 21:10
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::
    #!/usr/bin/perl
    
    $command="ping -c 1 ".$ARGV[0]." 1>out 2>error ";
    
    system($command);
    
    open(INFILE, "out") or die "Cannot open out: $!.n";
    
    $success=0;
    
    while(my $line = )
    {
    
            if ($line =~ m/1 received/)
            {
                    $success=1;
            }
    }
    print $success."n";
    
    close INFILE;
  • luismi

    Member
    January 31, 2011 at 15:39
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi opike,

    This module is only available for windows agents, don’t works for Linux agents.

    Thanks for the script.

    Cheers.