Nagios 3.0a5 bug - check_result_path

La Vertu, Scott SLaVertu at pta.wa.gov.au
Wed Jul 4 09:35:32 CEST 2007


Hello,

After trying to run multiple instances of Nagios on the same machine I
noticed that the check_result_path entry in the nagios.cfg file is
ignored.

I had to patch config.c with the following code to fix this (diff is
against the latest CVS copy):

--- oldconfig.c 2007-07-04 14:04:26.000000000 +0800
+++ config.c    2007-06-29 15:59:12.000000000 +0800
@@ -441,6 +441,9 @@
                                if(temp_path[strlen(temp_path)-1]=='/')
 
temp_path[strlen(temp_path)-1]='\x0';
                                }
+
+                       my_free((void **)&check_result_path);
+                        check_result_path=(char *)strdup(temp_path);
                        }

                else if(!strcmp(variable,"max_check_result_file_age"))


Cheers,
Scott La Vertu                slavertu at pta.wa.gov.au
Network Architect             Phone: +61 8 9326 2495
Public Transport Authority    Fax: +61 8 9326 2676
Perth, Western Australia      Mobile: 0417 174 659



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/




More information about the Developers mailing list