MIB Manager command-line options

MIB Manager has a command-line utility that you can use to import MIB data and export rules files. You can issue commands manually or call them programmatically.

To start the command-line utility, use the following command:
  • For Linux operating systemFor UNIX operating system$NCHOME/omnibus/bin/nco_mibmanager_batch [options]
  • For Windows operating system%NCHOME%\omnibus\bin\nco_mibmanager_batch [options]

    On Windows operating systems, the output from MIB Manager is displayed in a new console.

The following table describes the available command-line options. The -exportmibs, -exportobjects, and -exportoids options can parse regular expressions that conform with the Java pattern engine.

For Windows operating systemUse full directory paths when you specify directories. For example: nco_mibmanager_batch -importdir "C:\anydir\mibs"

Table 1. MIB Manager command-line options
Command-line option Description
-clean Use this option when you first run the MIB Manager command-line utility, if you previously used the MIB Manager graphical utility. If you do not use this option, an error is displayed.
-exportdir string Use this option to specify the directory to which generated rules files are exported. Enclose the directory path in double quotation marks (").

For example:

nco_mibmanager_batch -exportdir "/home/user/export_cmd" -filetype csv

-exportmibs string Use this option to specify the name of the MIB to be exported. You can use regular expressions to specify multiple MIBs.

For example, the following command exports objects from a MIB named RMON-MIB:

nco_mibmanager_batch -exportmibs RMON-MIB -filetype csv

The following command exports objects from all MIBs whose names contain MON:

nco_mibmanager_batch -exportmibs .*MON.* -filetype csv

-exportnewdirectory Use this option to specify that exported files are written to a new directory, within the existing export directory. The new subdirectory is automatically named with a time stamp. Use this option to ensure that existing rules files are not overwritten.

For example:

nco_mibmanager_batch -exportdir "/home/user/export_cmd" -exportnewdirectory -filetype csv

-exportobjects string Use this option to specify the name of the MIB object to be exported. You can use regular expressions to specify multiple objects.

For example, the following command exports all objects named coldStart:

nco_mibmanager_batch -exportobjects coldStart -filetype csv

The following command exports all objects whose names begin with cold:

nco_mibmanager_batch -exportobjects cold.* -filetype csv

-exportoids string Use this option to specify the OID to be exported. You can use regular expressions to specify multiple OIDs.

For example, the following command exports all objects with the OID 1.3.6.1.6.3.1.1.5.1:

nco_mibmanager_batch -exportoids 1.3.6.1.6.3.1.1.5.1 -filetype csv

The following command exports all objects whose OIDs begin with 1.3.6.1.6.3.1.1.5:

nco_mibmanager_batch -exportoids 1.3.6.1.6.3.1.1.5.* -filetype csv

The following command exports all objects with the OIDs 1.3.6.1.6.3.1.1.5.1 or 1.3.6.1.6.3.1.1.5.2:

nco_mibmanager_batch -exportoids 1.3.6.1.6.3.1.1.5.1|1.3.6.1.6.3.1.1.5.2 -filetype csv

-exportscope

ALL|TRAPS|OBJECTS

Use this option to specify which type of MIB objects are exported. This option takes the following values:
  • ALL: All MIB objects are exported.
  • TRAPS: Only traps are exported.
  • OBJECTS: Only objects are exported.

For example:

nco_mibmanager_batch -exportdir "/home/user/export_cmd" -exportnewdirectory -filetype csv -exportscope ALL

-filetype

csv|
csv_trap_objects|
html_with_frames|
html_without_frames|
lookup|ncil|nckl_1_1|
nckl_3_0|standalone|
text|
tivoli_universal_agent

Use this option to specify the file format in which the generated files are exported. This option is required for export operations.
The available parameters are as follows:
  • csv: All object data is written to CSV files.
  • csv_trap_objects: All trap data and associated variable bindings object data is written to a single CSV file.
  • html_with_frames: Creates a web page that is suitable for publishing.
  • html_without_frames: Creates a single file named oids.html that contains a list of all the objects that were selected for output.
  • lookup: Outputs all specified values in a tabbed list suitable for inclusion in any rules file.
  • ncil: Creates separate include files for each enterprise and generates a single file for generic traps.
  • nckl_1_1: Creates files suitable for use with Netcool Knowledge Library V1.1.
  • nckl_3_0: Creates files suitable for use with Netcool Knowledge Library V3.x.
  • standalone: Creates a single rules file that contains all the selected traps.
  • text: Creates a separate text file for each OID.
  • tivoli_universal_agent: Creates .mdl and trapcnfg files.
-help Use this option to display help information about the command-line options.
-importdir string Use this option to specify the directory from which MIB files are imported. Enclose the directory path in double quotation marks (").

For example:

nco_mibmanager_batch -importdir "/home/user/mibs"

-importdirtraverse Use this option to specify that MIB Manager traverses subdirectories when it is searching for MIB files to import.

For example:

nco_mibmanager_batch -importdir "/home/user/mibs" -importdirtraverse

-messagelevel

ERROR|WARN|
INFO|DEBUG|VERBOSE|NONE

Use this option to specify the level of message logging. This option takes the following values:
  • ERROR: Only error messages are logged.
  • WARN: Warning and error messages are logged.
  • INFO: Information, warning, and critical messages are logged.
  • DEBUG: All messages are logged.
  • VERBOSE: Verbose messages include the state of variables, arrays, and hashes as they change value and state.
  • NONE: No messages are logged.
-messagelog string Use this option to specify the directory to which the message log file, mibmanager.log, is written. Enclose the directory path in double quotation marks (").

The default is NCHOME/omnibus/log.

-searchpath string Use this option to specify a semicolon delimited list of directories that MIB Manager can search to resolve MIB dependencies. Enclose the directory path in double quotation marks (").

For example:

nco_mibmanager_batch -importdir "/home/user/mibs" -searchpath "/home/user/mib_dependencies"

The following command searches 3 specific directories for dependencies:

nco_mibmanager_batch -importdir "/home/user/mibs" -searchpath "/home/user/mib_dependencies;/home/user/mib_other;/home/user/mib_test"