Use the SNMPTrap library in Lua to receive trap notifications from an SNMP-enabled device.
Note: In the SNMP model, Q-SYS acts as the SNMP Manager, while the device you intend to monitor runs an SNMP Agent that allows for monitoring.
Create a new SNMP trap listener.
SNMPTrap.New("trap_name")
trap_name : String. The name of the trap listener session.
snmp_trap = SNMPTrap.New("snmp_trap")
Begin a trap listening session.
startSession()
snmp_trap:startSession()
Assign a Lua callback for successful SNMP events.
RequestID : Integer. The request ID for bookkeeping purposes.
OID : String. The object ID for the response.
Value : String. The string representation for the current state of the object ID.
HostName : String. The host name for the response.
snmp_object.EventHandler = function(response) print(response.OID) print(response.Value) end
Assign a Lua callback for unsuccessful SNMP events.
Error : String. The error message for the request.
snmp_object.ErrorHandler = function(response) print(response.Error) end
Software and Firmware | Resources | QSC Self Help Portal | Q-SYS Help Feedback
Copyright © 2019 QSC, LLC. Click here for trademark and other legal notices. | Q-SYS 8.1.1