fix health emphemerality labels src (#14105)
Fixes https://github.com/netdata/netdata/issues/14084
Ilya Mashchenko committed
Dec 8, 2022 at 15:25 UTC
e25b5ccf189463ca2a73a9ef6d1f7cf30a6e0bab
1 file changed
+6
-2
health/health.c
+6
-2
@@ -1553,12 +1553,16 @@ void *health_main(void *ptr) {
1553
1554
void health_add_host_labels(void) {
1555
DICTIONARY *labels = localhost->rrdlabels;
1556
+ enum rrdlabel_source src;
1557
+
1558
+ // The source should be CONF, but when it is set, these labels are exported by default ('send configured labels' in exporting.conf).
1559
+ // Their export seems to break exporting to Graphite, see https://github.com/netdata/netdata/issues/14084.
1560
1561
int is_ephemeral = appconfig_get_boolean(&netdata_config, CONFIG_SECTION_HEALTH, "is ephemeral", CONFIG_BOOLEAN_NO);
1558
- rrdlabels_add(labels, "_is_ephemeral", is_ephemeral ? "true" : "false", RRDLABEL_SRC_CONFIG);
1562
+ rrdlabels_add(labels, "_is_ephemeral", is_ephemeral ? "true" : "false", RRDLABEL_SRC_AUTO);
1563
1564
int has_unstable_connection = appconfig_get_boolean(&netdata_config, CONFIG_SECTION_HEALTH, "has unstable connection", CONFIG_BOOLEAN_NO);
1561
- rrdlabels_add(labels, "_has_unstable_connection", has_unstable_connection ? "true" : "false", RRDLABEL_SRC_CONFIG);
1565
+ rrdlabels_add(labels, "_has_unstable_connection", has_unstable_connection ? "true" : "false", RRDLABEL_SRC_AUTO);
1566
}
1567
1568
void health_thread_spawn(RRDHOST * host) {