summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2022-05-16 12:02:53 +0300
committerGitHub <noreply@github.com>2022-05-16 12:02:53 +0300
commit3fa3b0bd35c1a95887e68ee60624207640dde620 (patch)
treebb7fe8d80b77d7657bd630b88d81d40914ebee3c
parentce2e3083856bb8e080f4808e06286f023c313a97 (diff)
fix `[global statistics]` section in netdata.conf (#12916)
-rw-r--r--daemon/global_statistics.c4
-rw-r--r--libnetdata/config/appconfig.c1
-rw-r--r--libnetdata/config/appconfig.h1
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)