How to generate a rule file template from a MIB


How to generate a rule file template from a MIB?




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

    yum install net-snmp-utils

    Windows (The default components of the install package should be sufficient)

  • 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/ 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.

<TRAVERSE_HOME>/utils/ -i FILE.mib -o /tmp/50_rule_trap_file.xml

Please note the file 50_rule_trap_file.xml can be named however you wish, but it is a requirement to have the file named in the format "50_rule_trap_XYZ.xml". The '50' dictates the order in which it is read by the message handler. I.e. 49_rule_trap_file.xml will take precedent over 50_rule_trap_file.xml when processing rules.

Step 4

Deploy the new rule file


  • 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)


All versions of Traverse

Have more questions?

Contact us

Was this article helpful?
0 out of 0 found this helpful

Provide feedback for the Documentation team!

Browse this section