summaryrefslogtreecommitdiffstats
path: root/libnetdata/health/health.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-17 09:30:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-17 09:30:23 +0000
commit517a443636daa1e8085cb4e5325524a54e8a8fd7 (patch)
tree5352109cc7cd5122274ab0cfc1f887b685f04edf /libnetdata/health/health.c
parentReleasing debian version 1.42.4-1. (diff)
downloadnetdata-517a443636daa1e8085cb4e5325524a54e8a8fd7.tar.xz
netdata-517a443636daa1e8085cb4e5325524a54e8a8fd7.zip
Merging upstream version 1.43.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/health/health.c')
-rw-r--r--libnetdata/health/health.c18
1 files changed, 7 insertions, 11 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
+}