npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-snmp-trap-listener

v2.4.0

Published

Node-RED node that receives snmp traps.

Downloads

279

Readme

Node-RED SNMP Trap Listener

NPM

This Node-RED node listens for SNMP Trap packages on the configured port.
Trap which do meet the filter setting will be emitted on the node output.

The filter options are:
SNMP version (v1, v2c, v3)
Community string (v1 & v2c only)
User credential (v3 only)
IP Filtering

Getting Started

Adding nodes to the palette - Node-RED Documentation
Remember to configure the snmp-trap-listener node before you deploy your changes.

Documentation

Input

The snmp-trap-listener node doesn't take any input.

Output

The snmp-trap-listener node output object is in the following format:

SNMP v1

{
	"payload":[
		{
			"oid":"1.3.6.1.4.1.13576.10.1.40.4.4.2",
			"typename":"OctetString",
			"value":[80,108,99,32,83,116,97,114,116],
			"string_value":"Plc Start"
		}
	],
	"enterprise":"1.3.6.1.4.1.13576",
	"agent_addr":"10.0.1.125",
	"generic_trap":6,
	"specific_trap":2,
	"time_stamp":8932,
	"src":{
		"family":"IPv4",
		"address":"10.0.1.125",
		"port":44688
	},
	"version":0,
	"string_version":"Trap",
	"_msgid":"e7f3490e.2320d8"
}

SNMP v2c/v3

{
	"payload":[
		{
			"oid":"1.3.6.1.2.1.1.3.0",
			"typename":"TimeTicks",
			"value":760,
			"string_value":"760"
		},
		{
			"oid":"1.3.6.1.6.3.1.1.4.1.0",
			"typename":"OID",
			"value":"1.3.6.1.4.1.13576.0.2",
			"string_value":"1.3.6.1.4.1.13576.0.2"
		},
		{
			"oid":"1.3.6.1.4.1.13576.10.1.40.4.4.2",
			"typename":"OctetString",
			"value":[80,108,99,32,83,116,97,114,116],
			"string_value":"Plc Start"
		}
	],
	"src":{
		"family":"IPv4",
		"address":"10.0.1.125",
		"port":28391
	},
	"version":1,
	"string_version":"TrapV2",
	"_msgid":"d9562ebf.2f62d"
}

It's payload contains an array which contains all received variable bindings.

{
    oid: "1.3.1",                   //OID path
    typename: "OctetString",        //Typename
    value: [Buffer],                //Contains raw data in a Buffer if String
                                    //or data if Integer
    string_value: "test_value"      //Contains data as a string
}

Options

The node contains the following options:

  • Port, Sets the port on which to listen for SNMP traps

  • SNMP Version, select which version of SNMP should be used.

  • SNMP v1/v2c: Community, network community string. The community string acts like a user ID or password. A user with the correct community string has access to network information. The default is public.

  • SNMP v3: User

    • Username, username of the SNMP User-based Security Model (USM) user.
    • Authentication Protocol, authentication protocol used to authenticate messages sent on behalf of the specified Username.
    • Authentication Key, authentication key used by the selected authentication protocol.
    • Encryption Protocol, encryption protocol used to encrypt messages sent on behalf of the specified Username.
    • Encryption Key, encryption key used by the selected encryption protocol.
  • IP Filter:

    • IP Address, base IP address used for the filter.

    • Network mask, network mask used to calculate the filter IP address range.
      It can be in four-part dotted-decimal format: 255.255.255.0
      or in CIDR (Classless Inter-Domain Routing) notation: 24

Example of IP filter: | IP Address | Network mask | Filter Start | Filter End | |---|---|---|---| | 192.168.1.1 | 24 | 192.168.1.1 | 192.168.1.254 | | 192.168.1.1 | 255.255.255.0 | 10.0.1.1 | 10.0.1.254 | | 10.0.1.25 | 30 | 10.0.1.25 | 10.0.1.26 | | 10.0.1.25 | 255.255.255.252 | 10.0.1.25 | 10.0.1.26 |

Debugging

Run node index.js to start the listener in your debugger of choice.

Project Informations

Platform Node-RED

- Current version

GitHub package.json version
NPM download
NPM download

- Languages

GitHub language count
GitHub top language

- Dependencies

GitHub package.json dependency version (prod)
GitHub package.json dependency version (prod)

- License

GitHub