Follow

How to generate a rule file template from a MIB

Requirements

  • net-snmp-utils (net-snmp for Windows) binary downloaded and installed in order to utilize snmptranslate.

    Linux
    yum install net-snmp-utils

    Windows (The default components of the install package should be sufficient)
    http://www.net-snmp.org/download.html


  • Linux
    perl-CGI package installed in order to have access to the CGI::Carp module

 

Step 1

Place the MIB that contains trap information and any dependency MIBs (e.g. CISCO-SMI.MIB) into the <TRAVERSE_HOME>/plugin/mibs directory

 

Step 2

Open a command prompt and navigate to <TRAVERSE_HOME>/plugin/mibs

cd <TRAVERSE_HOME>/plugin/mibs

 

Step 3

Run <TRAVERSE_HOME>/utils/trap2xml.pl with the -i and -o parameter, where -i is the input and -o is the output xml of the rule file. Basic trap rule generation only requires -i and -o, please see notes below for further adjustments.

E.g.
<TRAVERSE_HOME>/utils/trap2xml.pl -i FILE.mib -o /tmp/50_rule_trap_file.xml

 

Step 4

Deploy the new rule file

 

Notes:

  • By default, all generated rules within the file are 'accepted', assigned a 'critical' severity, show on the event console, and have an auto-clear of '900' seconds. Please see the -s (--state) parameter under the usage (trap2xml -h)
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.