You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the spool file way of handling performance data works like this:
- check result comes in
- perf data gets extracted
- write perf data into spool file
- close spool file
- call spool file handler
- open spool file again
so during the runtime of the spool handler the spool file is closed for good reasons. But the check result handler
simply skips adding performance data when the spool file is closed which basically means during about a second
we loose all performance data.
So instead of checking the spool file, we better check the buffer queue which is used to buffer the
performance data already.
Signed-off-by: Sven Nierlein <sven@consol.de>
nm_log(NSLOG_RUNTIME_WARNING, "Warning: host perfdata file %s could not be opened - host performance data will not be processed!\n", host_perfdata_file);
nm_log(NSLOG_RUNTIME_WARNING, "Warning: service perfdata file %s could not be opened - service performance data will not be processed!\n", service_perfdata_file);
104
+
service_perfdata_bq=nm_bufferqueue_create();
105
+
}
99
106
100
107
/* verify that performance data commands are valid */
101
108
if (host_perfdata_command!=NULL) {
@@ -426,6 +433,8 @@ static int xpddefault_open_perfdata_file(char *perfdata_file, int is_pipe, int a
426
433
/* flush the perfdata stored in `bq` to the file referred to by `fd`, named by `filename`. Returns -1 on error, 0 on success. */
0 commit comments