diff options
author | thiagoftsm <49162938+thiagoftsm@users.noreply.github.com> | 2019-06-27 08:16:28 -0300 |
---|---|---|
committer | Paul Emm. Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com> | 2019-06-27 13:16:28 +0200 |
commit | 60a73e90de2aa1c2eaae2ebbc45dd1fb96034df2 (patch) | |
tree | 3729a7e43a2a9e6395fc85f2a2cd74b833e414a8 /health/health.h | |
parent | 6fc971fe4d070d7c3e666ee24fb0c43d43084c85 (diff) |
Easily disable alarms, by persisting the silencers configuration (#6274)
* Alarms begin!
* Alarms web interface comments!
* Alarms web interface comments 2!
* Alarms bringing Christopher work!
* Alarms bringing Christopher work!
* Alarms commenting code that will be rewritten!
* Alarms json-c begin!
* Alarms json-c end!
* Alarms missed script!
* Alarms fix json-c parser and change script to test LIST!
* Alarms fix test script!
* Alarms documentation!
* Alarms script step 1!
* Alarms fix script!
* Alarms fix testing script and code!
* Alarms missing arguments to pkg_check_modules
* SSL_backend indentation!
* Alarms, description in Makefile
* Alarms missing extern!
* Alarms compilation!
* Alarms libnetdata/health!
* Alarms fill library!
* Alarms fill CMakeList!
* Alarm fix version!
* Alarm remove readme!
* Alarm fix readme version!
Diffstat (limited to 'health/health.h')
-rw-r--r-- | health/health.h | 44 |
1 files changed, 4 insertions, 40 deletions
diff --git a/health/health.h b/health/health.h index 1511f36486..acbcf827c2 100644 --- a/health/health.h +++ b/health/health.h @@ -35,16 +35,9 @@ extern unsigned int default_health_enabled; #define HEALTH_LISTEN_BACKLOG 4096 #endif -#define HEALTH_ALARM_KEY "alarm" -#define HEALTH_TEMPLATE_KEY "template" + #define HEALTH_ON_KEY "on" -#define HEALTH_CONTEXT_KEY "context" -#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" + #define HEALTH_EVERY_KEY "every" #define HEALTH_GREEN_KEY "green" #define HEALTH_RED_KEY "red" @@ -57,38 +50,9 @@ extern unsigned int default_health_enabled; #define HEALTH_DELAY_KEY "delay" #define HEALTH_OPTIONS_KEY "options" -typedef struct silencer { - char *alarms; - SIMPLE_PATTERN *alarms_pattern; - - char *hosts; - SIMPLE_PATTERN *hosts_pattern; - - char *contexts; - SIMPLE_PATTERN *contexts_pattern; - - char *charts; - SIMPLE_PATTERN *charts_pattern; - - char *families; - SIMPLE_PATTERN *families_pattern; - - struct silencer *next; -} SILENCER; - -typedef enum silence_type { - STYPE_NONE, - STYPE_DISABLE_ALARMS, - STYPE_SILENCE_NOTIFICATIONS -} SILENCE_TYPE; - -typedef struct silencers { - int all_alarms; - SILENCE_TYPE stype; - SILENCER *silencers; -} SILENCERS; +#define HEALTH_SILENCERS_MAX_FILE_LEN 10000 -SILENCERS *silencers; +char *silencers_filename; extern void health_init(void); extern void *health_main(void *ptr); |