summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2022-01-14 11:14:30 +0200
committerGitHub <noreply@github.com>2022-01-14 11:14:30 +0200
commita3951ae82c87818db014ff13a943ba3cca8bd95b (patch)
treedd1fe8b9026dfb2c6767593731e16523f9676629
parentff5bc93fd4815a2c50dd41f18b6fe43ef09cc706 (diff)
Perform a host metadata update on reconnection (#11965)
-rw-r--r--streaming/receiver.c25
1 files changed, 25 insertions, 0 deletions
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;