Fault

Introduction

Learn how to use the following applications provided by the Oracle Communications Unified Assurance COM SDK:

Note:

Before running the applications, ensure that you have all the required MIB dependencies. If you are missing any MIBs, the FCOM generation will likely fail.

See Foundation Rules and Device Support Overview for more information.

Generating the FCOM Definition Files, Rules Files, and Tests

To generate the FCOM definition files, rules files, and tests:

  1. On Oracle Linux 8 systems, add the Net-SNMP libraries to the $LD_LIBRARY_PATH environment variable by running the following command:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$A1BASEDIR/vendor/net-snmp/lib
    
  2. Convert MIB files to FCOM files by running one of the following commands:

    • To convert a single MIB file:

      $A1BASEDIR/bin/sdk/MIB2FCOM --in=<MIB_name>.mib --out=<MIB_name>-FCOM.json --use_parent_mibs
      

      where <MIB_name> is the name of the MIB you are converting, such as ZXDUMIB.

    • To convert all MIBs that contain traps in a single directory , put your temporary working files into a subdirectory of $A1BASEDIR/distrib/mibs, and run the following command from that subdirectory:

      $A1BASEDIR/bin/sdk/MIB2FCOM --in=. --out=<MIB_type_name>-FCOM.json --use_parent_mibs
      

      where <MIB_type_name> is the name of the type of MIBs you are converting, such as NET-SNMP.

      This option is useful when you have many dependencies and you want to keep your working directories clean.

  3. Open the FCOM JSON file in a text editor and curate it. See FCOM Curation for details about which fields can be curated.

    Note:

    Oracle recommends working with the MIB files open in a MIB browser during curation to use as a contextual reference.

  4. Convert the curated FCOM file to a foundation rules file by running the following command:

    $A1BASEDIR/bin/sdk/FCOM2Rules <MIB_name>.json >> <MIB_name>.foundationrules
    

    The application prints to the standard output, which lets you verify the code before writing it to the file.

  5. Generate the test file by running the following command:

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

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

  6. Upload the Foundation rules file to Unified Assurance:

    1. In a browser, log in to the Unified Assurance UI.

    2. From the Configuration menu, select Rules.

    3. Expand the following folders: path and select the trap folder:

      Core Rules (core)/Default read-write branch (default)/collection/event

    4. Select the trap folder.

    5. If a custom folder does not already appear under the trap folder, add one.

    6. Select the custom folder.

    7. On the menu bar, click Upload.

    8. Enter a name and browse to select the <MIB_name>.foundationrules file.

    9. Click Submit.

    10. Restart the Event Trap Aggregator service.

  7. In the command line, set the environment variables for the tests by running the following commands:

    export BASEDIR=<Devices_or_MIBs_directory>
    export HOSTFQDN=<Testing_host_FQDN>
    

    where <Devices_or_MIBs_Repository> is the devices repository or directory containing MIBs and <Testing_host_FQDN> is the FQDN or IP of the Unified Assurance server you will use for testing.

  8. Run the <MIB_name>.test.sh file.

  9. Review the events that are appearing on the Event List in the UI. If necessary, repeat the FCOM curation process to correct any issues until no more appear.

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: