diff --git a/io/snmp/package.json b/io/snmp/package.json index 16314ea2..91df5eba 100644 --- a/io/snmp/package.json +++ b/io/snmp/package.json @@ -1,9 +1,9 @@ { "name" : "node-red-node-snmp", - "version" : "0.0.7", + "version" : "0.0.8", "description" : "A Node-RED node that looks for SNMP oids.", "dependencies" : { - "net-snmp" : "1.1.13" + "net-snmp" : "^1.1.19" }, "repository" : { "type":"git", diff --git a/io/snmp/snmp.js b/io/snmp/snmp.js index 0d4ef39c..a58939fd 100644 --- a/io/snmp/snmp.js +++ b/io/snmp/snmp.js @@ -76,7 +76,7 @@ module.exports = function(RED) { function responseCb(error, table) { if (error) { - console.error(error.toString()); + le.error(error.toString()); } else { var indexes = []; for (var index in table) { @@ -93,10 +93,10 @@ module.exports = function(RED) { } } columns.sort(sortInt); - console.log("row index = " + indexes[i]); - for (var j = 0; j < columns.length; j++) { - console.log(" column " + columns[j] + " = " + table[indexes[i]][columns[j]]); - } + // console.log("row index = " + indexes[i]); + // for (var j = 0; j < columns.length; j++) { + // console.log(" column " + columns[j] + " = " + table[indexes[i]][columns[j]]); + // } } msg.payload = table; node.send(msg); @@ -146,7 +146,7 @@ module.exports = function(RED) { node.error(snmp.varbindError(varbinds[i])); } else { - console.log(varbinds[i].oid + "|" + varbinds[i].value); + //console.log(varbinds[i].oid + "|" + varbinds[i].value); response.add({oid: varbinds[i].oid, value: varbinds[i].value}); } } @@ -195,7 +195,7 @@ module.exports = function(RED) { node.error(snmp.varbindError(varbinds[i])); } else { - console.log(varbinds[i].oid + "|" + varbinds[i].value); + //console.log(varbinds[i].oid + "|" + varbinds[i].value); response.add({oid: varbinds[i].oid, value: varbinds[i].value}); } }