Name

nnmcommunication.sh — Allows management of communication settings.

SYNOPSIS

nnmcommunication.sh -?

nnmcommunication.sh addCertificate (-default|-region (<name>|<uuid>)| -nodeSetting (<name>|<uuid>)) (-cert <cert_file>)

nnmcommunication.sh addCommunity (-default|-region <region>) -community <value> [-ordering <order>]

nnmcommunication.sh addCredential (-default|-region <region>|-nodeSetting <nodeName>) -type (SHELL|VMWARE) -username <username> -password <password>

nnmcommunication.sh addSnmpV3Setting (-default | -region (<name>|<uuid>)) -snmpV3Setting (<name>|<uuid>)

nnmcommunication.sh createAddressRange [-uuid <uuid>] -region <region> -range <ip_range>

nnmcommunication.sh createHostnameFilter -hostname <pattern> -region <region> [-uuid <uuid>]

nnmcommunication.sh createNodeSettings -name <name> [-addressDiscovery (true|false)] [-description <description>] [-icmpEnabled (true|false)] [-icmpRetries <number>] [-icmpTimeout <timeout>] [-managementAddress <ip>] [-shellCredential <credential>] [-shellUser <username>] [-vmWareCredential <credential>] [-vmWareUser <username>] [-snmpCommunity <string>] [-snmpEnabled (true|false)] [-snmpGetBulk (true|false)] [-snmpPort <port>] [-snmpPreferredVersion (V1|V2C|V3)] [-snmpProxyAddress <ip>] [-snmpProxyPort <port>] [-snmpRetries <number>] [-snmpTimeout <timeout>] [-snmpV3Setting (<name>|<uuid>)] [-snmpWriteCommunity <community_string>] [-uuid <uuid>]

nnmcommunication.sh createRegionSettings -name <name> -ordering <order> [-addressDiscovery (true|false)] [-addressFilter <filter>] [-description <description>] [-hostnameFilter <filter>] [-icmpEnabled (true|false)] [-icmpRetries <number>] [-icmpTimeout <timeout>] [-name <name>] [-ordering <integer>] [-shellCredential <credential>] [-shellUser <username>] [-vmWareCredential <credential>] [-vmWareUser <username>] [-snmpCommunities <strings>] [-snmpEnabled (true|false)] [-snmpGetBulk (true|false)] [-snmpPort <port>] [-snmpPreferredVersion (V1|V2C|V3)] [-snmpProxyAddress <ip>] [-snmpProxyPort <port>] [-snmpRetries <number>] [-snmpSecurityLevel (COMMUNITY_ONLY|COMMUNITY|NO_AUTH_NO_PRIV|AUTH_NO_PRIV|AUTH_PRIV|COMMUNITY_ONLY_V1)] [-snmpTimeout <timeout>] [-snmpV3Settings (<name>|<uuid>)] [-snmpWriteCommunity <community_string>] [-uuid <uuid>]

nnmcommunication.sh createSnmpV3Settings -name <name> [-authPass <string>] [-authProtocol (HMAC_MD5_96|HMAC_SHA_1)] [-contextName <string>] [-name <name>] [-privPass <string>] [-privProtocol (DES_CBC|TripleDES|AES_128|AES_192|AES_256)] [-username <name>] [-uuid <uuid>]

nnmcommunication.sh delete (-region <region>| -nodeSetting <nodeSetting>| -snmpV3Setting <v3Setting>)

nnmcommunication.sh deleteAddressRange (-region (<name>|<uuid>) | -range <ip_range> | -uuid <uuid>)

nnmcommunication.sh deleteHostnameFilter (-hostname <pattern> -region <region> | -uuid <uuid>)

nnmcommunication.sh listAddressRanges [-range <ip_range>] [-region (<name>|<uuid>)] [-uuid <uuid>]

nnmcommunication.sh listCertificates (-default|-region (<name>|<uuid>)|-nodeSetting (<name>|<uuid>))

nnmcommunication.sh listCommunities (-default|-region <region> | -nodeSetting <node>)

nnmcommunication.sh listDefaults

nnmcommunication.sh listCredentials (-default|-region <region>|-nodeSetting <nodeName>) [-type (SHELL|VMWARE)]

nnmcommunication.sh listEffective -node <node>

nnmcommunication.sh listHostnameFilters (-hostname <pattern> -region <region>) | (-uuid <uuid>)

nnmcommunication.sh listNodeSettings -name <name>

nnmcommunication.sh listRegionSettings [-name <name>]

nnmcommunication.sh listSnmpAgentSettings [-node (<name>|<uuid>)]

