summaryrefslogtreecommitdiffstats
path: root/health
diff options
context:
space:
mode:
authorthiagoftsm <thiagoftsm@gmail.com>2021-02-11 12:45:05 +0000
committerGitHub <noreply@github.com>2021-02-11 12:45:05 +0000
commitfb2d4be0f2f54f541f797fe2d1ce958f81ab1120 (patch)
tree729f03435131767c1acc7f1791891c3957ab80ae /health
parentb7543176283b6e555aab14c131cccb4c54767725 (diff)
Disable stock alarms (#10617)
Bring new option to disable stock alarms when it is necessary
Diffstat (limited to 'health')
-rw-r--r--health/health_config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/health/health_config.c b/health/health_config.c
index a200a0dbf8..1acf369335 100644
--- a/health/health_config.c
+++ b/health/health_config.c
@@ -1023,5 +1023,13 @@ void health_readdir(RRDHOST *host, const char *user_path, const char *stock_path
return;
}
+ int stock_enabled = (int)config_get_boolean(CONFIG_SECTION_HEALTH, "enable stock health configuration",
+ CONFIG_BOOLEAN_YES);
+
+ if (!stock_enabled) {
+ info("Netdata will not load stock alarms.");
+ stock_path = user_path;
+ }
+
recursive_config_double_dir_load(user_path, stock_path, subpath, health_readfile, (void *) host, 0);
}