rConfig V7 has a number of very useful CLI commands built-in. The commands are useful if;
You prefer to use CLI for your configuration management tasks
You want to extend an Infrastructure as Code platform such as Ansible, or Chef
You have custom scripts that you would like to run against rConfig
You need to be logged in as root user to run these commands, and you need to be in the rConfig ‘current’ directory.
Running the following will output all available Laravel commands but you will also see all rConfig command options. Try to stick to using the rConfig commands unless you have a good knowledge of Laravel.
All above commands must be run from within the rConfig7 directory, and must be run in the following format.
rconfig:append-compliance-report-data
Command Summary
Appends report result summary data to a saved compliance report. This job runs automatically for any new compliance jobs post V7.2.6, but you can run it manually if you need to update a report. You must
run this command if you have a compliance report that is missing data, or if you have a report that was created before V7.2.6.
Command Use
Command Parameters
Command Output
rconfig:archive-logs
Command Summary
Archives logs from the logs table.
Command Use
Command Parameters
Command Output
rconfig:clear-all
Command Summary
Clear out cached information, reset permissions and generally fix broke-stuff across the application.
Use this command if you are searching for items from the database, such as devices, Command Groups etc.. and you are not getting the full or correct results. Sync database tables with the internal search engine.
Command Use
Command Output
Download Commands
rconfig:download-category
Command Summary
Run commands on all devices within the specific Command Groups. You can send multiple category IDs as parameters.
Command Use
Command Output
rconfig:download-device
Command Summary
Download configurations for given devices. You can send multiple device IDs as parameters.
Command Use
Command Options
Adding the -d switch to the above command will cause verbose debugging output for both Telnet and SSH.
Adding the -i Search for devices by integration_host_id, which is unique to devices that have been imported via the Device Sync integration i.e. Zabbix
Command Output
rconfig:download-api
Command Summary
Download configurations for given API Collections. You can send multiple API collection IDs as parameters.
Command Use
Command Options
Adding the -d switch to the above command will cause verbose debugging output for API connectivity.
Command Output
rconfig:download-tag
Command Summary
Run commands on all devices within the specific tags. You can send multiple Tag IDs as parameters.
Command Use
Command Output
rconfig:download-task
Command Summary
Run commands on all devices within the specific task ID. You can send multiple Task IDs as parameters.
Command Use
Command Output
rconfig:fix-latest-config-version
Command Summary
Fixes the latest_version field in the configs table, if there are any duplicate version or other anomalies. Ideally, this is only used on the advice of rConfig support.
Command Use
rconfig:integration-netbox
Command Summary
Command to sync Netbox devices to rConfig via API integration. All information related to Netbox integration is available in the Netbox Integration section.
Command Use
rconfig:integration-zabbix
Command Summary
Command to sync Zabbix devices to rConfig via API integration. All information related to Zabbix integration is available in the Zabbix Integration section.
Command Use
Command Output
##List Commands
rconfig:list-categories
Command Summary
Lists all configured device Command Groups. The ID is required when running rconfig:download-categories.
Command Use
Command Output
rconfig:list-devices
Command Summary
Lists all configured devices. The ID is required when running rconfig:download-device.
Command Use
Command Output
rconfig:list-snippets
Command Summary
Lists all configured command snippets. The ID is required when running rconfig:send-snippet.
Command Use
Command Output
rconfig:list-tags
Command Summary
Lists all configured tags. The ID is required when running rconfig:download-tag.
Command Use
Command Output
rconfig:list-tasks
Command Summary
Lists all configured tags. The ID is required when running rconfig:download-task.
Command Use
Command Output
rconfig::purge-configs
Command Summary
Purge configs older than X days
Command Use
Command Parameters
Command Output
rconfig::purge-failedconfigs
Command Summary
Clear all failed or invalid configs for many or all devices
Command Use
Command Parameters
Command Output
rconfig:report-lastDownload
Command Summary
CLI based report of all devices latest downloaded configs
Command Use
Command Output
rconfig:run-policy-compliance
Command Summary
CLI based report of all devices latest downloaded configs
Command Use
Command Parameters
Command Output
rconfig:search-configs
Command Summary
Search configuration files for given text across a given category of devices.
####Options:
{Category : The Category of devices to search.}
{SearchString : The search string. If searching multiple words, wrap in double-quotes.}
{--lines=0 : Number of lines to display before/ after matches.}
Command Use
Command Output
rconfig:send-snippet
Command Summary
Send a specific command snippet to a given set of devices. Requires
snippetid
deviceid - One or multiple
Command Use
Command Output
rconfig:snippet-task
Command Summary
Send snippets to devices with one or multiple tasks
taskid
Adding the -d switch to the above command will cause verbose debugging output for both Telnet and SSH.
Command Use
Command Output
rconfig:sweep-tftp-dir
Command Summary
Sweeps the TFTP directory for files, attempts to match filename to device ID and uploads them to the correct device directory
Command Use
Command Output
rconfig:sync-search
Command Summary
Sync search models with laravel scout
Command Use
Command Output
rconfig:sync-tasks
Command Summary
Sync the schedule of the app with the schedule monitor
Command Use
Command Output
rconfig:test-script
Command Summary
Test BYOC scripts from the command line. See the BYOC section for more information.
Command Use
Command Output
rconfig:tftp-server
Command Summary
Toggle rConfig TFTP on or off
Command Use
rconfig:update-rbac-data
Command Summary
Command to update permissions table with new permissions
Command Use
Command Output
rconfig:update-snippet-roles
Command Summary
Update all snippets to ensure they at least have admin have roles attached to them.