summaryrefslogtreecommitdiffstats
path: root/web/api/health
diff options
context:
space:
mode:
authorEmmanuel Vasilakis <mrzammler@mm.st>2023-10-06 00:57:53 +0300
committerGitHub <noreply@github.com>2023-10-06 00:57:53 +0300
commit9493fa868256c66478e5191658db5daa24e74336 (patch)
tree12ed429777c0f54f836493cb90f4774dcd9e8718 /web/api/health
parentc317e4d380413109708a8b86b93e16514f8148bc (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 'web/api/health')
-rw-r--r--web/api/health/README.md9
-rw-r--r--web/api/health/health_cmdapi.c8
2 files changed, 4 insertions, 13 deletions
diff --git a/web/api/health/README.md b/web/api/health/README.md
index 4fd11a0e04..90ad6455ad 100644
--- a/web/api/health/README.md
+++ b/web/api/health/README.md
@@ -61,7 +61,7 @@ Specifically, the API allows you to:
- Disable health checks completely. Alert conditions will not be evaluated at all and no entries will be added to the alert log.
- Silence alert notifications. Alert conditions will be evaluated, the alerts will appear in the log and the Netdata UI will show the alerts as active, but no notifications will be sent.
-- Disable or Silence specific alerts that match selectors on alert/template name, chart, context, host and family.
+- Disable or Silence specific alerts that match selectors on alert/template name, chart, context, and host.
The API is available by default, but it is protected by an `api authorization token` that is stored in the file you will see in the following entry of `http://NODE:19999/netdata.conf`:
@@ -138,7 +138,6 @@ The accepted keys for the `selection criteria` are the following:
- `chart` : Chart ids/names, as shown on the dashboard. These will match the `on` entry of a configured `alarm`.
- `context` : Chart context, as shown on the dashboard. These will match the `on` entry of a configured `template`.
- `hosts` : The hostnames that will need to match.
-- `families` : The alert families.
You can add any of the selection criteria you need on the request, to ensure that only the alerts you are interested in are matched and disabled/silenced. e.g. there is no reason to add `hosts: *`, if you want the criteria to be applied to alerts for all hosts.
@@ -154,12 +153,6 @@ Example 2: Silence all alerts and templates with name starting with `out_of` on
http://NODE:19999/api/v1/manage/health?cmd=SILENCE&alarm=out_of*&hosts=myhost
```
-Example 2.2: Add one more selector, to also silence alerts for cpu1 and cpu2
-
-```
-http://NODE:19999/api/v1/manage/health?families=cpu1 cpu2
-```
-
### List silencers
The command `LIST` was added in Netdata v1.16.0 and returns a JSON with the current status of the silencers.
diff --git a/web/api/health/health_cmdapi.c b/web/api/health/health_cmdapi.c
index e8d6845e38..27d0626538 100644
--- a/web/api/health/health_cmdapi.c
+++ b/web/api/health/health_cmdapi.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
//
// Created by Christopher on 11/12/18.
//
@@ -14,18 +15,16 @@
void free_silencers(SILENCER *t) {
if (!t) return;
if (t->next) free_silencers(t->next);
- netdata_log_debug(D_HEALTH, "HEALTH command API: Freeing silencer %s:%s:%s:%s:%s", t->alarms,
- t->charts, t->contexts, t->hosts, t->families);
+ netdata_log_debug(D_HEALTH, "HEALTH command API: Freeing silencer %s:%s:%s:%s", t->alarms,
+ t->charts, t->contexts, t->hosts);
simple_pattern_free(t->alarms_pattern);
simple_pattern_free(t->charts_pattern);
simple_pattern_free(t->contexts_pattern);
simple_pattern_free(t->hosts_pattern);
- simple_pattern_free(t->families_pattern);
freez(t->alarms);
freez(t->charts);
freez(t->contexts);
freez(t->hosts);
- freez(t->families);
freez(t);
return;
}
@@ -74,7 +73,6 @@ void health_silencers2json(BUFFER *wb) {
j=health_silencers2json_entry(wb, HEALTH_CHART_KEY, silencer->charts, j);
j=health_silencers2json_entry(wb, HEALTH_CONTEXT_KEY, silencer->contexts, j);
j=health_silencers2json_entry(wb, HEALTH_HOST_KEY, silencer->hosts, j);
- health_silencers2json_entry(wb, HEALTH_FAMILIES_KEY, silencer->families, j);
j=0;
buffer_strcat(wb, "\n\t\t}");
i++;