Skip to content

rConfig - Commands

1 mins V7 Pro V6 Core

Commands are the commands that are sent to each device in sequnce and their outputs download during a device backup. You can add commands to a category, and then download the configuration for that Command Groups (previously known as Categories) devices. Commands can be single commands, or multiple commands with line breaks in between commands strings. rConfig will send each command in the set of commands if line breaks are present. Examples are

#TypeCommandComment
1Single Commandshow ip int briefRequired field, must be unique, mind 3 and max of 255 characters. Special characters such as pipes are allowed
2Command Setshow clock\nshow versionThis will work, is not best practice and will download all output to a single config file. There are valid use cases for this, and using this will depend on your needs and device types.

Adding/ Editing Commands

From the main Command view, click New Command to add a new command, or click the edit button in the table.

Command Main View

When a command is added to the database, your will note the placement of three toggle switches on the table for V7 professional only.

The CIC Enabled toggle switch, when enabled, ensures that a CIC check will be run on the command output at the end of the configuration download process. Disable this for less important commands or commands that are not expected to return a valid configuration output.

The Keep Unchanged Config toggle switch, when enabled, rConfig will only save the configuration file if the output has changed since the last time the command was run. This is useful for commands that are expected to return the same output each time they are executed, such as downloading the running configuration from a device. If the running configuration has not changed, there is no need to save the configuration file again. This feature helps save disk space and reduces the number of files in the rConfig database.

The Change notifications toggle, enables or disables change notifications for the command. If enabled, rConfig will send an email notification to the user when the command output changes. This is useful for commands that are expected to return the same output each time they are executed, such as downloading the running configuration from a device. If the running configuration has not changed, there is no need to save the configuration file again. This feature helps save disk space and reduces the number of files in the rConfig database.

The command form itself is very simple. You can add a name, and a description, and attach the command to a one or multiple Command Groups. All fields are required and the command name must be unique.

As of V6.11.3, but not available in v6 Core, is the ability to specify a filename in the ‘Alternate Filename’ field. The field is not mandatory, and if let blank rConfig will by default determine the filename based on the command name. If you want to override this, you can specify a filename here. This is useful if you want to download multiple files from a single device. For example, you might want to download the running config, and the startup config. You can specify a filename for each command, and rConfig will download each file to the specified filename.

Category Form

As of V7, you can now also bulk assign Command Groups to commands. This is useful if you have a large number of commands, and you want to assign a category to a large number of commands at once. You can do this by selecting the commands you want to assign, and then clicking the ‘Assign Command Groups’ button. You can then select the Command Groups you want to assign to the selected commands.

Assign Command Groups to Commands

Compare Options

As of V7.2.0 you can now configure the compare options for each command. This allows you to specify how rConfig should compare the output of the command. You can configure the following options: Compare exclusions Compare exclusions allow you to specify lines of text that should be excluded from the comparison. This is useful if you have commands that return dynamic information, such as timestamps, that you want to exclude from the comparison. You can specify multiple lines of text to exclude, and rConfig will exclude these lines from the comparison.

Compare Context Compare context allows you to specify the number of lines of context that should be included in the comparison. This is useful if you want to see the lines of text that are different between the command output. You can specify the number of lines of context to include, and rConfig will include this number of lines before and after the lines that are different in the comparison.

Length Limit Length limit allows you to specify the maximum number of lines of text that should be included in the comparison. This is useful if you have commands that return a large amount of text, and you only want to compare a subset of the text. You can specify the maximum number of lines to include, and rConfig will only compare this number of lines.

Ignore Case Ignore case allows you to specify whether the comparison should be case sensitive or case insensitive. If you enable this option, rConfig will ignore the case of the text when comparing the output of the command.

Ignore Line Ending Ignore line ending allows you to specify whether the comparison should ignore line endings. If you enable this option, rConfig will ignore line endings when comparing the output of the command.

Ignore Whitespace Ignore whitespace allows you to specify whether the comparison should ignore whitespace. If you enable this option, rConfig will ignore whitespace when comparing the output of the command.

Click on the Compare Options button to configure the compare options for the command.

Compare Options - Configuring Diff exclusions

As of V7.2.0 you can now configure the comparison granular exclusions for each configuration diff. This allows you to specify lines of text that should be excluded from the comparison. This is useful if you have commands that return dynamic information, such as timestamps, that you want to exclude from the comparison. You can specify multiple lines of text to exclude, and rConfig will exclude these lines from the comparison.

To configure exclusions, the format is similar to the new POLICY file format. With some differences.

The description is required which is the line at the top of each block prefaced with double forward slashes // Some Description The Method, while it follows the same format as POLICY, the content is different. The format is #[SomeContent], but the first method must be global. The global method is used to specify global exclusions that apply to the all commands output.

Then you can specify the command specific exclusions. The format is the same as the global exclusions, but the method must be the command name. The command name must nbe identical to the configured command in the database i.e. show run must equal #[show run].

The last line(s) in each block must be a full regex pattern that will be used to match the output of the command. This is the exclusion pattern that will be used to exclude the matched lines from the comparison. It must contain all regexp including the delimiters and any flags to be used.

// Some Description
#[global]
/some regex/
/some regex/
// Some Description
#[commandname]
/some regex/

Please check our YouTube channel for a video on how to configure the diff exclusions. Explore rConfig V7.2 - Comprehensive Feature Walkthrough & Major Updates