Listen to udp and parse the snmp in it

#1

Hello guys,
New to Node-red.
I have a use case to 'Keep running a node to listen to UDP msgs and parse the snmp data in it and then it needs to be forwarded to kafka.
Has anyone done something similar.
Could you please help.

Note: New to networking..snmp,udp etc are kinda new to me.

#2

What have you tried?
The purpose of the forum is to help people learn. To do this its useful to understand what have have done and where you are stuck.

#3

There is an SNMP node if that helps. Otherwise, I suggest you output to debug and post an example here, someone will be able to help for sure.

#4

Link for the snmp node - https://flows.nodered.org/node/node-red-node-snmp

#5

Hey @ukmoose ,

I made a flow which listens to my udp port 162 on my localhost ,to which I try to send a test trap using the snmpTrapgen.exe utility.(SnmpTrapGen.exe -r:localhost -q -v:2c -p:162 -to:.1.3.6.1.2.1.1.1.0)

Though I could see a response from the debug attached to the udp node the snmp node always returns the 'timeOut error'


PFB the json of the flow :-

[{"id":"7cc0cdb3.77520c","type":"tab","label":"Flow 5","disabled":false,"info":""},{"id":"31bedf90.29b91","type":"udp in","z":"7cc0cdb3.77520c","name":"","iface":"","port":"162","ipv":"udp4","multicast":"false","group":"","datatype":"base64","x":160,"y":80,"wires":[["a0115c69.220c1","11519d27.05ac3b"]]},{"id":"a0115c69.220c1","type":"debug","z":"7cc0cdb3.77520c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":470,"y":80,"wires":[]},{"id":"11519d27.05ac3b","type":"snmp","z":"7cc0cdb3.77520c","host":"127.0.0.1:162","community":"public","version":"2c","oids":"1.3.6.1.2.1.1.1.0","timeout":5,"name":"","x":320,"y":240,"wires":[["7b01d0bd.e9ff2"]]},{"id":"7b01d0bd.e9ff2","type":"debug","z":"7cc0cdb3.77520c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":560,"y":240,"wires":[]}]
#6

Please see the post on how to share your flow, it is not importable as you have done it. You can edit your previous post accordingly.

#7

Thankyou @Colin

#8

Ah right - you want to listen to snmp traps... I don't think the node does that right now. It can be used to get an oid, table etc from a device. Would need that adding I think.

#9

Thankyou @dceejay,
Is there any other way to get my use case done!!!

#10

This one may be more suitable :-)...

apologies for not spotting that in the first place
(always worth searching on http://flows.nodered.org ...)

#11

Thanks @dceejay ,
But I could not find the installation of this particular node , the npm install also returned an error :roll_eyes:

#12

So what error did the npm install return?

#13

Interestingly it appears the node can be installed using npm command line

cd .node-red
npm install node-red-contrib-snmp-trap-listener

but is not available for install via the palette manager.

#14

Ah - they haven't added a keywords section to the package.json

https://nodered.org/docs/creating-nodes/packaging#package.json

If someone would like to raise an issue that would be great.

#15

hello @ukmoose , I got the following error .

C:\Users\....\.....\.....\npm\node_modules\node-red>npm install node-red-contrib-snmp-trap-listener
npm ERR! code E404
npm ERR! 404 Not Found: node-red-contrib-snmp-trap-listener@latest

npm ERR! A complete log of this run can be found in: 
#16

Are you sure you are installing it in the correct directory?

What does the complete log say? It looks like it can't find the file, but @Colin comment suggests that it is available

#17

You should be running it from the same folder as your flows are located, usually this is the .node-red folder