@cryptotaxi247 / netdata-1 / commits / 26c801d00

more debugging for #2334

Costa Tsaousis (ktsaou) committed Jun 17, 2017 at 15:51 UTC 26c801d00ceeb0562b2bf81c1eed483652d307cc
1 file changed +14 -3
src/backends.c
+14 -3
@@ -44,9 +44,15 @@ static inline calculated_number backend_calculate_value_from_stored_data(
44 time_t first_t = rrdset_first_entry_t(st);
45 time_t last_t = rrdset_last_entry_t(st);
46
47 - if(unlikely(before < first_t || after > last_t))
47 + if(unlikely(before < first_t || after > last_t)) {
48 // the chart has not been updated in the wanted timeframe
49 + debug(D_BACKEND, "BACKEND: %s.%s.%s: requested timeframe %lu to %lu is outside the chart's database range %lu to %lu",
50 + st->rrdhost->hostname, st->id, rd->id,
51 + (unsigned long)after, (unsigned long)before,
52 + (unsigned long)first_t, (unsigned long)last_t
53 + );
54 return NAN;
55 + }
56
57 // align the time-frame
58 // for 'after' also skip the first value by adding st->update_every
@@ -88,8 +94,13 @@ static inline calculated_number backend_calculate_value_from_stored_data(
94 counter++;
95 }
96
91 - if(unlikely(!counter))
97 + if(unlikely(!counter)) {
98 + debug(D_BACKEND, "BACKEND: %s.%s.%s: no values stored in database for range %lu to %lu",
99 + st->rrdhost->hostname, st->id, rd->id,
100 + (unsigned long)after, (unsigned long)before
101 + );
102 return NAN;
103 + }
104
105 if(unlikely(options & BACKEND_SOURCE_DATA_SUM))
106 return sum;
@@ -113,7 +124,7 @@ static inline int discard_response(BUFFER *b, const char *backend) {
124 }
125 *d = '\0';
126
116 - info("Received %zu bytes from %s backend. Ignoring them. Sample: '%s'", buffer_strlen(b), backend, sample);
127 + info("BACKEND: received %zu bytes from %s backend. Ignoring them. Sample: '%s'", buffer_strlen(b), backend, sample);
128 buffer_flush(b);
129 return 0;
130 }