nnmcommload.ovpl — load communication settings from a comma separated file
nnmcommload.ovpl
[-u
username
] [-p
password
] [-jndiHost
hostname
] [-jndiPort
port
Default is 1099] -file
<filepath
| filename
>
Use the nnmcommload.ovpl
script to import communication settings for a group of devices
in bulk. This is useful if the community strings are managed by a change control mechanism. You can bulk insert the assignments
into NNMi. Depending upon the format of the data entered in the configuration file, each assignment will show up in the NNMi console
as either an individual entry in the Regions
or Specific Node Settings
tab
of the Communication Configuration
dialog.
If you specify hostnames as IP addresses, the nnmcommload.ovpl
script
does not resolve the IP addresses to fully qualified names. If you specify actual hostnames, the nnmcommload.ovpl
script resolves the hostnames to their fully qualified names using DNS. This can take some time to work through large import files.
For files containing more than 500 lines, the nnmcommload.ovpl
script saves the entries to the database in batches of 500.
After the nnmcommload.ovpl
script reads 500 lines from the import file, the SNMP configuration entries for those
lines will be resolved based on any existing SNMP region or default settings and saved to the database.
To perform the import, create a text file that includes the information shown below.
Create one line for each device. Within each line, add the information in the order shown in the list below.
Separate each value with a comma. Enter comments in lines that start with a number (#
) character.
The nnmcommload.ovpl
script interprets the data strictly by position within the line,
so you must specify a comma as a placeholder for non-specified values. You can embed commas by quoting the string.
For example: "comm,string"
Target node name or IP address (required for Specific Node Setting configuration)
One or more Hostname Filters separated by ";;" (optional for Region configuration)
Single Read community string (optional for Specific Node Setting configuration)
One or more read community strings separated by ";;" (optional for Region configuration)
If community string priority is desired, append the string "#PRI#" followed by the priority to each region community string. For example "public#PRI#5" would assign a priority of 5 to community string "public"
Management address (optional for Specific Node Setting configuration)
One or more address ranges separated by ";;" (optional for Region configuration)
Write community string (optional)
Timeout in milliseconds (optional)
Number of retries (optional)
Port (optional)
Proxy address (optional)
Proxy port (optional)
User name (SNMP V3 optional for Specific Node Setting Configuration)
One or more User Names separated by ";;" (SNMP V3 optional for Region Configuration)
Context name (SNMP V3 optional for Specific Node Setting Configuration)
One or more Context Names separated by ";;" (SNMP V3 optional for Region Configuration)
Authentication protocol (SNMP V3 optional for Specific Node Setting Configuration - MD5|SHA)
One or more Authentication Protocols separated by ";;" (SNMP V3 optional for Region Configuration)
Authentication password (SNMP V3 optional for Specific Node Setting Configuration)
One or more Authentication Passwords separated by ";;" (SNMP V3 optional for Region Configuration)
Privacy protocol (SNMP V3 optional for Specific Node Setting Configuration - DES|3DES|AES|AES192|AES256)
One or more Privacy Protocols separated by ";;" (SNMP V3 optional for Region Configuration)
Privacy password (SNMP V3 optional for Specific Node Setting Configuration)
One or more Privacy Passwords separated by ";;" (SNMP V3 optional for Region Configuration)
Preferred SNMP version (optional - 1|2|3 for Specific Node Setting Configuration only)
Enable SNMP Communication flag (optional - true|false)
Enable SNMP Address Rediscovery flag (optional - true|false)
Enable SNMP GetBulk flag (optional - true|false)
Description (optional for either Specific Node Setting or Region Configuration)
Enable ICMP Communication flag (optional - true|false)
ICMP Timeout in milliseconds (optional)
ICMP Number of retries (optional)
Device Credential User Name(optional for Specific Node Setting Configuration)
One or more Device Credential User Names separated by ";;" (optional for Region Configuration)
Device Credential Password (optional for Specific Node Setting Configuration)
One or more Device Credential Passwords separated by ";;" (optional for Region Configuration)
Device Credential Type (optional for Specific Node Setting Configuration)
One or more Device Credential Types separated by ";;" (optional for Region Configuration) Currently the only type supported is "Shell". There can only be one configuration per type per region
Region Name (Optional for Region Configuration - Defaulted to "Region" + Ordering, e.g. Region15)
Region Ordering (Optional for Region Configuration - Defaulted to 1 greater than the current max ordering value for existing regions)
Minimum SNMP Security Level (Optional for Region Configuration - V1-ONLY|V1V2-ONLY|COMMUNITY|NOAUTH-NOPRIV|AUTH-NOPRIV|AUTH-PRIV) If not specified, defaulted to value of COMMUNITY
For example, all of the following entries are considered valid entries for loading a Specific Node Configuration:
hostname
hostname,
hostname,,
hostname,public
hostname,,10.2.2.3,,1000,2,161
node1,community,10.3.7.96,writecommunity
node2, community,10.3.7.95
(the
space character before community will be removed)
10.2.23.34,community,10.2.23.8
10.2.23.34,community,10.2.23.88,writecommunity,2000,2,161,10.56.22.199,162
Here's an example for loading a Region Configuration with multiple hostname filters, address ranges, read community strings, SNMPv3 configurations, and device credentials. Note also the community string priority being assigned.
testv3*;;cisco*.fc.usa.hp.com, public;;readcommunity#PRI#1, 3.3.3.3;;4.4.4.4, writecommunity, 3333,3,161,7.7.7.7,777,v3User1;;v3User2,v3Context1;;v3Context2,MD5;;SHA,authPass1;;authPass2,AES;;DES,privPass1;;privPass2,3,true,T,T,my region description,T,3,3,user1,password1,shell,myregion,10,Community
Here's another example for loading a Region Configuration with multiple SNMPv3 configurations. Only the V3 and region parameters are specified.
v3User1 is a No Authentication/No Privacy user
v3User2 has MD5 Authentication and No Privacy
v3User3 has SHA Authentication and 3DES Privacy
Note how the ";;" separators are used to skip specifying authentication and privacy information where appropriate
,,,,,,,,,v3User1;;v3User2;;v3User3,v3Context1;;;;v3Context3,;;MD5;;SHA,;;authPass2;;authPass3,;;;;3DES,;;;;privPass3,3,,,,,,,,,,,myregion,10,Community
nnmcommload.ovpl
recognizes the following options.
-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
(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
(optional)
The jboss application server port. If you do not specify this port, the nnmcommload.ovpl
script
uses 1099 as the default value.
-file
(required)
A file name or full path to a file created with the format described above containing the data to be loaded.
nnmcommload.ovpl -u joe -p secret -file C:\temp\import.txt
nnmcommload.ovpl -u joe -p secret -file /tmp/import.txt
nnmcommload.ovpl -u joe -p secret -jndiHost myserver -jndiPort 1117 -file import.txt
nnmcommload.ovpl
resides in the following location:
Windows: %NNM_BIN%\nnmcommload.ovpl
UNIX: $NNM_BIN/nnmcommload.ovpl