Administer > Configure Incidents > Manage Incoming SNMP Traps > Load SNMP Trap Incident Configurations > Load SNMP Trap Incident Configurations using the Command Line

Load SNMP Trap Incident Configurations from the Command Line

Tip If you do not want to enter an NNMi User Name attribute value and an NNMi Password attribute value at the command line, you can use the nnmsetcmduserpw.ovpl command to specify the valid user name and password (instead of -u and -p). The credentials set using the nnmsetcmduserpw.ovpl command are valid for command execution by the same user. See Set Up Command Line Access to NNMi for more information.

The NNMi nnmincidentcfg.ovpl script provides a way for you to create or update an Incident Configuration for an SNMP trap using a MIB module that was previously loaded into the NNMi database using the nnmloadmib.ovpl script with the -load option. To load a MIB module you can use the following syntax:

nnmincidentcfg.ovpl -loadTraps <mib_module_name> -disableAllTraps true|false -u <NNMiadminUsername> -p <NNMiadminPassword>

Note See nnmincidentcfg.ovpl for more information, including a complete list of the valid script arguments.

nnmincidentcfg.ovpl Arguments
Argument Description
-loadTraps <mib_module_name>

Used to load the traps from the specified MIB module you want to use to create or update the incident configuration for an SNMP trap.

Tip MIB modules are loaded from MIB files using the nnmloadmib.ovpl script. To see what MIB modules are loaded, use the nnmloadmib.ovpl script with the -list option.

NNMi uses information from the trap definitions (TRAP-TYPES macro) or notification (NOTIFICATION-TYPES macro) in the MIB module for the required incident configuration.

-disableAllTraps

Specifies whether all trap definitions specified using -loadTraps <mib_module_name> should be loaded as disabled.

Note The  default value is false. This means that by default all trap definitions specified in <mib_module_name> are loaded as enabled. Set this parameter to true to disable the trap definitions that you are loading.

-u

The NNMi user name. This User Account must be assigned to the NNMi Administrators User Group.

Note The user name might be a Principal object stored in the NNMi database or might be from Lightweight Directory Access Protocol (LDAP) or X.509 Certificates such as Public Key Infrastructure (PKI) user authentication in your environment. See Choose a Mode for NNMi Access.

-p

The password associated with the NNMi account.

If you do not want to enter an NNMi User Name attribute value and an NNMi Password attribute value at the command line, you can use the nnmsetcmduserpw.ovpl command to specify the valid user name and password (instead of -u and -p). The credentials set using the nnmsetcmduserpw.ovpl command are valid for command execution by the same user.

For example, to load the MIB module CISCO-VTP-MIB, you might enter the following:

nnmincidentcfg.ovpl -loadTraps "CISCO-VTP-MIB"

If the incident is already configured, NNMi performs an update based on the MIB file information. If the incident is not configured, NNMi creates a new incident configuration entry for the SNMP trap. See Configure SNMP Trap Incidents for information about changing an SNMP trap configuration.