log also the host on the errors about unknown dimensions; #2117
Costa Tsaousis (ktsaou) committed
Apr 22, 2017 at 23:00 UTC
5918230ac8da2689df98b780cb770a8c22cdb65e
1 file changed
+3
-3
src/rrddim.c
+3
-3
@@ -259,7 +259,7 @@ int rrddim_hide(RRDSET *st, const char *id) {
259
260
RRDDIM *rd = rrddim_find(st, id);
261
if(unlikely(!rd)) {
262
- error("Cannot find dimension with id '%s' on stats '%s' (%s).", id, st->name, st->id);
262
+ error("Cannot find dimension with id '%s' on stats '%s' (%s) on host '%s'.", id, st->name, st->id, st->rrdhost->hostname);
263
return 1;
264
}
265
@@ -272,7 +272,7 @@ int rrddim_unhide(RRDSET *st, const char *id) {
272
273
RRDDIM *rd = rrddim_find(st, id);
274
if(unlikely(!rd)) {
275
- error("Cannot find dimension with id '%s' on stats '%s' (%s).", id, st->name, st->id);
275
+ error("Cannot find dimension with id '%s' on stats '%s' (%s) on host '%s'.", id, st->name, st->id, st->rrdhost->hostname);
276
return 1;
277
}
278
@@ -301,7 +301,7 @@ inline collected_number rrddim_set_by_pointer(RRDSET *st, RRDDIM *rd, collected_
301
collected_number rrddim_set(RRDSET *st, const char *id, collected_number value) {
302
RRDDIM *rd = rrddim_find(st, id);
303
if(unlikely(!rd)) {
304
- error("Cannot find dimension with id '%s' on stats '%s' (%s).", id, st->name, st->id);
304
+ error("Cannot find dimension with id '%s' on stats '%s' (%s) on host '%s'.", id, st->name, st->id, st->rrdhost->hostname);
305
return 0;
306
}
307