]> arthur.barton.de Git - netdata.git/commitdiff
collect values from SNMP string OIDs; fixes #1236
authorCosta Tsaousis <costa@tsaousis.gr>
Mon, 21 Nov 2016 13:38:28 +0000 (15:38 +0200)
committerCosta Tsaousis <costa@tsaousis.gr>
Mon, 21 Nov 2016 13:38:28 +0000 (15:38 +0200)
node.d/snmp.node.js

index d1563e19681a0a80e040b7dd2eb7cd2a8cdfcf33..b38ac1666e25dffeb29e5cc657aa0befd40ae905 100644 (file)
@@ -249,7 +249,11 @@ netdata.processors.snmp = {
                         if(netdata.options.DEBUG === true)
                             netdata.debug(service.module.name + ': ' + service.name + ': found ' + service.module.name + ' value of OIDs ' + varbinds[i].oid + " = " + varbinds[i].value);
 
-                        value = varbinds[i].value;
+                        if(varbinds[i].type === net_snmp.ObjectType.OctetString)
+                            value = parseFloat(varbinds[i].value) * 1000;
+                        else
+                            value = varbinds[i].value;
+
                         ok++;
                     }