diff options
author | Emmanuel Vasilakis <mrzammler@mm.st> | 2023-10-06 00:57:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-06 00:57:53 +0300 |
commit | 9493fa868256c66478e5191658db5daa24e74336 (patch) | |
tree | 12ed429777c0f54f836493cb90f4774dcd9e8718 /libnetdata | |
parent | c317e4d380413109708a8b86b93e16514f8148bc (diff) |
Remove family from alerts (#16025)
* remove loading and storing families from alert configs
* remove families from silencers
* remove from alarm log
* start remove from alarm-notify.sh.in
* fix test alarm
* rebase
* remove from api/v1/alarm_log
* remove from alert stream
* remove from config stream
* remove from more
* remove from swagger for health api
* revert md changes
* remove from health cmd api test
Diffstat (limited to 'libnetdata')
-rw-r--r-- | libnetdata/health/health.c | 16 | ||||
-rw-r--r-- | libnetdata/health/health.h | 4 |
2 files changed, 5 insertions, 15 deletions
diff --git a/libnetdata/health/health.c b/libnetdata/health/health.c index fd0ff6c680..f2dc46e3de 100644 --- a/libnetdata/health/health.c +++ b/libnetdata/health/health.c @@ -29,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 ); } @@ -51,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); @@ -60,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); @@ -70,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) { @@ -93,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; @@ -172,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 67822b0747..31173fe613 100644 --- a/libnetdata/health/health.h +++ b/libnetdata/health/health.h @@ -11,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" @@ -28,9 +27,6 @@ typedef struct silencer { char *charts; SIMPLE_PATTERN *charts_pattern; - char *families; - SIMPLE_PATTERN *families_pattern; - struct silencer *next; } SILENCER; |