Name

nnmloadmib.ovpl — load and unload SNMP MIBs

SYNOPSIS

nnmloadmib.ovpl [ [-load mib-file] [-unload mib module[:mib module...]] [-list] [-u username] [-p password] [-jndiHost hostname] [-jndiPort port Default is 1099] ]

DESCRIPTION

nnmloadmib.ovpl is a script that loads an SNMP Management Information Base (MIB) in the Internet Structure of Management Information (SMI) format into NNMi. NNMi applications use this MIB information when converting SNMP Object Identifiers (OIDs) from numeric to human readable text. Load any new MIB information into NNMi before using the NNMi console to create a MIB expression that relies on the newly loaded MIB information. NNMi supports SMI Version 1 (RFC1155, 1212, 1215) and SMI Version 2 (RFC2578) SMI formats.

The nnmloadmib.ovpl script compiles and loads MIB modules for use by NNMi applications and stores the resulting information in the NNMi database.

To load corresponding NNMi Incident Configuration for TRAP-TYPE and NOTIFICATION-TYPE macros from a MIB, use the nnmincidentcfg.ovpl script after using the nnmloadmib.ovpl script to load the MIB into the NNMi MIB database.

Parameters

The nnmloadmib.ovpl script supports the following parameters:

-load mib-file

Load the contents of the mib-file file into the MIB database.

Note: HP recommends copying the mib-file file to the $NNM_DATA/shared/nnm/user-snmp-mibs (UNIX) or %NNM_DATA%\shared\nnm\user-snmp-mibs (Windows) directory (or a child directory) before running the nnmloadmib.ovpl script. Copying the mib-file file in this way enables the Actions > Display MIB File menu and the -list option to locate the original MIB file.

-unload mib module[:mib module...]

Unload the list of MIB modules from the MIB database, where mib module is the name of a MIB module that has been loaded into the MIB database.

-list

Lists the MIBs loaded in the database.

This option does not require the user to provide a username and password.

-u <username>

Supply the NNMi administrator username to run the script. This script requires the NNMi administrator username unless you use an nnm.properties file. See the nnm.properties.4 reference page for more information.

-p <password>

Supply the NNMi administrator password to run the script. This script requires the NNMi administrator password unless you use an nnm.properties file. See the nnm.properties.4 reference page for more information.

-jndiHost<jndiHost> (optional)

The hostname of the server running the jboss application server. If you do not specify a hostname, the nnmcommload.ovpl script uses localhost as the default value.

-jndiPort<jndiPort> (optional)

The jboss application server port. If you do not specify this port, the nnmcommload.ovpl script uses 1099 as the default value.

Loading/Unloading Validation

When loading and unloading MIBs all of the existing MIBs that have been loaded are parsed to ensure that the load/unload operation will pass given the current state. This may result in warnings being displayed (such as overlapping OIDs) that my be unrelated to the given MIB being loaded or unloaded. As long as a successful status is returned from the command line invocation, all is well and these warnings can be ignored.

Syntax of MIB Files

Most of the relevant syntax for MIB files is described in RFC documents. See the "SEE ALSO" section of this reference page (and the UNIX manpage).

Diagnostics

The nnmloadmib.ovpl script returns the following exit codes:

0

The script ran successfully.

1

Invalid command-line usage.

20

An unexpected exception occurred after running the script.

21

You were not permitted to run the script with the credentials you supplied.

22

The script detected a syntax error in the MIB file, or there was a failure to load the MIB due to a service failure.

23

You used an illegal argument - typically you typed an option such as -load without including the required file name.

24

The script could not communicate with the mib loader service running in NNMi.

25

You did not supply any arguments. This script requires you to supply several arguments

27

NNMi is available, but the mib loader service is not resolvable.

30

The list operation failed due to database issues.

When the nnmloadmib.ovpl command fails, it will display a descriptive error message to help diagnose and fix potential problems with the MIB. All error messages have a similar format:

SEVERITY: MESSAGE FILENAME:LINE_NUMBER:COLUMN_NUMBER: DETAIL_MESSAGE

Below are some common failures and recommended fixes for each.

ERROR: Cannot find symbol file:///tmp/CHECKPOINT-MIB.mib:2620:16:cpvTNlMonCurrAddr

The symbol name listed was either not found as a declaration in the MIB being loaded, or it is not listed as an import at the top of the MIB definition. This could be caused by a typo in the symbol name or a missing import delaration.

ERROR: Cannot find symbol file:///var/opt/OV/shared/nnm/user-snmp-mibs/example.mib:Line 13233: Column 16:COUNTER64

In order to properly load MIB files in NNMi, MIB files must be compliant with either the SNMP SMI v1 or SMI v2 standards, RFC1155 or RFC2578. Special consideration needs to be taken for case sensitive scenarios and the importing of objects from the correct defining MIB. In some cases, MIBs that used to load correctly on older versions of NNMi may need to be amended. A common example is the erroneous use of COUNTER64 instead of the correct definition of Counter64 for example scenarios such as "SYNTAX COUNTER64" which needs to be changed to "SYNTAX Counter64".

ERROR: Found symbol file:///tmp/CHECKPOINT-MIB.mib:3509:27:routingDest but expected a class org.jsmiparser.smi.SmiType instead of class org.jsmiparser.smi.SmiVariable

The symbol name listed is not of the expected type. In this case, an SMI type was expected, but a MIB variable name was provided instead. The solution in this particular case was to specify the correct SMI type, which was IPAddress.

ERROR: Cannot find module file:///tmp/rfc1472-PPP-SEC-MIB.mib:9:26:PPP-LCP-MIB

This error indicates that the specified MIB module, which is listed as an import, has not been loaded, and the parser cannot follow the import as a result. The solution is to load the referenced MIB first.

ERROR: Parse error: unexpected token: --#

NNMi supports some custom trap message formatting information that can be specified in a TRAP-TYPE or NOTIFICATION-TYPE macro definition. The following are valid values:

--#TYPE --#SUMMARY --#ARGUMENTS --#SEVERITY --#GENERIC --#CATEGORY --#SOURCE_ID --#TIMEINDEX --#HELP --#HELPTAG --#STATE

This error indicates you have invalid keyword following the --#, or a sequence of keywords that NNMi does not expect. To correct this problem, remove any --# entries that do not correspond to the above list, or add an extra comment character sequence (--) to the beginning of the line.

EXAMPLES

To load the $NNM_DATA/shared/nnm/user-snmp-mibs/corp.mib MIB file, run the nnmloadmib.ovpl script as follows:

nnmloadmib.ovpl -load $NNM_DATA/shared/nnm/user-snmp-mibs/corp.mib -u user -p password

To list the loaded MIBs, run the nnmloadmib.ovpl script as follows::

nnmloadmib.ovpl -list -u user -p password

AUTHOR

nnmloadmib.ovpl was developed by Hewlett Packard Enterprise.

FILES

Windows: %NnmInstallDir%\misc\nnm\snmp-mibs\*

Windows: %NnmDataDir%\shared\nnm\user-snmp-mibs/*

UNIX:$NnmInstallDir/misc/nnm/snmp-mibs/*

UNIX:$NnmDataDir/shared/nnm/user-snmp-mibs/*

SEE ALSO

RFC 2578 Structure of Management Information Version 2 (SMIv2)

RFCs 1155, 1212, 1215: SNMP Version 1 Structure of Management Information

RFCs 1902, 1903, 1904: SNMP Version 2 Structure of Management Information

nnmincidentcfg.ovpl(1M),

nnmsnmpwalk.ovpl(1M).

Return to Reference Pages Index