|
A parser file can be created using the Trap Parser editor. Let us now create a Parser file using the Trap Parser editor. Refer the Parsing Traps section for invoking Trap Parser and understanding the various parameters available under the Match Criteria.
Click the ParserEditor button in the Trap Viewer to invoke Trap Parser.

In General tab, enter the values for the Match Criteria parameters as follows.
Generic Type: linkUp
Specific Type: 0 (because it is a Generic Trap)
Enterprise OID:
.1.3.6.1.2.11
Select the OID tab and enter the following value.
OID/Value (VarBinds):
.1.3.6.2.1.1.5.0 xyz
Select the Output Event tab. The values depicted for the parameters by default are listed below.
Severity: "-"
HelpURL: "$GenericType-$SpecificType.html"
Message: "$*"
Change the values to:
Severity: Major
Message: This is a Message
Click the Severity Color button to change the color in which the trap is visible in the trap table.
Enter the trap name in the Trap Parser Name field in the Match Criteria section and click the Add button to add the Trap Parser to the Parser list.
Add more Match Criteria for the incoming traps and click the Save button to save the current parser criteria. Save the file with the name "test". The Parser filename is displayed in the Parser File text field.
Cose the Trap Parser editor.
When you need to modify the added Trap Parser, make the changes in the Match Criteria and OutPut Event Parameters, and click the Modify button. It is essential to save the parser file again to effect the changes.
The created Parser file can also be edited manually. Refer Editing Parser File for more details.
Filtering Traps
Let us have an overview on filtering of the traps. Follow the steps to perform trap filtering.
Click the Load button in the Trap Parser editor to load the Trap Parser file.
Now, send a trap from the applications directory of the AdventNet SNMP API package with the following command.
|
java sendtrap localhost .1.3.6.1.2.11 localhost 3 0 1000 |
On receiving the trap, the trap is parsed and checked if it matches the criteria specified in the 'test' parser file. This trap is received because it conforms to the match criteria.
Adding Trap Definition from Any MIB file to a Parser File
To add a trap definition from any MIB file to a parser file, select the MIB file by clicking the Load button. The parameters are displayed automatically with their respective definitions in the Match Criteria and Output Event parameters sections.
|