PATCH for host_perfdata_file_mode error (fwd)
frank
ratty at they.org
Thu Apr 7 22:49:06 CEST 2005
I kept finding my perf_data files being truncated. I asked about it on the
-users list and was told:
> Perfparse truncates it when it parses it. This is necessary in order for it
> to be able to keep up with the dataflow.
I scoured the code and found absolutely nothing to back up this claim.
What is ACTUALLY happening it that Nagios is incorrectly interpreting the
configuration parameters. This 'patch' (please, its only 2 characters)
makes it so a "w" really means write mode and anything else really means
append mode.
-Frank
diff -r -U 3 nagios/xdata/xpddefault.c nagios-fix/xdata/xpddefault.c
--- nagios/xdata/xpddefault.c 2004-12-05 19:40:03.000000000 -0800
+++ nagios-fix/xdata/xpddefault.c 2005-04-05 11:53:17.496949608 -0700
@@ -298,14 +298,14 @@
xpddefault_service_perfdata_file=strdup(value);
else if(!strcmp(variable,"host_perfdata_file_mode")){
- if(!strstr(value,"w"))
+ if(strstr(value,"w"))
xpddefault_host_perfdata_file_append=FALSE;
else
xpddefault_host_perfdata_file_append=TRUE;
}
else if(!strcmp(variable,"service_perfdata_file_mode")){
- if(!strstr(value,"w"))
+ if(strstr(value,"w"))
xpddefault_service_perfdata_file_append=FALSE;
else
xpddefault_service_perfdata_file_append=TRUE;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
More information about the Developers
mailing list