Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fixed some typos

...

  1. Nodes are computer systems that opConfig knows about, and which it is configured to run commands for.
  2. As opConfig needs to connect to the node in question and execute commands on that node, the node needs to be configured with access credentials. In opConfig these are stored independent from the nodes in what opConfig calls credential sets.
  3. Commands are normally command line constructs which will be executed on the node in question. The command output is captured and stored by opConfig.
    There are some 'passive' commands (like audit-import) which are not run on a node, but which are associated with a node.
  4. A command can be one-shot command which is not analyzed in great detail (e.g. a process listing or some other diagnostic command), and whenever such a one-shot command is executed, its output is roughly compared against the previous revision, and if different it's saved as a new revision in opConfig.
  5. A command can be marked for change detection (e.g. a listing of installed software), in which case opConfig creates detailed records of what the changes are - again only if there are differences between the current command output and the most recent revision for this command.
  6. Commands can be grouped and collected into what opConfig calls a "command set". Command sets can be configured to apply only to particular platforms or OS versions.

...

As mentioned above opConfig lets you organize whatever commands you'd like it to run into an arbitrary number of groups which we call command sets. 

A command set definition consists of these types of information:

...

Code Block
languageperl
# for all commands in a set, define this in the command set - note the S in run_commandS_...!
'scheduling_info' => {
 'run_commands_on_separate_connection' => 'true'
},

# for just a specific command, set this for the command in question - no S in run_command_...!
commands => [
 {
 'command' => 'show version',
 'run_command_on_separate_connection' => 'true',
 }]

In addition to session grouping, a command can also be marked with te privileged property, in which case opConfig will attempt to gain elevated/superuser privileges before attempting to run the command.

How long should captured command output be kept

...

In the example above, the output of the "ifconfig -a" command would be checked and any changed lines that match TX/RX packets or TX/RX bytes (i.e. the interface counters) are ignored. Only Any other changes that are left remain after applying the filters are checked used to figure out whether to create a new revision or ontnot.

Please note that command filters are possible for both one-shot commands and commands with change-detect enabled,  and behave the same for both.

...

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

Options:

  • nodes=node1,node2,etc -- only command sets for that apply to the specified nodes will be run.
  • command_set_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 matching nodes candidate commands are filtered by the tags specified. If any given tag one or more tags given on the command line is present in the list of the nodea command's tags, then the node command will be usedrun.

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

...