[Nagiosplug-devel] performance data patch for check_ping.c
Thomas Guyot-Sionnest
thomas at zango.com
Wed Apr 23 17:05:08 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Christian Schneemann wrote:
| Hi,
Hi Christian,
| it is not realy a patch, it is just one added line, but maybe it is
helpfull.
|
| I've just added a line to print the perfdata, I've tested it with Nagios
| 3.0.1.
|
| --- plugins/check_ping.c
| +++ plugins/check_ping.c
| @@ -165,6 +165,7 @@
| state_text (this_result), warn_text, pl, rta);
| if (display_html == TRUE)
| printf ("</A>");
| + printf("|rta=%2.2f;%f;%f;; pl=%d%%;%d%%;%d%%;;", rta,
wrta,
| crta, pl, wpl, cpl);
| printf ("\n");
|
| if (verbose >= 2)
Thanks for summiting a patch. Unfortunately I can't accept it as it's
not using the perfdata functions provided y nagios plugins. This sure
could be useful and I'll put it in my todo list. Alternatively you can
repost your patch using the proper function (look at other plugins for
examples).
It should be noted that check_icmp already provides performance data and
should be preferred over check_ping wherever possible (it requires root
privileges so it has to be owned by root and needs the suid permission
bit set - might also have issues regarding ping intervals and sequence
numbers). check_icmp has a native ICMP implementation and therefore does
not rely on the ping command (and does not fork anything either).
Thanks,
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFID1Ak6dZ+Kt5BchYRAlatAKDbWMrNAUFAiqlNRmDSUgeiYALn2QCfbt3M
FUtyNpsC2YATNWrjBS95B3Q=
=EYh2
-----END PGP SIGNATURE-----
More information about the Devel
mailing list