Giter VIP home page Giter VIP logo

node-snmpjs-new's Introduction

snmpjs-new provides a toolkit for SNMP agents and management applications in Node.js.

Note: this was forked from http://joyent.github.com/node-snmpjs for the purpose of various bug fixes.

Usage

For full docs, see http://joyent.github.com/node-snmpjs/ (I haven't made a doc page custom to this package).

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

var agent = snmp.createAgent();

agent.request({ oid: '.1.3.6.1.2.1.1.5', handler: function (prq) {
	var nodename = os.hostname();
	var val = snmp.data.createData({ type: 'OctetString',
	    value: nodename });

	snmp.provider.readOnlyScalar(prq, val);
} });

agent.bind({ family: 'udp4', port: 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.0

Installation

$ npm install snmpjs-new

License

MIT.

Bugs

See https://github.com/dtgriscom/node-snmpjs-new/issues.

node-snmpjs-new's People

Contributors

chipzz avatar dtgriscom avatar kdekooter avatar trentm avatar

Watchers

 avatar  avatar  avatar

node-snmpjs-new's Issues

Help on example for agent and get subtree request

Dear,

I need help / examples to make a SNMPjs agent reply to Get subtree requests.
I understand how to use "snmp.provider.readOnlyScalar(prq, val);" from the readme.md.
But that is not usefull for Tabular responce. I see that the help talkes about it but the lack of examples just kills me :-s

Br,

Sté

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.