nnmcommunication.sh listSnmpV3Settings [(-name <name>|-uuid <uuid>)]

nnmcommunication.sh listWebAgentSettings [-node (<name>|<uuid>)]

nnmcommunication.sh removeCertificate (-default|-region (<name>|<uuid>)|-nodeSetting (<name>|<uuid>)) (-uuid <uuid>|-subjectDN <subjectDN>| -fingerPrint <fingerPrint>|-serialNumber <serialNumber>)

nnmcommunication.sh removeCommunity (-default|-region <region>) (-community <value>|-ordering <order>) -uuid <uuid>: The object unique identifier.

nnmcommunication.sh removeCredential (-default|-region <region>|-nodeSetting <nodeName>) -type (SHELL|VMWARE) [-username <username>]

nnmcommunication.sh removeSnmpV3Setting (-default | -region (<name>|<uuid>)) -snmpV3Setting (<name>|<uuid>)

nnmcommunication.sh updateCredential (-default|-region <region>|-nodeSetting <nodeName>) -type (SHELL|VMWARE) (-username <username>|-password <password>)

nnmcommunication.sh updateDefaults [-addressDiscovery (true|false)] [-default] [-icmpEnabled (true|false)] [-icmpRetries <number>] [-icmpTimeout <timeout>] [-interfaceMatcher <value>] [-managementAddressSelection <ALG1,ALG2,ALG3>] [-preferIPVersion (IPv4|IPv6|IPAny)] [-shellCredential <credential>] [-shellUser <username>] [-snmpCommunities <strings>] [-snmpEnabled (true|false)] [-snmpGetBulk (true|false)] [-snmpPort <port>] [-snmpPreferredVersion (V1|V2C|V3)] [-snmpProxyAddress <ip>] [-snmpProxyPort <port>] [-snmpRetries <number>] [-snmpSecurityLevel (COMMUNITY_ONLY|COMMUNITY|NO_AUTH_NO_PRIV|AUTH_NO_PRIV|AUTH_PRIV|COMMUNITY_ONLY_V1)] [-snmpTimeout <timeout>] [-snmpV3Settings (<name>|<uuid>)] [-snmpWriteCommunity <community_string>]

nnmcommunication.sh updateSnmpAgentSettings -node (<name> | <uuid>) [-address <ip>] [-community <string>] [-enabled (true|false)] [-mode (AUTO|LOCKED)] [-port <port>] [-retries <integer>] [-snmpProxyAddress <ip>] [-snmpProxyPort <port>] [-timeout <duration>] [-version (V1|V2C|V3)] [-writeCommunity <string>]

nnmcommunication.sh updateNodeSettings -nodeSetting (<name>|<uuid>) [-addressDiscovery (true|false)] [-description <description>] [-icmpEnabled (true|false)] [-icmpRetries <number>] [-icmpTimeout <timeout>] [-managementAddress <ip>] [-name <name>] [-shellCredential <credential>] [-shellUser <username>] [-vmWareCredential <credential>] [-vmWareUser <username>] [-snmpCommunity <string>] [-snmpEnabled (true|false)] [-snmpGetBulk (true|false)] [-snmpPort <port>] [-snmpPreferredVersion (V1|V2C|V3)] [-snmpProxyAddress <ip>] [-snmpProxyPort <port>] [-snmpRetries <number>] [-snmpTimeout <timeout>] [-snmpV3Setting (<name>|<uuid>)] [-snmpWriteCommunity <community_string>]

nnmcommunication.sh updateRegionSettings -region (<name>|<uuid>) [-addressDiscovery (true|false)] [-addressFilter <filter>] [-description <description>] [-hostnameFilter <filter>] [-icmpEnabled (true|false)] [-icmpRetries <number>] [-icmpTimeout <timeout>] [-name <name>] [-ordering <integer>] [-shellCredential <credential>] [-shellUser <username>] [-vmWareCredential <credential>] [-vmWareUser <username>] [-snmpCommunities <strings>] [-snmpEnabled (true|false)] [-snmpGetBulk (true|false)] [-snmpPort <port>] [-snmpPreferredVersion (V1|V2C|V3)] [-snmpProxyAddress <ip>] [-snmpProxyPort <port>] [-snmpRetries <number>] [-snmpSecurityLevel (COMMUNITY_ONLY|COMMUNITY|NO_AUTH_NO_PRIV|AUTH_NO_PRIV|AUTH_PRIV|COMMUNITY_ONLY_V1)] [-snmpTimeout <timeout>] [-snmpV3Settings (<name>|<uuid>)] [-snmpWriteCommunity <community_string>]

