Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This example would set the details for Cisco devices running NXOS 7.0 using SSH.

This command also sets the Node Context Name and URL, so there is a button in the opCharts GUI and NMIS to be able to access opConfig easily.

You should replace YOURCREDENTIALSET with the relevant credential set for these devices and YOURPOLLERNAMEORFQDN with the FQDN or hostname, e.g. lab-poller.opmantek.net

Code Block
#!/usr/bin/env bash

if [ "$1" == "" ]
then
	echo This script will run opConfig discovery all nodes.
	echo give me any argument to confirm you would like me to run.
	echo e.g. $0 runnow
	exit
fi

NODELIST=`/usr/local/nmis9/admin/node_admin.pl act=list`

for NODE in $NODELIST
do
	# multi line command to make it easier to read.
	/usr/local/nmis9/admin/node_admin.pl act=set node=$NODE \
	entry.activated.opConfig=1 \
	entry.configuration.os_info.os=NXOS \
	entry.configuration.os_info.version=7.0 \
	entry.configuration.connection_info.credential_set=YOURCREDENTIALSET \ 
	entry.configuration.connection_info.personality=ios \
	entry.configuration.connection_info.transport=SSH \
	entry.configuration.node_context_name="View Node Configuration" \
	entry.configuration.node_context_url=//YOURPOLLERNAMEORFQDN/omk/opConfig/node_info?o_node=\$node_name
done

As the example above you could use a filter on the NODELIST statement to filter the nodes.

Sync node data in the Cluster

You With many node changes, the best option is to trigger opHA to sync all the node data to the pollers.  You can access the opHA menu, view each poller and click the "Sync all nodes" and sync all the nodes or you can run the following command on the primary.

Code Block
sudo /usr/local/omk/bin/opha-cli.pl act=sync-all-nodes

Notes

Viewing node on primary, include a button for accessing opConfig on the poller.

Act=set on the primary

...