added debug info to SNMP received values; #2362
Costa Tsaousis (ktsaou) committed
Aug 26, 2017 at 02:02 UTC
26dae246062697627380867b368fa79d8e602a0f
1 file changed
+1
-1
node.d/snmp.node.js
+1
-1
@@ -270,7 +270,7 @@ netdata.processors.snmp = {
270
}
271
else {
272
if(__DEBUG === true)
273
- netdata.debug(service.module.name + ': ' + service.name + ': found ' + service.module.name + ' value of OIDs ' + varbinds[i].oid + " = " + varbinds[i].value);
273
+ netdata.debug(service.module.name + ': ' + service.name + ': found ' + service.module.name + ' value of OIDs ' + varbinds[i].oid + ", ObjectType " + net_snmp.ObjectType[varbinds[i].type] + " (" + netdata.stringify(varbinds[i].type) + "), typeof(" + typeof(varbinds[i].value) + "), in JSON: " + netdata.stringify(varbinds[i].value) + ", value = '" + varbinds[i].value.toString() + "'");
274
275
if(varbinds[i].type === net_snmp.ObjectType.OctetString && service.snmp_oids_index[varbinds[i].oid].type !== 'title')
276
value = parseFloat(varbinds[i].value) * 1000;