@cryptotaxi247 / netdata-1 / commits / a0d5d14b1

allow proxying metrics between hosts

Costa Tsaousis (ktsaou) committed Feb 25, 2017 at 01:57 UTC a0d5d14b11c9f8150dae15cd72a19c8fb14f6b31
1 file changed +4 -3
src/rrdpush.c
+4 -3
@@ -293,9 +293,9 @@ void *rrdpush_sender_thread(void *ptr) {
293 "User-Agent: netdata-push-service/%s\r\n"
294 "Accept: */*\r\n\r\n"
295 , rrdpush_api_key
296 - , localhost->hostname
297 - , localhost->machine_guid
298 - , localhost->os
296 + , host->hostname
297 + , host->machine_guid
298 + , host->os
299 , default_rrd_update_every
300 , program_version
301 );
@@ -452,6 +452,7 @@ int rrdpush_receive(int fd, const char *key, const char *hostname, const char *m
452 host = rrdhost_find_or_create(hostname, machine_guid, os, update_every, history, mode, (health_enabled == CONFIG_BOOLEAN_NO)?0:1);
453
454 if(!host) {
455 + close(fd);
456 error("STREAM %s [receive from [%s]:%s]: failed to find/create host structure.", hostname, client_ip, client_port);
457 return 1;
458 }