nnmcommunication.sh updateSnmpV3Setting -snmpV3Setting (<name>|<uuid>) [-authPass <string>] [-authProtocol (HMAC_MD5_96|HMAC_SHA_1)] [-contextName <string>] [-name <name>] [-privPass <string>] [-privProtocol (DES_CBC|TripleDES|AES_128|AES_192|AES_256)] [-username <name>]

nnmcommunication.sh updateWebAgentSettings -node (<name>|<uuid>) [-mode <(AUTO|LOCKED)>] [-agentEnabled true|false)] [-username <string>] [-password <string>] [-port <port>] [-scheme (HTTP|HTTPS)] [-timeout <duration>] [-cert <cert_file>]

nnmcommunication.sh -batch <batch_file> [-quiet]

The following additional options are available to most/all of the commands listed above:

nnmcommunication.sh -fields <fields> -format <style> -http.host <host> -http.port <port> -jndiHost <hostname> -jndiPort <port> -p <password> -u <username>

DESCRIPTION

The general format of the nnmcommunication.sh command line is the following:

nnmcommunication.sh <command> <options>

Each of the available choices for command are listed below, in the Commands section. Similarly, the available options for each of the commands are found in the Options section. Many commands share similar options. See the Synopsis section above for the appropriate list of options for each command.

Commands

addCertificate

Adds device trusted certificate to default or specific node or regions settings communication configuration

addCommunity

Adds a community string to default, region or node settings. If ordering is not provided then the specified community string will be tried last.

addCredential

Adds device credentials for communication configuration to default, node-specific, or regions settings.

addSnmpV3Setting

Assigns the specified SNMPv3 setting to default or region settings.

batch

Runs the tool in batch mode with the supplied input file or \"-\" to read from standard-in. Note that in batch mode, the input file lists several other commands to perform. The entire batch operation is performed as a single database transaction, which means that if there is an error part way through the batch operation, all previous operations which had succeeded are rolled back. The error message will list the line number in the batch file that had the error.

createAddressRange

Creates a new address range entry whose name is the specified <region>. Note that the region name can have multiple address range entries associated with it.

createHostnameFilter

Creates a new hostname filter entry.

createNodeSettings

Creates a new per-node configuration.

createRegionSettings

Creates a new region configuration.

createSnmpV3Settings

Creates a new SNMPv3 configuration.

delete

Deletes a region, per-node setting or SNMPv3 setting.

deleteAddressRange

Removes one or more address range entries.

deleteHostnameFilter

Removes one or more hostname filter entries.

listAddressRanges

Lists address range entries.

listCertificates

Lists device trusted certificates configured for default or specific node or regions settings communication configuration.

listCommunities

Lists the community string for default, region or node settings.

listCredentials

Lists device credentials for communication configuration to default, node-specific, or regions settings.

listDefaults

Lists the default communication settings.

listEffective

Lists the effective communication settings configured for a node.

listHostnameFilters

Lists hostname filter entries.

listNodeSettings

Lists the per-node settings.

listRegionSettings

Lists the configured communication regions. If a name is provided, then only that region is listed, otherwise all regions are listed.

listSnmpAgentSettings

Lists the active settings for SNMP agents managed by the local NNMi server.

listWebAgentSettings

Lists the settings of all Web Agents managed by the local NNMi management server. To view a list of Web Agents running on a specific node, provide the hostname or UUID of the node with the command.

removeCertificate

Removes configured device trusted certificates from default or specific node or regions settings communication configuration.

listSnmpV3Settings

Lists the SNMPv3 configuration(s). If a name is provided, then only the SNMPv3 settings matching that name are listed, otherwise all SNMPv3 settings are listed.

removeCommunity

Removes a community string from default, region or node settings.

removeCredential

Deletes device credentials for communication configuration from default, node-specific, or regions settings.

removeSnmpV3Setting

Removes the specified SNMPv3 setting from default or region settings.

updateSnmpAgentSettings

Directly updates agent settings for node managed by the local NNMi server. Directly updating agent settings will cause the agent mode to become LOCKED unless the -mode AUTO argument is specified with the command.

updateCredential

Updates device credentials for communication configuration in default, node-specific, or regions settings.

updateDefaults

Updates fields on the default communication configuration.

updateNodeSettings

Updates fields on a per-node configuration.

updateRegionSettings

Updates fields on a communication region configuration.

updateSnmpV3Setting

Change values on an SNMPv3 configuration.

updateWebAgentSettings

