opConfig has some features only available through the command line tool, located at <omk_dir>/bin/opconfig-cli.exe.
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 verbose output.
opConfig cli has to be run as root.
Listed below are the possible options for the
Tests a single given node (argument node=nodeX) and attempts to determine its Transport and Credential Set configuration. The node must already have a Personality set.
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.
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 applicable command sets for all nodes (by default).
- nodes=node1,node2,etc -- only command sets that apply to the specified nodes will be run.
- names=command_set1,command_set2,etc – only run the specified command sets (and of course only for nodes matching the command sets' criteria)
- tags=tag1,tag2,etc – The candidate commands are filtered by the tags specified. If one or more tags given on the command line is present in the list of a command's tags, then the command 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
find_command_revisions, Get the revisions of a command
Requires the node name and returns a list of the commands a revisions for a node.
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=
By default opConfig does not remove old revisions from the database; if you run many non-change-detecting commands (or encounter frequent changes in your commands' outputs) then this will likely make the GUI unwieldy (e.g. the revision drop down menus will become very large). The revisions can be removed with the command line option:
There is also an option to remove indices:
More information about puge opConfig data can be found here.
As mentioned above opConfig lets you organise whatever commands you'd like it to run into an arbitrary number of groups which we call command sets.
There are several cli options to manage config sets:
You can read more information of the config sets in the user manual.
The opConfig queue has jobs scheduled to be run in order. There are some cli options to check the queue list of the scheduled jobs or remove a job from the queue:
list_policies, import_policy, export_policy; update_config_status, export_config_status and check_compliance
These operations are documented on the separate page about Compliance Management.
Credential sets can also be managed from opConfig version 4.3.2.
All the operations are defined in the following guide.
Refresh OS Info
As part of Discovering OS Info, you can refresh the information of OS's for nodes in the "Node and IP information", "Node reports" and Node pages with the opConfig CLI tool: