fix `[global statistics]` section in netdata.conf (#12916)
Ilya Mashchenko committed
May 16, 2022 at 12:02 UTC
3fa3b0bd35c1a95887e68ee60624207640dde620
3 files changed
+3
-3
daemon/global_statistics.c
+1
-3
@@ -4,8 +4,6 @@
4
5
#define GLOBAL_STATS_RESET_WEB_USEC_MAX 0x01
6
7
-#define CONFIG_SECTION_GLOBAL_STATISTICS "global statistics"
8
-
7
#define WORKER_JOB_GLOBAL 0
8
#define WORKER_JOB_REGISTRY 1
9
#define WORKER_JOB_WORKERS 2
@@ -1495,7 +1493,7 @@ void *global_statistics_main(void *ptr)
1493
netdata_thread_cleanup_push(global_statistics_cleanup, ptr);
1494
1495
int update_every =
1498
- (int)config_get_number("CONFIG_SECTION_GLOBAL_STATISTICS", "update every", localhost->rrd_update_every);
1496
+ (int)config_get_number(CONFIG_SECTION_GLOBAL_STATISTICS, "update every", localhost->rrd_update_every);
1497
if (update_every < localhost->rrd_update_every)
1498
update_every = localhost->rrd_update_every;
1499
libnetdata/config/appconfig.c
+1
@@ -844,6 +844,7 @@ void appconfig_generate(struct config *root, BUFFER *wb, int only_changed)
844
|| !strcmp(co->name, CONFIG_SECTION_STREAM)
845
|| !strcmp(co->name, CONFIG_SECTION_HOST_LABEL)
846
|| !strcmp(co->name, CONFIG_SECTION_ML)
847
+ || !strcmp(co->name, CONFIG_SECTION_GLOBAL_STATISTICS)
848
)
849
pri = 0;
850
else if(!strncmp(co->name, "plugin:", 7)) pri = 1;
libnetdata/config/appconfig.h
+1
@@ -95,6 +95,7 @@
95
#define CONFIG_SECTION_PROMETHEUS "prometheus:exporter"
96
#define CONFIG_SECTION_HOST_LABEL "host labels"
97
#define EXPORTING_CONF "exporting.conf"
98
+#define CONFIG_SECTION_GLOBAL_STATISTICS "global statistics"
99
100
// these are used to limit the configuration names and values lengths
101
// they are not enforced by config.c functions (they will strdup() all strings, no matter of their length)