SNMP Configuration and Management Manual
EMS Trap Subagent
SNMP Configuration and Management Manual—424777-006
9-8
Configuration
Configuration
Before using the EMS Trap Subagent, you need to create an event filter and might 
need to configure trap connections. This subsection describes these operations.
Event Filter
The EMS Trap Subagent uses an event filter known as a routing distributor filter to 
determine where to route trap messages. The filter contains a destination statement 
that identifies the SNMP agent as the routing destination. The filter can also contain 
specifications for selecting events to convert into traps. Refer to the EMS Manual for 
information on how to encode and install routing distributor filters.
Example 9-2 shows the source code for an event filter that selects and passes all 
events generated by HP subsystems. This example filter also provides, as part of the 
routing destination statement, a DEFINE name (=_SNMP_AGENT) to identify the 
SNMP agent. The DEFINE name, which circumvents hard coding of an agent process 
name, is resolved at run time, as in Starting and Stopping the Subagent on page 9-9. 
The lines shown in bold type contain the event-selection specifications.
Note. See the Operator Messages Manual for the names, numbers, and descriptions of 
supported subsystems.
Example 9-2. Example Routing Distributor Filter
 filter MYFILTER;
 begin
 destination
 rid 1,
 type process,
 name =_snmp_agent,
 format off;
 [#def ssid^structure struct begin
 char z^owner(0:7);
 int z^number;
 int z^version;
 end;]
 == only pass events from these subsystems:
 == CPU=15 IPB=16 DISK=31 STORAGE=189
 if zspi^tkn^ssid.ssid^structure:z^owner = "TANDEM" and
 (zspi^tkn^ssid.ssid^structure:z^number = 15 or
 zspi^tkn^ssid.ssid^structure:z^number = 16 or
 zspi^tkn^ssid.ssid^structure:z^number = 31 or
 zspi^tkn^ssid.ssid^structure:z^number = 189)
 then pass ,1;
 end;










