The configuration file contains multiple trap definitions. Each definition specifies what set of traps are processed by the trap definition and what notification values are set for those traps. Incoming SNMP traps are matched against trap definitions in a configuration file.
The beginning of each trap definition starts with BEGIN_TRAP. Each incoming trap is identified by three fields following BEGIN_TRAP. These fields are: Enterprise OID, generic trap number, and specific trap number. The format of the first line is:
BEGIN_TRAP <enterprise> <generic_trap> <specific_trap>
Each of the fields need to be separated by either a space or a tab. The first field contains the Enterprise OID. The first six numeric values in this field are expected to conform to either the standard Enterprise (vendor) prefix of 188.8.131.52.4.1 or the standard MIB-II (generic) prefix of 184.108.40.206.2.1. However, the SNMP Trap Adapter does not restrict you to these numeric values. The first field can be any valid OID number or the string ’any’ (or *).
You can specify a range or use wildcards in the range. For example, you can specify a range as .220.127.116.11.4.1.<4-10> where the last numeric value can be within the range of 4 through 10. In the example 18.104.22.168.4.1.*, the “*” character matches any number for the last OID numeric value.
Additionally, you can list multiple OIDs at the beginning of each trap definition. Specifying multiple OIDs allows the same trap definition to be used for multiple traps. The following example demonstrates listing multiple OIDS, specifying a numeric value range, and using a wildcard:
BEGIN_TRAP .22.214.171.124.126.96.36.199.<23-40> 6 1 .188.8.131.52.4.1.6.* 6 1
Trap definitions are read from left to right. For example, suppose a configuration file includes multiple trap definitions such as:
BEGIN TRAP .184.108.40.206.5.6.* * 2 BEGIN TRAP .220.127.116.11.5.6.* 1 *
Your system receives a trap with the definition:
BEGIN TRAP .18.104.22.168.5.6.* 1 2
The trap matches both trap definitions included in the configuration file. However, because traps definitions are read from left to right, the second trap definition is used for the trap.