summaryrefslogtreecommitdiffstats
path: root/streaming/rrdpush.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-21 19:34:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-21 19:34:08 +0000
commit6d2e027eb728c8294fdd7c3692e9853b3ca2603b (patch)
tree3e190253238075ac8590b2f214852d2256fdad53 /streaming/rrdpush.c
parentOpting out by default from sending anonymous statistics (phone home). (diff)
downloadnetdata-6d2e027eb728c8294fdd7c3692e9853b3ca2603b.tar.xz
netdata-6d2e027eb728c8294fdd7c3692e9853b3ca2603b.zip
Merging upstream version 1.12.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'streaming/rrdpush.c')
-rw-r--r--streaming/rrdpush.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/streaming/rrdpush.c b/streaming/rrdpush.c
index 617484c80..d1626db70 100644
--- a/streaming/rrdpush.c
+++ b/streaming/rrdpush.c
@@ -188,12 +188,13 @@ static inline void rrdpush_send_chart_definition_nolock(RRDSET *st) {
rrddim_foreach_read(rd, st) {
buffer_sprintf(
host->rrdpush_sender_buffer
- , "DIMENSION \"%s\" \"%s\" \"%s\" " COLLECTED_NUMBER_FORMAT " " COLLECTED_NUMBER_FORMAT " \"%s %s\"\n"
+ , "DIMENSION \"%s\" \"%s\" \"%s\" " COLLECTED_NUMBER_FORMAT " " COLLECTED_NUMBER_FORMAT " \"%s %s %s\"\n"
, rd->id
, rd->name
, rrd_algorithm_name(rd->algorithm)
, rd->multiplier
, rd->divisor
+ , rrddim_flag_check(rd, RRDDIM_FLAG_OBSOLETE)?"obsolete":""
, rrddim_flag_check(rd, RRDDIM_FLAG_HIDDEN)?"hidden":""
, rrddim_flag_check(rd, RRDDIM_FLAG_DONT_DETECT_RESETS_OR_OVERFLOWS)?"noreset":""
);
@@ -737,16 +738,16 @@ void *rrdpush_sender_thread(void *ptr) {
if(host->rrdpush_sender_socket != -1) {
char *error = NULL;
-
+
if (unlikely(ofd->revents & POLLERR))
error = "socket reports errors (POLLERR)";
-
+
else if (unlikely(ofd->revents & POLLHUP))
error = "connection closed by remote end (POLLHUP)";
-
+
else if (unlikely(ofd->revents & POLLNVAL))
error = "connection is invalid (POLLNVAL)";
-
+
if(unlikely(error)) {
debug(D_STREAM, "STREAM: %s - closing socket...", error);
error("STREAM %s [send to %s]: %s - reopening socket - we have sent %zu bytes on this connection.", host->hostname, connected_to, error, sent_bytes_on_this_connection);