From a3951ae82c87818db014ff13a943ba3cca8bd95b Mon Sep 17 00:00:00 2001 From: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> Date: Fri, 14 Jan 2022 11:14:30 +0200 Subject: Perform a host metadata update on reconnection (#11965) --- streaming/receiver.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/streaming/receiver.c b/streaming/receiver.c index 483cc68e59..a0920e563d 100644 --- a/streaming/receiver.c +++ b/streaming/receiver.c @@ -363,6 +363,31 @@ static int rrdpush_receive(struct receiver_state *rpt) } netdata_mutex_unlock(&rpt->host->receiver_lock); } + else { + rrd_wrlock(); + rrdhost_update( + rpt->host, + rpt->hostname, + rpt->registry_hostname, + rpt->machine_guid, + rpt->os, + rpt->timezone, + rpt->abbrev_timezone, + rpt->utc_offset, + rpt->tags, + rpt->program_name, + rpt->program_version, + rpt->update_every, + history, + mode, + (unsigned int)(health_enabled != CONFIG_BOOLEAN_NO), + (unsigned int)(rrdpush_enabled && rrdpush_destination && *rrdpush_destination && rrdpush_api_key && *rrdpush_api_key), + rrdpush_destination, + rrdpush_api_key, + rrdpush_send_charts_matching, + rpt->system_info); + rrd_unlock(); + } #ifdef NETDATA_INTERNAL_CHECKS int ssl = 0; -- cgit v1.2.3