From 1a64deeb894dc95e2645a75771732c6cc53a79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 4 Oct 2023 01:35:06 +0200 Subject: Squash changes containing private information There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository --- pkgs/status_engine/host_perfdata.patch | 47 ---------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 pkgs/status_engine/host_perfdata.patch (limited to 'pkgs/status_engine/host_perfdata.patch') diff --git a/pkgs/status_engine/host_perfdata.patch b/pkgs/status_engine/host_perfdata.patch deleted file mode 100644 index 0c8a20b..0000000 --- a/pkgs/status_engine/host_perfdata.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/src/statusengine.c b/src/statusengine.c -index cc0b06e..2a18dec 100644 ---- a/src/statusengine.c -+++ b/src/statusengine.c -@@ -304,6 +304,7 @@ int enable_ocsp = 0; - - int use_restart_data=1; - int use_service_perfdata=0; -+int use_host_perfdata=0; - - int statusengine_process_config_var(char *arg); - int statusengine_process_module_args(char *args); -@@ -612,6 +613,9 @@ int statusengine_process_config_var(char *arg) { - } else if (!strcmp(var, "use_service_perfdata")) { - use_service_perfdata = atoi(val); - logswitch(NSLOG_INFO_MESSAGE, "start with enabled use_service_perfdata"); -+ } else if (!strcmp(var, "use_host_perfdata")) { -+ use_host_perfdata = atoi(val); -+ logswitch(NSLOG_INFO_MESSAGE, "start with enabled use_host_perfdata"); - } else { - return ERROR; - } -@@ -1067,6 +1071,24 @@ int statusengine_handle_data(int event_type, void *data){ - json_object_put(my_object); - free(raw_command); - -+ if(use_host_perfdata){ -+ my_object = json_object_new_object(); -+ json_object_object_add(my_object, "type", json_object_new_int(hostcheck->type)); -+ json_object_object_add(my_object, "flags", json_object_new_int(hostcheck->flags)); -+ json_object_object_add(my_object, "attr", json_object_new_int(hostcheck->attr)); -+ json_object_object_add(my_object, "timestamp", json_object_new_int(hostcheck->timestamp.tv_sec)); -+ -+ json_object *hostcheck_object = json_object_new_object(); -+ HOSTCHECKFIELD_STRING(host_name); -+ HOSTCHECKFIELD_STRING(perf_data); -+ json_object_object_add(hostcheck_object, "start_time", json_object_new_int64(nag_hostcheck->start_time.tv_sec)); -+ -+ json_object_object_add(my_object, "hostcheck", hostcheck_object); -+ const char* json_string = json_object_to_json_string(my_object); -+ statusengine_send_job("statusngin_host_perfdata", (void *)json_string); -+ -+ json_object_put(my_object); -+ } - } - break; - -- cgit v1.2.3