Configuring the PATROL Agent as an SNMP manager
Through PSL functions, the PATROL Agent can act as an SNMP Manager by listening for traps and getting and setting information stored in SNMP agent variables, referred to as MIB variables.
Listening for SNMP traps
During trap listening, the PATROL Agent works as an SNMP manager that receives and handles traps from SNMP agents, including itself. The following table lists the PSL function to use for the task you want to perform:
Functions for SNMP Manager/Trap handler
Task to be performed | PSL function to use |
---|---|
Start accumulating incoming traps | snmp_trap_listen() |
Capture the arriving traps | snmp_trap_receive() |
Close a trap socket and ignore all unprocessed and arriving traps | snmp_trap_ignore() |
Getting and setting MIB variables
The PATROL Agent can act as an SNMP Manager by getting and setting variables inside SNMP agents through PSL functions. The following table lists the function to use for the task you want to perform:
Functions for getting and setting MIB variables
Task you want to perform | PSL function to use |
---|---|
Open a session to an SNMP agent by locating the host and creating an internal structure with default information | snmp_open() |
Close the session with SNMP agent | snmp_close() |
List SNMP sessions that are currently open, return default parameters for a specific snmp session, or alter the default settings for an SNMP session | snmp_config() |
Fetch MIB variables from an SNMP agent | snmp_get(), |
set MIB variables | snmp_set() |