// parse floating point values, exposed as strings
value=parseFloat(varbinds[i].value)*1000;
if(__DEBUG===true)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 = "+value.toString()+" (parsed as float in string)");
else
// just use the string
value=varbinds[i].value;
if(__DEBUG===true)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 = "+value.toString()+" (parsed as string)");
break;
casenet_snmp.ObjectType.Counter64:
// copy the buffer
value='0x'+varbinds[i].value.toString('hex');
if(__DEBUG===true)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 = "+value.toString()+" (parsed as buffer)");
break;
casenet_snmp.ObjectType.Integer:
casenet_snmp.ObjectType.Counter:
casenet_snmp.ObjectType.Gauge:
default:
value=varbinds[i].value;
if(__DEBUG===true)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 = "+value.toString()+" (parsed as number)");