Versions Compared

Key

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

...

Aging is not currently in use, look for more info about this in later versions

Usage

opConfig-cli

Information on what commands are supported is printed when no options are specified.  All options support debug=true for debug output and debug=9 for extremely verbose output.

discover, Automatically discover new connections

Grabs all nodes from configured NMIS server and attempts to add all nodes that are enabled and have collect=true.

Options

  • disable_test=true – does not attempt to connect and adds the all nodes with the credential_set for each connection set to an invalid value
  • force_active=true – ignores settings in NMIS and adds all nodes not just the ones that are active and being collected
  • nodes=node1,node2,etc – only attempts to discover nodes listed

test_connect, Testing a connection

opConfig-cli can be used to test connections to help debug situations that don't make any sense. 

An example of how it can be used:

...

The options for transport and personality are given above.TBD

It is also possible to test an existing connection from the connections.nmis file by specifying node=node_name , if any options are specified on the command line along with the node they will override the settings loaded from the connections.nmis file.

command="some command" can also be specified to test the output of a specific command.

run_command_sets, Running commands on devices

This command will run all command sets for all nodes (by default).  

Options:

  • nodes=node1,node2,etc -- only the specified nodes will be run against all command sets.
  • command_set_names=command_set1,command_set2,etc – only run the specified command sets, this will still only run nodes that match the command sets criteria
  • tags=tag1,tag2,etc –  the matching nodes are filtered by the tags specified, if any tag matches the node will be run

get_command_output, Get the last output from a command for a node

Requries node=node_name command="command name" and returns output collected from the last run of this command

diff_command_outputs, Diff two revisions 

Shows the diff from the output of 2 revisions of stored output (does not run them, only queries).  The command line would look similar to get_command_output with the edition of revision_1= and revision_2=

eg. act=diff_command_outputs node=node1 command="show run" revision_1=10 revision_2=13

create_indexes, Create indexes in DB

This command is explained in the installation docs.  If you end up losing your database you will want to re-run this command to ensure good performance.  It is safe to run this command more than once.