allow netdata slaves to overwrite host tags without restarting the master
Costa Tsaousis (ktsaou) committed
Jul 11, 2017 at 23:52 UTC
54883440fd4cb6bb300dba40b31c02109f4632f7
1 file changed
+3
-2
src/rrdpush.c
+3
-2
@@ -564,7 +564,7 @@ static int rrdpush_receive(int fd, const char *key, const char *hostname, const
564
rrdpush_api_key = appconfig_get(&stream_config, key, "default proxy api key", rrdpush_api_key);
565
rrdpush_api_key = appconfig_get(&stream_config, machine_guid, "proxy api key", rrdpush_api_key);
566
567
- tags = appconfig_get(&stream_config, machine_guid, "host tags", (tags)?tags:"");
567
+ tags = appconfig_set_default(&stream_config, machine_guid, "host tags", (tags)?tags:"");
568
if(tags && !*tags) tags = NULL;
569
570
if(!strcmp(machine_guid, "localhost"))
@@ -592,7 +592,7 @@ static int rrdpush_receive(int fd, const char *key, const char *hostname, const
592
}
593
594
#ifdef NETDATA_INTERNAL_CHECKS
595
- info("STREAM %s [receive from [%s]:%s]: client willing to stream metrics for host '%s' with machine_guid '%s': update every = %d, history = %ld, memory mode = %s, health %s"
595
+ info("STREAM %s [receive from [%s]:%s]: client willing to stream metrics for host '%s' with machine_guid '%s': update every = %d, history = %ld, memory mode = %s, health %s, tags '%s'"
596
, hostname
597
, client_ip
598
, client_port
@@ -602,6 +602,7 @@ static int rrdpush_receive(int fd, const char *key, const char *hostname, const
602
, host->rrd_history_entries
603
, rrd_memory_mode_name(host->rrd_memory_mode)
604
, (health_enabled == CONFIG_BOOLEAN_NO)?"disabled":((health_enabled == CONFIG_BOOLEAN_YES)?"enabled":"auto")
605
+ , host->tags
606
);
607
#endif // NETDATA_INTERNAL_CHECKS
608