Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021
  1. // Copyright 2013 Stephen Vickers
  2. var snmp = require ("../");
  3. var options = require("./option-parser");
  4. var session = options.session;
  5. var oids = options.oids;
  6. session.get (oids, function (error, varbinds) {
  7. if (error) {
  8. console.error (error.toString ());
  9. } else {
  10. for (var i = 0; i < varbinds.length; i++) {
  11. if (snmp.isVarbindError (varbinds[i]))
  12. console.error (snmp.varbindError (varbinds[i]));
  13. else
  14. console.log (varbinds[i].oid + "|" + varbinds[i].value);
  15. }
  16. }
  17. });