Pandora FMS Community

module_tcpcheck on linux agents?

opike · 20 dic 2010, 20:38 · 5 mensajes · 48 visitas

  1. Inicio del debate

    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?

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

  3. Can you share this script?

  4. #!/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;
    
  5. Hi opike, This module is only available for windows agents, don't works for Linux agents. Thanks for the script. Cheers.

Entra en tu cuenta para publicar.