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;
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]