Fault

Introduction

The MIB2FCOM application in the SDK lets you generate an initial FCOM definition file from the provided MIB files. Please make sure that you have all of the required MIB dependencies before you proceed. The FCOM2Rules application lets you generate a foundation rules file from the presented FCOM file. The FCOM2Test application lets you generate a set of synthetic test traps to test the workflow of the curated FCOM. The following are the general steps to create an FCOM definition file and then generate a foundation rules file.

Convert the MIB File to FCOM

Run MIB2FCOM to convert the MIB file into an FCOM file. Application use is straightforward; you only need the input file and the name of the desired output file. Or, if desired you can pass in the name of a directory containing MIBs, and MIB2FCOM will run through all the MIBs in the directory and produce FCOM files for all the MIBs in the directory that contain traps.

WARNING:

Make sure you have all dependency MIBs at this stage as any missing MIBs will likely result in a conversion failure.

Usage Example (single MIB file):

$A1BASEDIR/bin/sdk/MIB2FCOM --in=ZXDUMIB.mib --out=ZXDUMIB-FCOM.json --use_parent_mibs

Usage Example (directory containing MIBs):

In the following example, the current working directory is a sub-directory of $A1BASEDIR/distrib/mibs which contains the NET-SNMP collection of MIBs.

$A1BASEDIR/bin/sdk/MIB2FCOM --in=. --out=NET-SNMP-FCOM.json --use_parent_mibs

Note:

If there are many dependencies and you want to keep your working directories clean, you can put your temporary work files into a subdirectory of $A1BASEDIR/distrib/mibs/ and use the "--use_parent_mibs" command line option to use the subdirectory.

Curate the FCOM file

Open the FCOM file that you created in a text editor and start the curation process. See the FCOM Curation section for additional information.

Note:

It is highly recommended to have the MIB files you are working on opened in a MIB browser during the curation process to use it as a contextual reference.

Generate the Foundation Rules File

Run FCOM2Rules to convert the FCOM file into foundation rules. The application prints to the standard output so you can visually verify the code before writing it to the file.

Usage example:

$A1BASEDIR/bin/sdk/FCOM2Rules ZXDUMIB-FCOM.json >> ZXDUMIB.foundationrules

Generate the Test File

Run FCOM2Test to generate the FCOM test file. The application prints to the standard output, which lets you verify the tests before writing to a file. The application will generate tests based on the "test/tests" fields from the FCOM.

Usage example:

$A1BASEDIR/bin/sdk/FCOM2Test ZXDUMIB-FCOM.json >> ZXDUMIB.test.sh

Note:

Before running the tests, make sure that the following environmental variables are exported:

export BASEDIR=<Devices repository directory or directory containing MIBs>
export HOSTFQDN=<FQDN or IP of the target Unified Assurance server used for testing>

Upload the Foundation Rules File

  1. Upload the generated foundation rules file into the Rules UI:

    Configuration -> Rules

    The file should be uploaded to the following location:

    Core Rules (core) -> Default read-write branch (default) -> collection -> event -> trap -> custom

  2. Restart the Event Trap Aggregator service.

  3. Run the generated <Device>.test.sh file and verify the Events that are appearing on the Event List. Review the results. If necessary, go back through the FCOM curation process to correct any issues you found during your review process. Repeat until done.

FCOM Curation

Fields that you can modify are marked with an asterisk ( * ). Other fields that are not marked should not be modified during the curation process.

Preprocessors

FCOM Runtime Variables

The following variables are exposed by Trapd for FCOM during runtime, and are available for the user to use in the curation process: