diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-21 19:34:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-21 19:34:01 +0000 |
commit | 66564c2324abc58b24327b763e1113ff781156a2 (patch) | |
tree | 2480212cd47149a3fda5225b57689d0126546e23 /streaming/rrdpush.c | |
parent | Adding upstream version 1.12.0. (diff) | |
download | netdata-66564c2324abc58b24327b763e1113ff781156a2.tar.xz netdata-66564c2324abc58b24327b763e1113ff781156a2.zip |
Adding upstream version 1.12.1.upstream/1.12.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'streaming/rrdpush.c')
-rw-r--r-- | streaming/rrdpush.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/streaming/rrdpush.c b/streaming/rrdpush.c index 617484c8..d1626db7 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); |