[Nagios-devel] invalid perfdata from check_icmp (patch)
Posted: Sun May 11, 2008 2:49 am
Somebody on the german nagios forum used a symbolic link (check_host) to check_icmp. In hostcheck mode the perfdata output of check_icmp is somewhat incomplete as no valid warning value is returned which leads to an error if using functions to process the values.
The following patch (for 1.4.11) should resolve the problem:
--- check_icmp.c.orig 2007-12-11 06:57:35.000000000 +0100
+++ check_icmp.c 2008-05-11 12:39:53.000000000 +0200
@@ -778,7 +778,7 @@
/* if we're in hostcheck mode, exit with limited printouts */
if(mode == MODE_HOSTCHECK) {
printf("OK - %s responds to ICMP. Packet %u, rta %0.3fms|"
- "pkt=%u;;0;%u rta=%0.3f;%0.3f;%0.3f;;\n",
+ "pkt=%u;0;0;%u rta=%0.3f;%0.3f;%0.3f;;\n",
host->name, icmp_recv, (float)tdiff / 1000,
icmp_recv, packets, (float)tdiff / 1000,
(float)warn.rta / 1000, (float)crit.rta / 1000);
Wolfgang
--
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
The following patch (for 1.4.11) should resolve the problem:
--- check_icmp.c.orig 2007-12-11 06:57:35.000000000 +0100
+++ check_icmp.c 2008-05-11 12:39:53.000000000 +0200
@@ -778,7 +778,7 @@
/* if we're in hostcheck mode, exit with limited printouts */
if(mode == MODE_HOSTCHECK) {
printf("OK - %s responds to ICMP. Packet %u, rta %0.3fms|"
- "pkt=%u;;0;%u rta=%0.3f;%0.3f;%0.3f;;\n",
+ "pkt=%u;0;0;%u rta=%0.3f;%0.3f;%0.3f;;\n",
host->name, icmp_recv, (float)tdiff / 1000,
icmp_recv, packets, (float)tdiff / 1000,
(float)warn.rta / 1000, (float)crit.rta / 1000);
Wolfgang
--
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]