Here you have a simple SNMP function tested with v1/v2c devices under V8
As of now the only operation available is snmp Get and can be called by using system.snmp.snmpGet(‘community’, ‘address’, port, ‘OID’)
Returns value as string
I was in need of a simple function for SNMP. The driver on market seems a little complicated and
the free one made by BYES for V7.9 is not free anymore for V8 ( for a good reason )
So I asked my son for help, we took the function example, tweaked the code from here and we got
exactly what I needed. Module and source are available on github.
One nit: You have your java package name backwards, and it doesn’t have elements to uniquely identify your module. It should be something like ca.allnetauto.ignition.snmp, assuming your company’s domain name is allnetauto.ca. Consider adding an element to the package names to indicate their scope, like ca.allnetauto.ignition.snmp.common.
Unrelated to your direct post - how did you make a modl for Ignition? It was something I was thinking about trying my hand at just to learn how but I can’t find any good resources. I assume you had to do it in Java?
Warning. You are expected to know at least the basics of Java programming. But really need to be at least at an intermediate level to understand what is going on.
With that said, once you have your environment set up you can find ready made examples at:
There’s also some cool stuff in the works for quick generation of module ‘skeletons’ - expect to hear more about that soon, probably here on the forums.
Though it seems overwhelming at start, following the examples gives you a pretty good understanding on how to make a module. And also the .modl file was generated at the end when running mvn package, just keep trying to figure it out. Good luck
Hi allnet, very useful function, thanks for sharing !
As I understand this SNMP module works in “polling” mode, by sending out requests through the system.snmp.snmpGet() script.
Is there a possibility to setup this module in “traps listening” mode ? For instance by adding a MIB to translate automatically the traps randomly received from device agents ?
Norcal-SNMP-Driver-signed.modl (608.0 KB)
I don't know how to do that either, but had one of my other engineers do it for me. See attached. Hopefully this helps.
I was using the updated one referenced by @hw79 and had considerable success with the v3 other than it doesn't seem to respect the settings for authProt and privProt. Seems like no matter what I put there it uses MD5 and DES internally. Anyone else had better success for those settings? I also notice it doesn't have a spot to enter the separate keys. Just 1 password, when there should be 2 basically. Unless I'm missing something.