Page tree

Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

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(),
snmp_get_next(), or
snmp_walk()

You can also use snmp_h_* functions. The snmp_h_* functions accept host name instead of session and automatically open and close the session.

set MIB variables

snmp_set()

You can also use snmp_h_* functions. The snmp_h_* functions accept host name instead of session and automatically open and close the session.

Note

The snmp_h_* functions use the default port, but can be configured to use a different port.

  • No labels