Directly updates the settings of a Web Agent hosted on a node managed by the local NNMi management server. Directly updating agent settings will cause the agent mode to become LOCKED unless the -mode AUTO argument is specified with the command. "-cert" option can be specified without any value to delete trusted certificates from Web Agent Settings.

Options

This section lists common options to the commands listed above.

-address <ip>

The management address to use for the node.

-addressDiscovery (true|false)

If true NNMi will attempt to discover a new management address if the old one stops responding.

-addressFilter <filter>

The address range for included nodes. For example 10.1.0.0/16, 192.168.1-20.* or fc00::/7. Multiple entries can be concatenated with a semi-colon separator.

-authPass <string>

The SNMPv3 authentication pass-phrase.

-authProtocol (HMAC_MD5_96|HMAC_SHA_1)

The SNMPv3 authentication protocol.

-cert <cert_file>

Fully qualified path to the trusted certificate file. The supported trusted certificate file extensions are .pem, .crt, .cer and .der

-community <string>

The value of the community string.

-contextName <string>

The SNMPv3 Context Name.

-default

Changes values on the default settings in case of add/update/remove options, enumerates the default settings for list options

-description <description>

The settings description.

-fingerPrint <fingerPrint>

Public key fingerprint of the trusted certificate.

-hostnameFilter <filter>

The hostname pattern for included nodes, for example *.usa.myco.com.

-icmpEnabled (true|false)

True to enable ICMP communication; false to disable.

-icmpRetries <number>

The ICMP retries.

-icmpTimeout <timeout>

The ICMP timeout in milliseconds.

-interfaceMatcher <value>

Expression to match an interface to use as the preferred management address.

-managementAddress <ip>

The management address to use for the node.

-managementAddressSelection <ALG1,ALG2,ALG3>

The order to run management address selection algorithms. Valid values are: LOW_LOOPBACK, HIGH_LOOPBACK, SEED, or INTERFACE. If INTERFACE is used, then you must also specify the <interfaceMatcher> parameter.

-mode (AUTO|LOCKED)

Mode of the agent. AUTO means apply from configuration LOCKED means values are explicitly set by the user.

-name <name>

Filters the output by name; wildcards * and ? are supported.

-name <name>

The settings name.

-node <node>

Filters the output by node name; FQDN, short name and IP address are supported.

-nodeSetting (<name>|<uuid>)

Specifies a per-node setting; valid inputs are the setting name or setting UUID.

-ordering <integer>

The priority ordering of the settings. Settings are tried in priority order, from 1 to the highest number. Having two items with same priority order will result in an error.

-password <string>

Password for the device communication.

-preferIPVersion (IPv4|IPv6|IPAny)

The preferred IP version.

-privPass <string>

The SNMPv3 privacy pass-phrase.

-privProtocol (DES_CBC|TripleDES|AES_128|AES_192|AES_256)

The SNMPv3 privacy protocol.

-range <ip_range>

An ip address range. Examples are: 192.168.1.0/24 or 192.168.1-10.*.

-retries <integer>

The number of SNMP retries.

-region (<name>|<uuid>)

Specifies the region. Valid values are the region name or UUID.

-serialNumber <serialNumber>

Serial Number of the trusted certificate.

-shellCredential <credential>

The device shell credential.

-shellUser <username>

The device shell username.

-snmpCommunities <strings>

The SNMP read community string(s), which is a semicolon-separated list. Note that shells on the Linux platforms treat the semicolon character as a special character, therefore the list must be quoted to avoid this special interpretation.

-snmpCommunity <string>

The snmp community to use for the node.

-snmpEnabled (true|false)

Enables or disables SNMP communication.

-snmpGetBulk (true|false)

If true NNMi will use SNMPv2c GetBulk commands.

-snmpPort <port>

The port to use for SNMP communication.

-snmpPreferredVersion (V1|V2C|V3)

The default SNMP version to use.

-snmpProxyAddress <ip>

The IP address of the SNMP proxy to use. To enable use of an SNMP proxy, an SNMP proxy port must also be provided.

-snmpProxyPort <port>

The port to use for communication with the SNMP proxy. To enable use of an SNMP proxy, an SNMP proxy address must also be provided.

-snmpRetries <number>

The number of SNMP retries.

-snmpSecurityLevel (COMMUNITY_ONLY|COMMUNITY|NO_AUTH_NO_PRIV|AUTH_NO_PRIV|AUTH_PRIV|COMMUNITY_ONLY_V1)

The SNMP minimum security level.

-snmpTimeout <timeout>

The SNMP timeout in milliseconds.

-snmpV3Setting (<name>|<uuid>)

Reference to an SNMP V3 Setting by Name or UUID.

