SNMP v3 node-red-node-snmp

Hi, I am currently using node-red-node-snmp at work but have been told that to meet new security requirements I will need to upgrade to SNMP v3. Is this something that would be possible and would there be anyone willing to implement this? I'm new to the community so not sure if there is a way for me to pay for this as a service. Any info would be really useful.

Hi John, welcome to the community. Looks like this one might have been overlooked.

That node is maintained by @dceejay who is one of the core Node-RED devs. They are crazy busy but that node is actively maintained so you could try raising an issue on the repo

Unfortunately, it currently relies on the net-snmp package which doesn't support v3. It doesn't look as though that package is very actively maintained. There is an open issue regarding snmp v3 that has been there since 2015!

See what Dave says first but I think that the options are:

  • Clone the current node and rip out the net-snmp package, replace with something that does support v3
  • Create a new node that is v3 enabled again, based on a package that supports v3 and is actively maintained.

Hi,
basically @TotallyInformation has it correct - the current underlying library doesn't support v3 and doesn't look like it will. As I'm not an snmp expert (someone helped me do the original) and I don't have a way of testing this at all, it is somewhat below the bottom of my current to do list... so the two options mentioned are realistically the only options available in any reasonable timeframe.

1 Like

@TotallyInformation @dceejay Thanks both for the info, I think both of those things might be a bit above my level at the moment, do you know if there is a forum in which you can pay people to implement these things? Thanks again.

Well, this is the main forum for all things Node-RED. There is also the Node-RED Slack as well.

Possibly if you put a call out, someone who works with NR professionally might have some time, I think that has happened once or twice in the past.

Hi team - FYI - I've just added SNMPv3 support to net-snmp, and it's available for use now at:

There's a PR open for this at nospaceships/net-snmp to merge into the main net-snmp repo, but it hasn't been merged as of yet - although it has been tested reasonably well.

To use pre-merge, just add this to package.json:
"net-snmp": "https://github.com/markabrahams/node-net-snmp.git"

and "npm install"

There's only one new public API call added to the net-snmp library:
snmp.createV3Session(target, user, [options])

which you would call for v3 instead of snmp.createSession(target, [community], [options]) for v1 or v2c.

Documentation for the new call is also at the above Github link.

Cheers, Mark.

2 Likes

Nice work. Any idea if/when they may merge it ?

Not too much of an idea unfortunately. I'm new to the node-net-snmp project, and not historically connected to it, so don't know the author/contributors at all. I just picked up the enhancement over the last week, as I need SNMPv3 support for a node app I'm writing. The author seems to still reply on the Github issues on a reasonably regular basis, so hoping this will get some attention within the next month (as it would be handy for me to be merged as well!)

1 Like

@dceejay - FYI the SNMPv3 PR has been merged and published in the main net-snmp NPM repository, so is available for use now.

3 Likes

Hi Mark, just checking are you working on updating the node-red-snmp to v3 or have you managed to find anyone who can?

Anyone with snmp experience willing to give this a try ? The new library may "just work" - or it may need some updating - but I have no local way to test - so need some help here if possible...

I have some experience but I don't know that I've any SNMP v3 kit to hand.

I don't see snpm v3 in the nodes (fields), is that correct ?

Yes. That’s the point. The underlying lib does now support it so a) would like to do a basic update and b) add v3 support in the node. Don’t have to do both in one go.

Oh, so you just want us to test that it is OK like the current version then? :slight_smile:

Happy to do that, I'm using the current version to monitor my WiFi AP right now so I'd be happy to replace that with a test version if you like.

yes - that would be task a. (I don't have a test version yet... all I was going to do was update the net-snmp lib to the latest and check it still works... - I suspect that is well within you local capability :wink:

Dceejay,

I attempted to test this, and used the following steps. (might have been a rude way to do it this way, but I think it worked)

  1. Updated the Net-snmp via NPM in the node_modules
  2. Manually replaced the Net-snmp in the node-red-node-snmp folder (copied all the contents of the existing with the new data)
  3. Started node red and tested it with V1 and 2c (and worked well)
  4. Modified the snmp.html so we now have a v3 in the drop down list
  5. Modified snmp.js so we now have a V3 call (and this did not work. reasoning, because I did not read that the API call has changed for version 3, sigh, it pays to read)
  6. Next weekends task to change the snmp.js call for V3

Question: Is this the right way to approach this, or should I construct a new node from scratch?

Final note: Love all of your dedication and hard work (thumbs up) of all of the team.

Hi,

sure - as long as you don't break existing functionality (for v1 and 2c) then a Pull Request to update the node to add v3 support would be most welcome.

Okay,
Time to put my effort in to assist, will modify and test on my side, and then Pull a request. Weekend job though.

2 Likes

Thanks, No rush though. Would be great to have, thanks in advance.