summaryrefslogtreecommitdiffstats
path: root/libnetdata/health
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-17 09:30:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-17 09:30:20 +0000
commit386ccdd61e8256c8b21ee27ee2fc12438fc5ca98 (patch)
treec9fbcacdb01f029f46133a5ba7ecd610c2bcb041 /libnetdata/health
parentAdding upstream version 1.42.4. (diff)
downloadnetdata-386ccdd61e8256c8b21ee27ee2fc12438fc5ca98.tar.xz
netdata-386ccdd61e8256c8b21ee27ee2fc12438fc5ca98.zip
Adding upstream version 1.43.0.upstream/1.43.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/health')
-rw-r--r--libnetdata/health/health.c18
-rw-r--r--libnetdata/health/health.h6
2 files changed, 9 insertions, 15 deletions
diff --git a/libnetdata/health/health.c b/libnetdata/health/health.c
index 53ebecb42..f2dc46e3d 100644
--- a/libnetdata/health/health.c
+++ b/libnetdata/health/health.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
#include "health.h"
SILENCERS *silencers;
@@ -27,8 +29,8 @@ void health_silencers_add(SILENCER *silencer) {
// Add the created instance to the linked list in silencers
silencer->next = silencers->silencers;
silencers->silencers = silencer;
- netdata_log_debug(D_HEALTH, "HEALTH command API: Added silencer %s:%s:%s:%s:%s", silencer->alarms,
- silencer->charts, silencer->contexts, silencer->hosts, silencer->families
+ netdata_log_debug(D_HEALTH, "HEALTH command API: Added silencer %s:%s:%s:%s", silencer->alarms,
+ silencer->charts, silencer->contexts, silencer->hosts
);
}
@@ -49,8 +51,7 @@ SILENCER *health_silencers_addparam(SILENCER *silencer, char *key, char *value)
hash_template = 0,
hash_chart = 0,
hash_context = 0,
- hash_host = 0,
- hash_families = 0;
+ hash_host = 0;
if (unlikely(!hash_alarm)) {
hash_alarm = simple_uhash(HEALTH_ALARM_KEY);
@@ -58,7 +59,6 @@ SILENCER *health_silencers_addparam(SILENCER *silencer, char *key, char *value)
hash_chart = simple_uhash(HEALTH_CHART_KEY);
hash_context = simple_uhash(HEALTH_CONTEXT_KEY);
hash_host = simple_uhash(HEALTH_HOST_KEY);
- hash_families = simple_uhash(HEALTH_FAMILIES_KEY);
}
uint32_t hash = simple_uhash(key);
@@ -68,8 +68,7 @@ SILENCER *health_silencers_addparam(SILENCER *silencer, char *key, char *value)
(hash == hash_template && !strcasecmp(key, HEALTH_TEMPLATE_KEY)) ||
(hash == hash_chart && !strcasecmp(key, HEALTH_CHART_KEY)) ||
(hash == hash_context && !strcasecmp(key, HEALTH_CONTEXT_KEY)) ||
- (hash == hash_host && !strcasecmp(key, HEALTH_HOST_KEY)) ||
- (hash == hash_families && !strcasecmp(key, HEALTH_FAMILIES_KEY))
+ (hash == hash_host && !strcasecmp(key, HEALTH_HOST_KEY))
) {
silencer = create_silencer();
if(!silencer) {
@@ -91,9 +90,6 @@ SILENCER *health_silencers_addparam(SILENCER *silencer, char *key, char *value)
} else if (hash == hash_host && !strcasecmp(key, HEALTH_HOST_KEY)) {
silencer->hosts = strdupz(value);
silencer->hosts_pattern = simple_pattern_create(silencer->hosts, NULL, SIMPLE_PATTERN_EXACT, true);
- } else if (hash == hash_families && !strcasecmp(key, HEALTH_FAMILIES_KEY)) {
- silencer->families = strdupz(value);
- silencer->families_pattern = simple_pattern_create(silencer->families, NULL, SIMPLE_PATTERN_EXACT, true);
}
return silencer;
@@ -170,4 +166,4 @@ int health_initialize_global_silencers() {
silencers->silencers=NULL;
return 0;
-} \ No newline at end of file
+}
diff --git a/libnetdata/health/health.h b/libnetdata/health/health.h
index 6b8f9b384..31173fe61 100644
--- a/libnetdata/health/health.h
+++ b/libnetdata/health/health.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
#ifndef NETDATA_HEALTH_LIB
# define NETDATA_HEALTH_LIB 1
@@ -9,7 +11,6 @@
#define HEALTH_CHART_KEY "chart"
#define HEALTH_HOST_KEY "hosts"
#define HEALTH_OS_KEY "os"
-#define HEALTH_FAMILIES_KEY "families"
#define HEALTH_LOOKUP_KEY "lookup"
#define HEALTH_CALC_KEY "calc"
@@ -26,9 +27,6 @@ typedef struct silencer {
char *charts;
SIMPLE_PATTERN *charts_pattern;
- char *families;
- SIMPLE_PATTERN *families_pattern;
-
struct silencer *next;
} SILENCER;