[Nagiosplug-help] iputils release ss020124 and check_ping
Freddy Frouin
freddy.frouin at fluxus.net
Fri Nov 15 04:55:18 CET 2002
Hi all,
Does someone have successfuly hack the check_ping.c source to
make it work with the ping version of package provided with
iputils release ss020124 ? The differences are in the return
syntax of the ping binary.
I notice 2 changes that impact configure.in for plugins and
netsaint/nagios engine and check_ping.c:
Old iputils version (ss001110)
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/mdev = 0.692/0.911/1.469/0.285 ms
New one
5 packets transmitted, 5 received, 0% loss, time 3998ms
rtt min/avg/max/mdev = 0.202/0.233/0.264/0.027 ms
I modified the configure.in successfuly, preventing it to
block when checking ping syntax, yet I did not get success
with check_ping.c, even if I modified the following lines
to allow good sscanf extraction:
sscanf (input_buffer, "%*d packets transmitted, %*d received, %d%% loss", &pl) == 1
instead of
sscanf (input_buffer, "%*d packets transmitted, %*d packets received, %d%% packet loss", &pl) == 1
AND
sscanf (input_buffer, "rtt min/avg/max/mdev = %*f/%f/%*f/%*f", &rta) == 1
instead of
sscanf (input_buffer, "round-trip min/avg/max/mdev = %*f/%f/%*f/%*f", &rta) == 1
Does someone understand why it does not work with this modifications ?
Regards, Freddy.
--
Freddy Frouin
Responsable Supervision
Fluxus - British Telecom
30, rue du Château des Rentiers
75013 Paris
Tél: +33 (0)1 44 97 70 00
Fax: +33 (0)1 44 97 70 07
More information about the Help
mailing list