mirror of
https://github.com/netdata/netdata.git
synced 2025-04-27 22:26:21 +00:00
Disable stock alarms (#10617)
Bring new option to disable stock alarms when it is necessary
This commit is contained in:
parent
b754317628
commit
fb2d4be0f2
2 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -1406,7 +1406,7 @@ void recursive_config_double_dir_load(const char *user_path, const char *stock_p
|
|||
if (!dir) {
|
||||
error("CONFIG cannot open stock config directory '%s'.", sdir);
|
||||
}
|
||||
else {
|
||||
else if (strcmp(udir, sdir)) {
|
||||
struct dirent *de = NULL;
|
||||
while((de = readdir(dir))) {
|
||||
if(de->d_type == DT_DIR || de->d_type == DT_LNK) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue