Thank you for your replies gentlemen,
We currently use a perl script that listens for specific nas generated messages and then calls a dos cli net-snmp executable to send a trap.
I'm trying to get to a simpler solution based on fewer components and less dependencies.
The snmpgtw probe was on my mind but I recently found that we need to use SNMP informs rather than traps.
I came across some documentation that I think originates from this forum that indicates a SNMP class exists in lua.
I was sort of hoping a update including SNMP informs would exist
The SNMP class provides the script programmer with built-in SNMPGET and SNMPWALK functionality.
snmp.create (SnmpVersion, TargetHost, … )
The snmp.create method takes different arguments dependent on the SNMPversion information.
For version 1 and 2:
snmp.create(1|2,target,community [,oidlist [,options]] )
For version 3:
snmp.create (3,target,username,password,auth,seclevel [,privprotocol [,privpassword [,oidlist]]] )
This method returns a handle used by the other methods in this class. The oidlist is a comma or white-space
separated list of object identifiers. They will be added to the handle‟s request list, and used by the
snmp.query method.
snmp. addvariable ( SnmpHandle , Oid)
Adds the oid to the SnmpHandle request buffer. Will be used by snmp.query.
snmp. addvariable ( SnmpHandle , Format, Type, Data [,Index])
Adds the oid to the SnmpHandle set buffer. The Format string is a sprint like formatting string allowing you
to modify the OIDs used together with the snmp.set. The Type is one of string, number or time. This usage
of the addvariable method will be only used by snmp.set.
snmp. delete( SnmpHandle )
Removes the data-structure associated with SnmpHandle.
snmp.query (SnmpHandle)
Runs the query against the oidlist specified in the create statement.
snmp. get(SnmpHandle,Oid)
Requests the Oid from the targethost denoted by the SnmpHandle. The data is returned as a table.
snmp. set(SnmpHandle)
Sets the variables added to the handle by snmp.addvariable at the targethost denoted by the SnmpHandle.
The data is also returned as a table if successful as well as a return code.
snmp.getnumber (Table|SnmpHandle, Oid)
Requests a single integer value from the SnmpHandle‟s result buffer, or from the Table returned by
snmp.walk or snmp.get.
snmp.getstring (Table|SnmpHandle, Oid )
Requests a single string value from the from the SnmpHandle‟s result buffer, or from the Table returned by
snmp.walk or snmp.get.
snmp. walk (SnmpHandle, StartingOID, RootPath [, MaxOids])
Performs a “snmpwalk” starting at the StartingOID, limiting it to the RootPath. The optional MaxOids
parameter allows the caller to set the maximum oids returned per request. The default value is 300.
The table returned by this function contains the following elements: numoids, done, lastoid and oids.