Perform a host metadata update on reconnection (#11965)
Stelios Fragkakis committed
Jan 14, 2022 at 11:14 UTC
a3951ae82c87818db014ff13a943ba3cca8bd95b
1 file changed
+25
streaming/receiver.c
+25
@@ -363,6 +363,31 @@ static int rrdpush_receive(struct receiver_state *rpt)
363
}
364
netdata_mutex_unlock(&rpt->host->receiver_lock);
365
}
366
+ else {
367
+ rrd_wrlock();
368
+ rrdhost_update(
369
+ rpt->host,
370
+ rpt->hostname,
371
+ rpt->registry_hostname,
372
+ rpt->machine_guid,
373
+ rpt->os,
374
+ rpt->timezone,
375
+ rpt->abbrev_timezone,
376
+ rpt->utc_offset,
377
+ rpt->tags,
378
+ rpt->program_name,
379
+ rpt->program_version,
380
+ rpt->update_every,
381
+ history,
382
+ mode,
383
+ (unsigned int)(health_enabled != CONFIG_BOOLEAN_NO),
384
+ (unsigned int)(rrdpush_enabled && rrdpush_destination && *rrdpush_destination && rrdpush_api_key && *rrdpush_api_key),
385
+ rrdpush_destination,
386
+ rrdpush_api_key,
387
+ rrdpush_send_charts_matching,
388
+ rpt->system_info);
389
+ rrd_unlock();
390
+ }
391
392
#ifdef NETDATA_INTERNAL_CHECKS
393
int ssl = 0;