Name

nnmnodegroup.ovpl — Manages node groups and node group hierarchies.

SYNOPSIS

nnmnodegroup.ovpl -?

nnmnodegroup.ovpl -add -group (<name>|<uuid>) [-file <file>|-node <nodeList>] [-deviceType <deviceType>] [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -batch <source> [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -create -name <name> [-file <file>|-node <nodeList>] [-filter <filter>] [-notes <notes>] [-parent <parent> [-expand (true|false)]] [-uuid <uuid>] [-addToPerfSPIReports (true|false)] [-addToViewFilterList (true|false)] [-calculateStatus (true|false)] [-deviceType <deviceType>] [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -delete -group (<name>|<uuid>) [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -list [-fields <fields>] [-format <format>] [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -listChildGroups -group <group> [-fields <fields>] [-format <format>] [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -listMembers -group (<name>|<uuid>) [-deep] [-fields <fields>] [-format <format>] [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -listParentGroups -group <group> [-fields <fields>] [-format <format>] [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -printNodes <group name> [ -hostName | -shortName | -uuid | -ip ] [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -relate -child <child> -parent <parent> [-expand (true|false)] [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -reload [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -remove -group (<name>|<uuid>) [-file <file>|-node <nodeList>] [-deviceType <deviceType>] [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -unrelate -child <child> -parent <parent> [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

nnmnodegroup.ovpl -update -group (<name>|<uuid>) [-addToPerfSPIReports (true|false)] [-addToViewFilterList (true|false)] [-calculateStatus (true|false)] [-deviceType <deviceType>] [-filter <filter>] [-name <name>] [-notes <notes>] [-jndiHost <hostname> Default: localhost] [-jndiPort <port> Default: 1099] [-u <username> -p <password>] [-quiet]

DESCRIPTION

Use the nnmnodegroup.ovpl script to manage node group and node group hierarchies. This script allows you to create, update, and delete node groups; create and delete node group hierarchies; and manage nodes associated with node groups by allowing you to add nodes or configure the node group filters.

nnmnodegroup.ovpl provides multiple listing operations, including the following:

  • List the information and hiearchy for node groups by listing either the child node groups or parent node groups.

  • Use the -listMembers operation to list the nodes in the node group.

  • Use the -list operation to list all node groups in the database.

The -printNodes operation will print node attributes belonging to a certain node group. When printing the node attributes, the group name is a required argument; if no other arguments are given, the hostName, shortName, UUID and management IP address attributes of each node are dumped; one comma-separated line per node. Note that the -printNodes command is a deprecated/legacy command which was available in earlier NNMi versions and its usage retained for backwards compatibility. As such you must specify the leading dash character, i.e. -printNodes will work, but printNodes will not. The new listMembers command is the replacement for printNodes.

Parameters

nnmnodegroup.ovpl supports the following options:

-add -group (<name>|<uuid>) [-file <file>|-node <nodeList>] [-deviceType <deviceType>]

Adds nodes or device type filters to a node group. At least one additional argument must be specified in addition to the group argument.

-group (<name>|<uuid>)

The name or UUID of the node group.

-file <file>

A text file that can contain node names, UUIDs, and IP addresses.

-node <nodeList>

A comma-separated list of node names, UUIDs, and IP addresses.

-deviceType <deviceType>

Used for selecting nodes for the node group. The deviceType parameter is a semicolon-separated list of strings, each having a format of category:vendor:family:profile

-batch <source>

Runs the script in batch mode with the supplied input file or \"-\" to read from standard input.

source

The source can be either - (for standard input) or a file.

-create -name <node group name> [-addToPerfSPIReports (true|false)] [-addToViewFilterList (true|false)] [-calculateStatus (true|false)] [-deviceType <deviceType>] [-expand (true|false)] [-file <file>|-node <nodeList>] [-filter <filter>] [-notes <notes>] [-parent <parent>] [-uuid <uuid>]

Creates a new node group.

-name <name>

The name of the node group being created.

-addToPerfSPIReports (true|false)

Allows the node group to be a filter for NNM iSPI Performance for Metrics reports. Changing this flag will have no effect unless an NNM iSPI Performance for Metrics license is installed.

-addToViewFilterList (true|false)

Includes the node group in the drop-down filter list when viewing tables.

-calculateStatus (true|false)

Allows the node group to have its status calculated.

-deviceType <deviceType>

Used for selecting nodes for the node group. The deviceType parameter is a semicolon-separated list of strings, each having the format of category:vendor:family:profile

-expand (true|false)

Expands the node group in its parent map. The -parent option must be specified.

-file <file>

A text file that can contain node names, UUIDs, and IP addresses.

-filter <filter>

A filter expression used for selecting nodes in the node group. Nodes whose attributes match the expression will be included in the group.

-node <nodeList>

A comma-separated list of node names, UUIDs, and IP addresses.

-notes <notes>

Notes to attach to the node group.

-parent <parent>

The name of a parent node group if the node group you are adding is being added as a child node group.

-uuid <uuid>

The UUID to be assigned to the node group.

-delete -group (<name>|<uuid>)

Deletes the node group.

-group (<name>|<uuid>)

The name or UUID of the node group being deleted.

-list [-fields <fields>] [-format <format>]

Print the names of the node groups in the database.

-fields <fields>

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

-format <format>

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

-listChildGroups -group <group> [-fields <fields>] [-format <format>]

List child node groups for the specified node group.

-group <group>

The name of the node group to list children for.

-fields <fields>

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

-format <format>

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

-listMembers -group (<name>|<uuid>) [-deep] [-fields <fields>] [-format <format>]

Print nodes in the specified node group.

-group (<name>|<uuid>)

The name or UUID of the node group.

-deep

By default, listMembers will only list the nodes of the node group. The -deep option will list all nodes in the node group and all child node groups.

-fields <fields>

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

-format <format>

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

-listParentGroups -group <group> [-fields <fields>] [-format <format>]

List parent node groups for the specified node group.

-group <group>

The name of the node group to list parent groups for.

-fields <fields>

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

-format <format>

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

-printNodes <node group name> [-hostName | -shortName | -uuid | -ip]

Prints attributes of nodes belonging to the specified node group. If no additional parameters are provided, the hostName, shortName, UUID and management IP address attributes of each node will be printed; one comma-separated line per node.

Optionally, one of the following parameters can be specified (only the specified attribute will be printed):

-hostName

Prints the hostName of each node belonging to the node group.

-shortName

Prints the shortName of each node belonging to the node group.

-uuid

Prints the UUID of each node belonging to the node group.

-ip

Prints the management IP address of each node belonging to the node group. If the IP address cannot be determined, the hostname will be printed.

-relate -child <child> -parent <parent> [-expand (true|false)]

Link a node group to another node group to create a parent and child relationship.

-child <child>

The name of the child node group.

-parent <parent>

The name of the parent node group.

-expand (true|false)

Expands the node group in maps.

-reload

Reloads the node group cache. This operation may be required when adding or removing nodes by either updating the list of additional nodes or by updating the filters for node groups, as the cache may not reflect the changes for several minutes.

The reload operation cannot be used as part of a batch operation because other operations might be committed only after the batch operation completes. The reload operation can be run as a separate command after the batch operation in order to refresh the cache.

-remove -group (<name>|<uuid>) [-file <file>|-node <nodeList>] [-deviceType <deviceType>]

Removes nodes from a node group. At least one additional argument must be specified in addition to the group argument.

-group (<name>|<uuid>)

The name or UUID of the node group.

-file <file>

A text file that can contain node names, UUIDs, and IP addresses.

-node <nodeList>

A comma-separated list of node names, UUIDs, and IP addresses.

-deviceType <deviceType>

Used for selecting nodes for the node group. The deviceType parameter is a semicolon-separated list of strings, each having the format of category:vendor:family:profile

-unrelate -child <child> -parent <parent>

Removes the node group hierarchy between a child and parent node group.

-child <child>

The name of the child node group.

-parent <parent>

The name of the parent node group.

-update -group (<name>|<uuid>) [-addToPerfSPIReports (true|false)] [-addToViewFilterList (true|false)] [-calculateStatus (true|false)] [-deviceType <deviceType>] [-filter <filter>] [-name <newName>] [-notes <notes>]

Set attributes on a node group. At least one additional argument must be specified in addition to the group argument.

-group (<name>|<uuid>)

The name or UUID of the node group.

-addToPerfSPIReports (true|false)

Allows the node group to be a filter for NNM iSPI Performance for Metrics reports. Changing this flag will have no effect unless an NNM iSPI Performance for Metrics license is installed.

-addToViewFilterList (true|false)

Includes the node group in the drop-down filter list when viewing tables.

-calculateStatus (true|false)

Allows the node group to have its status calculated.

-deviceType <deviceType>

Used for selecting nodes for the node group. The deviceType parameter is a semicolon-separated list of strings, each having the format of category:vendor:family:profile

-filter <filter>

A filter expression used for selecting nodes in the node group. Nodes whose attributes match the expression will be included in the group.

-name <newName>

Changes the name of the node group to the specified newName.

-notes <notes>

Notes to attach to the node group.

-help

Prints the usage statement.

-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

The server JNDI host; default is localhost.

-jndiPort

The server JNDI port; default is 1099.

EXAMPLES

To create a node group named mygroup:

nnmnodegroup.ovpl -create -name mygroup

To create a node group named mygroup2 with nodes a and b:

nnmnodegroup.ovpl -create -name mygroup -node "a,b"

To create a node group hierarchy with mygroup as the parent and mygroup2 as the child:

nnmnodegroup.ovpl -relate -parent mygroup -child mygroup2

To print the hostName, shortName, UUID and management IP address of all nodes that belong to the node group Routers:

nnmnodegroup.ovpl -printNodes Routers

To print only the hostname of all nodes that belong to the node group Non-SNMP Devices:

nnmnodegroup.ovpl -printNodes "Non-SNMP Devices" -hostName

To list the node group names in the database:

nnmnodegroup.ovpl -list

To change the name of an existing node group and also change its calculate status to false:

nnmnodegroup.ovpl -update -group myGroup -name newName -calculateStatus false

RETURN VALUE

nnmnodegroup.ovpl exits with the status 0 (zero) if no errors were encountered; otherwise it returns 1.

AUTHOR

nnmnodegroup.ovpl was developed by Hewlett Packard Enterprise.

FILES

$NNM_BIN/nnmnodegroup.ovpl

Return to Reference Pages Index