Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
SNMP toolkit for Node.js
JavaScript
branch: master

This branch is 30 commits behind joyent:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
deps
docs
lib
smf/manifests
test/protocol
tools
.gitignore
.gitmodules
Makefile
Makefile.deps
Makefile.targ
README.md
agent.js
agent.json
package.json

README.md

snmpjs provides a toolkit for SNMP agents and management application in Node.js.

Usage

For full docs, see http://wesolows.github.com/node-snmpjs/.

var os = require('os');
var snmp = require('snmpjs');
var logger = require('bunyan');

var log = new logger({
    name: 'snmpd',
    level: 'info'
});

var agent = snmp.createAgent({
    log: log
});

agent.request('.1.3.6.1.2.1.1.5', function (arg) {
    var nodename = os.hostname();
    var val = { type: 'String', value: nodename };

    snmp.util.readOnlyScalar(arg, val);
});

agent.bind('udp4', 161);

Try hitting that with your favourite SNMP get utility, such as:

$ snmpget -v 2c -c any localhost .1.3.6.1.2.1.1.5

Installation

$ npm install snmpjs

License

MIT.

Bugs

See https://github.com/wesolows/node-snmpjs/issues.

Something went wrong with that request. Please try again.