diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2022-05-16 12:02:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 12:02:53 +0300 |
commit | 3fa3b0bd35c1a95887e68ee60624207640dde620 (patch) | |
tree | bb7fe8d80b77d7657bd630b88d81d40914ebee3c | |
parent | ce2e3083856bb8e080f4808e06286f023c313a97 (diff) |
fix `[global statistics]` section in netdata.conf (#12916)
-rw-r--r-- | daemon/global_statistics.c | 4 | ||||
-rw-r--r-- | libnetdata/config/appconfig.c | 1 | ||||
-rw-r--r-- | libnetdata/config/appconfig.h | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/daemon/global_statistics.c b/daemon/global_statistics.c index 8ac2684155..17b5b8cfa0 100644 --- a/daemon/global_statistics.c +++ b/daemon/global_statistics.c @@ -4,8 +4,6 @@ #define GLOBAL_STATS_RESET_WEB_USEC_MAX 0x01 -#define CONFIG_SECTION_GLOBAL_STATISTICS "global statistics" - #define WORKER_JOB_GLOBAL 0 #define WORKER_JOB_REGISTRY 1 #define WORKER_JOB_WORKERS 2 @@ -1495,7 +1493,7 @@ void *global_statistics_main(void *ptr) netdata_thread_cleanup_push(global_statistics_cleanup, ptr); int update_every = - (int)config_get_number("CONFIG_SECTION_GLOBAL_STATISTICS", "update every", localhost->rrd_update_every); + (int)config_get_number(CONFIG_SECTION_GLOBAL_STATISTICS, "update every", localhost->rrd_update_every); if (update_every < localhost->rrd_update_every) update_every = localhost->rrd_update_every; diff --git a/libnetdata/config/appconfig.c b/libnetdata/config/appconfig.c index b710190d0a..5005fe6883 100644 --- a/libnetdata/config/appconfig.c +++ b/libnetdata/config/appconfig.c @@ -844,6 +844,7 @@ void appconfig_generate(struct config *root, BUFFER *wb, int only_changed) || !strcmp(co->name, CONFIG_SECTION_STREAM) || !strcmp(co->name, CONFIG_SECTION_HOST_LABEL) || !strcmp(co->name, CONFIG_SECTION_ML) + || !strcmp(co->name, CONFIG_SECTION_GLOBAL_STATISTICS) ) pri = 0; else if(!strncmp(co->name, "plugin:", 7)) pri = 1; diff --git a/libnetdata/config/appconfig.h b/libnetdata/config/appconfig.h index 321b19187a..a2acb1a786 100644 --- a/libnetdata/config/appconfig.h +++ b/libnetdata/config/appconfig.h @@ -95,6 +95,7 @@ #define CONFIG_SECTION_PROMETHEUS "prometheus:exporter" #define CONFIG_SECTION_HOST_LABEL "host labels" #define EXPORTING_CONF "exporting.conf" +#define CONFIG_SECTION_GLOBAL_STATISTICS "global statistics" // these are used to limit the configuration names and values lengths // they are not enforced by config.c functions (they will strdup() all strings, no matter of their length) |