invalid perfdata from check_icmp (patch)

Wolfgang wnd at gmx.net
Sun May 11 12:49:52 CEST 2008


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 SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone




More information about the Developers mailing list