Wed 28 Jul 2010
Zabbix simple check icmpping quick fix
Enviado al blog por el pinche cash segun el bajo la categoria Linux
Un pinche chisme nomas (aporta el tuyo)
Configuring Zabbix on a Fedora system, the icmp probes always get a “down” response, the reason is simple, Zabbix uses “fping” command to test the service and sends the “-S” parameter to the fping binary to specify the source ip of the probe, BUT on fedora the fping command doesn’t recognize the -S
# FPING VERSION [root@Zeus2 sbin]# rpm -qa | grep fping fping-2.4b2-9.fc11.x86_64 # FEDORA VERSION [root@Zeus2 sbin]# cat /etc/redhat-release Fedora release 11 (Leonidas) # FPING OUTPUT [root@Zeus2 sbin]# fping -q -C5 -p300 -b128 -t100 192.168.3.170 -S1.1.1.1 fping: invalid option -- 'S'
Ubuntu accepts -S
cash@sistemacasero:~$ fping -S fping: option requires an argument -- 'S'
So, I created a little perl wrapper to strip the parameter on fping command and send the rest of the parameters, you have to rename the original fping command to fping.dist and name this script fping on /usr/sbin directory.
#!/usr/bin/perl
#open (DEBUG, '>/tmp/logfile.fping');
my @params;
foreach (@ARGV) {
#print DEBUG $_."\n";
if ($_ =~ /\-S/) {
#print DEBUG "doh!\n";
} else {
push(@params,$_);
}
}
my $strippedprm = join(" ", @params);
#print DEBUG $strippedprm;
my $CMD=system("fping.dist $strippedprm");
#close(DEBUG);
Now yo get a response from Fping command on Fedora, obviously fping will not use the SOURCE INTERFACE paramenter defined in zabbix server configuration on icmp probes, but it works fine, and you get the icmp status from zabbix remote hosts.
[root@Zeus2 sbin]# fping -q -C5 -p300 -b128 -t100 192.168.3.170 -S1.1.1.1 192.168.3.170 : 0.18 0.29 0.22 0.27 0.23
Incoherencias parecidas y calificaciones a este post:


July 29th, 2010 at 8:14 pm
Mr. Cash le tengo una consulta, alguno de sus Famosos conocidos del mundo de la farandula sabra como montar una disribucion de linux en una Flash card con los respectivos drivers para arrancar un GATEWAY CONNECTED TOUCHPAD? Se los agradeceria tanto que doblaria mi diezmo a la congregacion…
Saludos y que viva Thalia…