-snmpV3Settings (<name>|<uuid>)

Reference to one or more SNMP V3 Settings by Name or UUID.

-snmpWriteCommunity <community_string>

The SNMP write community string.

-subjectDN <subjectDN>

Subject DN of the trusted certificate.

-timeout <duration>

The timeout for the Snmp Agent or Web Agent. Format is either 1000 or PT1S for one second for the Snmp Agent ,PT1S for one second for the Web Agent.

-type <SHELL|VMWARE>

The credential type; valid values are SHELL, VMWARE.

-username <name>

The username for this configuration.

-uuid <uuid>

The object unique identifier.

-version (V1|V2C|V3)

The SNMP version used by this agent. Valid values are V1, V2C or V3.

-writeCommunity <string>

The SNMP write community string.

-agentEnabled (true|false)

Enables or disables Web Agent communication.

-scheme (HTTP|HTTPS)

The scheme to be used by the Web Agent for communication.

Additional Parameters

-fields <fields>

Selects the output fields for table data as a comma-separated list

-format <style>

Sets the output format for table data; valid values are TEXT, LIST, CSV or XML.

-http.host <host>

The server host; default is localhost.

-http.port <port>

The server port; default is 80.

-jndiHost <hostname>

The server jndi host; default is localhost

-jndiPort <port>

The server jndi port; default is 1099

-p <password>

The password of the user

-quiet

Suppresses the normal output and only print errors.

-u <username>

The username to run this command

EXAMPLES

Create region settings for all nodes in the USA (as determined by hostname), and set the ordering to 10:

nnmcommunication.sh -createRegionSettings -name UsaNodes -ordering 10 -hostnameFilter *.usa.myco.com.

Update the region settings created above to set some fields:

nnmcommunication.sh -updateRegionSettings -region UsaNodes -addressDiscovery true -snmpPreferredVersion V2C -snmpTimeout 200

List the region settings created above:

nnmcommunication.sh -listRegionSettings -region UsaNodes

Create SNMPV3 settings to be used by some node

nnmcommunication.sh -createSnmpV3Settings -name xyzSettings -username xyzUser -contextName xyzContext -authProtocol HMAC_MD5_96 -authPass myPass -privProtocol AES_192 -privPass myPrivPass

List the SNMPv3 settings created above:

nnmcommunication.sh -listSnmpV3Settings -name xyzSettings

Create per-node settings for the node xyz.myco.com, using the SNMPv3 settings created above:

nnmcommunication.sh -createNodeSettings -name xyz.myco.com -snmpPreferredVersion V3 -snmpV3Setting xyzSettings

List the effective node settings for xyz.myco.com:

nnmcommunication.sh -listEffective -node xyz.myco.com

Update the node settings for xyz.myco.com to turn off ICMP:

nnmcommunication.sh -updateNodeSettings -nodeSetting xyz.myco.com -icmpEnabled false

Update the management address and lock the agent settings for node mynode

nnmcommunication.sh updateSnmpAgentSettings -node mynode -address 192.168.1.1

Update the management address without locking the agent settings for mynode

nnmcommunication.sh updateSnmpAgentSettings -node mynode -address 192.168.1.1 -mode AUTO

Update the Web Agent hosted on mynode, set the port to 80, scheme to HTTP, and timeout to 3 minutes

nnmcommunication.sh updateWebAgentSettings -node mynode -port 80 -scheme HTTP -timeout PT3M

Update the Web Agent hosted on mynode to set the trusted certificate specified

nnmcommunication.sh updateWebAgentSettings -cert /tmp/trustedCert-host1.pem

Add new default credentials to communicate with a VMware hypervisor.

nnmcommunication.sh addCredential -default -type VMWARE -username vmwareuser -password vmwarepass

List all the default credentials.

nnmcommunication.sh listCredentials -default

Remove the default VMWARE credentials.

nnmcommunication.sh removeCredential -default -type VMWARE

Update the default VMWARE credentials.

nnmcommunication.sh updateCredential -default -type VMWARE -username username -password password

Add trusted certificate to default communication configuration.

nnmcommunication.sh addCertificate -default -cert /tmp/trustedCert-host1.pem

List all trusted certificates configured for the "Americas" region in the communication configuration

nnmcommunication.sh listCertificates -region Americas

Remove trusted certificate configured from default with matching Serial Number

nnmcommunication.sh removeCertificate -default -serialNumber "1111111111"

AUTHOR

nnmcommunication.sh was developed by Hewlett Packard Enterprise.

FILES

$NMS_BIN/nnmcommunication.sh