SNMP Configuration and Management Manual
EMS Trap Subagent
SNMP Configuration and Management Manual—424777-006
9-9
Trap Connections
You compile the filter with EMF after loading the Data Definition Language (DDL)
definitions used by the filter:
#PUSH DUMMY
#LOAD /KEEP 1, LOADED DUMMY/ $SYSTEM.ZSPIDEF.ZSPITACL
#POP DUMMY
EMF /IN source-filter/ object-filter
The source code for the event filter is in the file identified by source-filter, and the
compiled version is in the file identified by object-filter.
Trap Connections
Traps from the EMS Trap Subagent are routed to SNMP managers identified in the
SNMP agent’s TRAPDEST objects. Refer to Configuring Trap Destinations on
page 2-38 for more information on this subject.
Starting and Stopping the Subagent
With the SNMP agent running, start EMSDIST:
EMSDIST /NAME, NOWAIT/ TYPE PRINTING, FILTER object-filter, &
COLLECTOR $collector-process
The EMF-compiled version of the routing distributor filter is in the file identified by
object-filter. The collector from which events are to be taken is identified by
collector-process.
If the destination statement in the filter uses a DEFINE name, you must resolve the
name before starting EMSDIST as follows:
ADD DEFINE define-name, FILE $agent-process.#TRAP
where the qualifier .#TRAP is required.
In the following example, the DEFINE name (=_SNMP_AGENT) is in a routing
distributor filter that was compiled into a file named MYFILTER. The agent process is
named $ZSNMP, and events are to be taken from the primary EMS collector, $0.
ADD DEFINE =_SNMP_AGENT, FILE $ZSNMP.#TRAP
EMSDIST /NAME, NOWAIT/ TYPE PRINTING, FILTER MYFILTER, &
COLLECTOR $0
You can set up a TACL macro to simplify subagent invocation. Example 9-3 shows a
TACL macro that accomplishes the same thing as the two commands just shown. It
also contains an output statement that displays the name of the subagent process
started. To start the EMS Trap Subagent, simply start the macro and identify the agent
process:
RUN MYMACRO $ZSNMP