log additional information when a plugin gives invalid information to netdata; #2967
Costa Tsaousis (ktsaou) committed
Nov 7, 2017 at 19:17 UTC
0f4683300a30a4b40c638e6e82faef11295e6dc7
1 file changed
+20
-2
src/rrdset.c
+20
-2
@@ -437,12 +437,30 @@ RRDSET *rrdset_create_custom(
437
, long history_entries
438
) {
439
if(!type || !type[0]) {
440
- fatal("Cannot create rrd stats without a type.");
440
+ fatal("Cannot create rrd stats without a type: id '%s', name '%s', family '%s', context '%s', title '%s', units '%s', plugin '%s', module '%s'."
441
+ , (id && *id)?id:"<unset>"
442
+ , (name && *name)?name:"<unset>"
443
+ , (family && *family)?family:"<unset>"
444
+ , (context && *context)?context:"<unset>"
445
+ , (title && *title)?title:"<unset>"
446
+ , (units && *units)?units:"<unset>"
447
+ , (plugin && *plugin)?plugin:"<unset>"
448
+ , (module && *module)?module:"<unset>"
449
+ );
450
return NULL;
451
}
452
453
if(!id || !id[0]) {
445
- fatal("Cannot create rrd stats without an id.");
454
+ fatal("Cannot create rrd stats without an id: type '%s', name '%s', family '%s', context '%s', title '%s', units '%s', plugin '%s', module '%s'."
455
+ , type
456
+ , (name && *name)?name:"<unset>"
457
+ , (family && *family)?family:"<unset>"
458
+ , (context && *context)?context:"<unset>"
459
+ , (title && *title)?title:"<unset>"
460
+ , (units && *units)?units:"<unset>"
461
+ , (plugin && *plugin)?plugin:"<unset>"
462
+ , (module && *module)?module:"<unset>"
463
+ );
464
return NULL;
465
}
466