rConfig V8 CLI Commands Reference - Complete Network Automation Guide
rConfig V8 CLI Commands Reference - Complete Network Automation Guide
Section titled “rConfig V8 CLI Commands Reference - Complete Network Automation Guide”rConfig V8 includes a comprehensive set of command-line interface (CLI) commands for managing your network configuration platform. In V8, a number of commands have been added, some have been changed, and others removed to streamline operations and align with modern workflows.
Why Use CLI Commands?
Section titled “Why Use CLI Commands?”CLI commands are essential for several key use cases:
- Automation & Orchestration: Integrate rConfig operations into Infrastructure as Code platforms like Ansible, Terraform, or Chef
- Custom Scripting: Build your own automation workflows and scheduled tasks that interact with rConfig
- System Administration: Perform maintenance tasks, clear caches, and troubleshoot issues directly from the command line
- CI/CD Pipelines: Incorporate network configuration management into your DevOps workflows
- Remote Management: Execute operations on rConfig without requiring access to the web interface
- Performance: Bypass UI overhead for bulk operations and scheduled tasks
Getting Started with CLI Commands
Section titled “Getting Started with CLI Commands”All rConfig CLI commands must be run from the rConfig installation directory and require root privileges.
Prerequisites
Section titled “Prerequisites”- SSH access to your rConfig server
- Root user privileges (or use
sudo
) - Navigate to the rConfig installation directory:
cd /var/www/html/rconfig8/current
Discovering Available Commands
Section titled “Discovering Available Commands”To view all available rConfig-specific commands:
php artisan rconfig:list
This command brings up a search box where you can type the partial name of the command you are looking for. Or hit enter to see the full list of commands.
Tip: Use the documentation search feature to quickly find detailed information about any command by searching for its name (e.g., “rconfig:download-device”).
rconfig:append-compliance-report-data Append report result summary data to a saved compliance report rconfig:archive-logs Will archive x amount of activity log rows or days rconfig:cleanup-temp-snippets Clean up expired temporary snippets rconfig:clear-all Clear all cache and config elements for Laravel, NPM and other dependencies rconfig:clear-horizon Clear Horizon Queue History rconfig:config-encryption-manager Manage configuration encryption, including encrypting, decrypting, and rotating keys rconfig:config-summaries-sync Sync Config Summaries rconfig:connectivity-check Check rConfig portal connectivity rconfig:data-purge Purge old data based on settings_purge configuration with hybrid queue support rconfig:digest-cleanup Cleanup old digest data via job queue rconfig:digest-send Send digest emails to users via job queue rconfig:download-api Download api configurations for one or multiple api connections via the CLI rconfig:download-category Download configurations for one or multiple categories of devices rconfig:download-device Download configurations for one or multiple devices via the CLI rconfig:download-tag Download configurations for devices with one or multiple tags rconfig:download-task Download configurations for devices with one or multiple tasks rconfig:integration-nautobot In Development: Command to sync Nautobot devices to rConfig via API integration. rconfig:integration-nautobot-single-device Process a single Nautobot device through ETL workflow, requires a Nautobot Device ID. rconfig:integration-netbox In Development: Command to sync Netbox devices to rConfig via API integration. rconfig:integration-netbox-single-device Process a single Netbox device through ETL workflow, requires a Netbox Device ID. rconfig:integration-zabbix In Development: Command to sync Zabbix devices to rConfig via API integration. rconfig:integration-zabbix-single-device Process a single Zabbix device through ETL workflow, requires a Zabbix Host ID. rconfig:list List all rconfig:* commands with their descriptions rconfig:notify-on-config-change Notify about configuration changes that occurred today rconfig:oxidized-device-mappings Manage device type mappings for Oxidized import rconfig:oxidized-import-devices Import devices from JSON file to rConfig database rconfig:oxidized-load-devices Import devices from Oxidized to rConfig rconfig:policy-definition-validation A command to validate a given policy definition against a specific config rconfig:purge-configs Purge configs older than X days rconfig:purge-configs-v2 New purge options, including day-based and version-based purges. rconfig:purge-failedconfigs Purge failed configs for some or all devices rconfig:report-lastDownload Output report of all devices latest downloaded configs rconfig:run-policy-compliance Send a policy assignment job to the queue rconfig:seed-initial Seed initial data after migrations rconfig:seed-purge-defaults Seed default purge settings for all tables rconfig:send-snippet Send a snippet to one or multiple devices via the CLI rconfig:slacktest Test Slack integration rconfig:snippet-task Send snippets to devices with one or multiple tasks rconfig:snmp-poll-device Poll SNMP data for a specific device or all devices with optional walk functionality rconfig:snmp-registry Manage SNMP trap registry from GitHub rconfig:snmp-trap-handler Handle incoming SNMP traps and process them rconfig:snmp-trap-supervisor Manage SNMP trap handler service via Supervisor rconfig:sweep-xftp-dir Sweeps the xFTP directory for files, attempts to match filename to device ID and uploads them to the correct device directory rconfig:sync-tasks Sync the schedule of the app with the schedule monitor rconfig:test-notifications-recipients Test the getNotificationRecipients method with different notification types and channels rconfig:transform-eoc-definitions Transform legacy EOC definitions JSON to CIC policy format and update the database rconfig:transform-policy-definitions Transform policy definitions JSON and update the database rconfig:update-device-roles Update all devices to ensure they at least have admin have roles attached to them. rconfig:update-rbac-data Command to update or refresh permissions table with new permissions rconfig:update-snippet-roles Update all snippets to ensure they at least have admin have roles attached to them. rconfig:update-tag-roles Update all tags to ensure they at least have admin have roles attached to them. rconfig:vector-cm-messages Consume messages from rConfig Vector Central Manager RabbitMQ queue rconfig:xftp-toggle Toggle FTP/ TFTP or SFTP(SCP) servers on or off
All above commands must be run from within the rconfig8
directory, and must be run in the following format.
Command Reference
Section titled “Command Reference”rconfig:append-compliance-report-data
Section titled “rconfig:append-compliance-report-data”Appends report result summary data to a saved compliance report. Runs automatically for compliance jobs post V7.2.6, but can be run manually to update reports or fix missing data.
# Append data to specific reportphp artisan rconfig:append-compliance-report-data 123
# Append data to all reportsphp artisan rconfig:append-compliance-report-data
rconfig:archive-logs
Section titled “rconfig:archive-logs”Archives activity log entries to the archive table based on age (days or row count).
# Archive logs older than 7 daysphp artisan rconfig:archive-logs --days=7
# Archive oldest 1000 log entriesphp artisan rconfig:archive-logs --rows=1000
rconfig:cleanup-temp-snippets
Section titled “rconfig:cleanup-temp-snippets”Removes expired temporary snippets from the system. This command is run automatically daily via the scheduler.
php artisan rconfig:cleanup-temp-snippets
rconfig:clear-all ⭐
Section titled “rconfig:clear-all ⭐”Clears all cache and config elements for Laravel, NPM, and other dependencies. Use this to resolve many application issues. This is an important command to run after updates or configuration changes.
php artisan rconfig:clear-all
rconfig:clear-horizon
Section titled “rconfig:clear-horizon”Clears Horizon queue history and failed jobs.
php artisan rconfig:clear-horizon
rconfig:config-encryption-manager
Section titled “rconfig:config-encryption-manager”Manages configuration file encryption, including encrypting, decrypting, and rotating encryption keys.
php artisan rconfig:config-encryption-manager
rconfig:config-summaries-sync
Section titled “rconfig:config-summaries-sync”Syncs configuration count summaries to the database for faster UI load times. Runs automatically daily at 3AM.
php artisan rconfig:config-summaries-sync
rconfig:connectivity-check
Section titled “rconfig:connectivity-check”Tests rConfig portal connectivity.
php artisan rconfig:connectivity-check
rconfig:data-purge
Section titled “rconfig:data-purge”Purges old data based on settings_purge configuration with hybrid queue support.
php artisan rconfig:data-purge
rconfig:digest-cleanup
Section titled “rconfig:digest-cleanup”Cleans up old email digest data via job queue. This command is run automatically daily via the scheduler.
php artisan rconfig:digest-cleanup
rconfig:digest-send
Section titled “rconfig:digest-send”Sends digest emails to users via job queue.
php artisan rconfig:digest-send
rconfig:download-api
Section titled “rconfig:download-api”Downloads API configurations for one or multiple API connections.
# Download from specific API collectionsphp artisan rconfig:download-api 500000 500001
# Enable debug outputphp artisan rconfig:download-api 500000 -d
rconfig:download-category
Section titled “rconfig:download-category”Downloads configurations for all devices in specified categories (Command Groups).
# Download from one or more categoriesphp artisan rconfig:download-category 1 2
rconfig:download-device ⭐
Section titled “rconfig:download-device ⭐”Downloads configurations for specified devices. This command is essential for on-demand config retrieval and debugging.
# Download from specific devicesphp artisan rconfig:download-device 1002 1003
# Enable debug outputphp artisan rconfig:download-device 1002 -d
# Search by integration host IDphp artisan rconfig:download-device 1002 -i
rconfig:download-tag
Section titled “rconfig:download-tag”Downloads configurations for all devices with specified tags.
php artisan rconfig:download-tag 1001
rconfig:download-task
Section titled “rconfig:download-task”Downloads configurations for all devices associated with specified tasks.
php artisan rconfig:download-task 555555 666666
rconfig:integration-nautobot
Section titled “rconfig:integration-nautobot”Syncs Nautobot devices to rConfig via API integration. See Nautobot Integration documentation for details.
php artisan rconfig:integration-nautobot
rconfig:integration-nautobot-single-device
Section titled “rconfig:integration-nautobot-single-device”Processes a single Nautobot device through ETL workflow. Requires Nautobot Device ID.
php artisan rconfig:integration-nautobot-single-device {device-id}
rconfig:integration-netbox
Section titled “rconfig:integration-netbox”Syncs Netbox devices to rConfig via API integration. See Netbox Integration documentation for details.
php artisan rconfig:integration-netbox
rconfig:integration-netbox-single-device
Section titled “rconfig:integration-netbox-single-device”Processes a single Netbox device through ETL workflow. Requires Netbox Device ID.
php artisan rconfig:integration-netbox-single-device {device-id}
rconfig:integration-zabbix
Section titled “rconfig:integration-zabbix”Syncs Zabbix devices to rConfig via API integration. See Zabbix Integration documentation for details.
php artisan rconfig:integration-zabbix
rconfig:integration-zabbix-single-device
Section titled “rconfig:integration-zabbix-single-device”Processes a single Zabbix device through ETL workflow. Requires Zabbix Host ID.
php artisan rconfig:integration-zabbix-single-device {host-id}
rconfig:list
Section titled “rconfig:list”Lists all rconfig:* commands with their descriptions.
php artisan rconfig:list
rconfig:oxidized-device-mappings
Section titled “rconfig:oxidized-device-mappings”Manages device type mappings for Oxidized import.
php artisan rconfig:oxidized-device-mappings
rconfig:oxidized-import-devices
Section titled “rconfig:oxidized-import-devices”Imports devices from JSON file to rConfig database.
php artisan rconfig:oxidized-import-devices
rconfig:oxidized-load-devices
Section titled “rconfig:oxidized-load-devices”Imports devices from Oxidized to rConfig.
php artisan rconfig:oxidized-load-devices
rconfig:policy-definition-validation
Section titled “rconfig:policy-definition-validation”Validates a given policy definition against a specific configuration.
php artisan rconfig:policy-definition-validation
rconfig:purge-configs
Section titled “rconfig:purge-configs”Purges configurations older than specified number of days.
# Purge configs older than 30 daysphp artisan rconfig:purge-configs 30
rconfig:purge-configs-v2
Section titled “rconfig:purge-configs-v2”Enhanced purge options including day-based and version-based purges.
php artisan rconfig:purge-configs-v2
rconfig:purge-failedconfigs
Section titled “rconfig:purge-failedconfigs”Purges failed configurations for specified or all devices.
# Purge failed configs for specific devicesphp artisan rconfig:purge-failedconfigs 1001 1002
# Purge all failed configsphp artisan rconfig:purge-failedconfigs --all
rconfig:report-lastDownload
Section titled “rconfig:report-lastDownload”Generates CLI report of all devices’ latest downloaded configurations.
php artisan rconfig:report-lastDownload
rconfig:run-policy-compliance
Section titled “rconfig:run-policy-compliance”Sends a policy assignment job to the queue for compliance checking.
# Run compliance for specific policy assignmentphp artisan rconfig:run-policy-compliance 1
rconfig:seed-initial
Section titled “rconfig:seed-initial”Seeds initial data after migrations. Typically used during installation. Do not run on production systems unless directed by support.
php artisan rconfig:seed-initial
rconfig:seed-purge-defaults
Section titled “rconfig:seed-purge-defaults”Seeds default purge settings for all tables. Use this to reset purge settings to defaults.
php artisan rconfig:seed-purge-defaults
rconfig:send-snippet
Section titled “rconfig:send-snippet”Sends a command snippet to specified devices.
# Send snippet ID 5 to devices 21 and 22php artisan rconfig:send-snippet 5 21 22
rconfig:slacktest
Section titled “rconfig:slacktest”Tests Slack integration configuration. Sends a test message to the configured Slack channel.
php artisan rconfig:slacktest
rconfig:snippet-task
Section titled “rconfig:snippet-task”Sends snippets to all devices associated with specified tasks.
# Send snippets for task 123456php artisan rconfig:snippet-task 123456
# Enable debug outputphp artisan rconfig:snippet-task 123456 -d
rconfig:snmp-poll-device
Section titled “rconfig:snmp-poll-device”Polls SNMP data for specific device or all devices with optional walk functionality.
php artisan rconfig:snmp-poll-device
rconfig:snmp-registry
Section titled “rconfig:snmp-registry”Manages SNMP trap registry from GitHub.
php artisan rconfig:snmp-registry
rconfig:snmp-trap-handler
Section titled “rconfig:snmp-trap-handler”Handles incoming SNMP traps and processes them.
php artisan rconfig:snmp-trap-handler
rconfig:snmp-trap-supervisor
Section titled “rconfig:snmp-trap-supervisor”Manages SNMP trap handler service via Supervisor.
php artisan rconfig:snmp-trap-supervisor
rconfig:sweep-xftp-dir
Section titled “rconfig:sweep-xftp-dir”Sweeps the xFTP directory for files, matches filenames to device IDs, and uploads them to the correct device directory.
php artisan rconfig:sweep-xftp-dir
rconfig:sync-tasks
Section titled “rconfig:sync-tasks”Syncs the application schedule with the schedule monitor.
php artisan rconfig:sync-tasks
rconfig:test-notifications-recipients
Section titled “rconfig:test-notifications-recipients”Tests the notification recipients method with different notification types and channels.
php artisan rconfig:test-notifications-recipients
rconfig:transform-eoc-definitions
Section titled “rconfig:transform-eoc-definitions”Transforms legacy EOC definitions JSON to CIC policy format and updates the database.
php artisan rconfig:transform-eoc-definitions
rconfig:transform-policy-definitions
Section titled “rconfig:transform-policy-definitions”Transforms policy definitions JSON and updates the database.
php artisan rconfig:transform-policy-definitions
rconfig:update-device-roles
Section titled “rconfig:update-device-roles”Updates all devices to ensure they have at least admin roles attached.
php artisan rconfig:update-device-roles
rconfig:update-rbac-data ⭐
Section titled “rconfig:update-rbac-data ⭐”Updates or refreshes permissions table with new permissions. Essential command if you have added new roles or permissions via updates or you get 403 errors in the UI.
php artisan rconfig:update-rbac-data
rconfig:update-snippet-roles
Section titled “rconfig:update-snippet-roles”Updates all snippets to ensure they have at least admin roles attached.
php artisan rconfig:update-snippet-roles
rconfig:update-tag-roles
Section titled “rconfig:update-tag-roles”Updates all tags to ensure they have at least admin roles attached.
php artisan rconfig:update-tag-roles
rconfig:vector-cm-messages
Section titled “rconfig:vector-cm-messages”Consumes messages from rConfig Vector Central Manager RabbitMQ queue.
php artisan rconfig:vector-cm-messages
rconfig:xftp-toggle
Section titled “rconfig:xftp-toggle”Toggles FTP/TFTP or SFTP(SCP) servers on or off.
# Toggle FTP/TFTP onphp artisan rconfig:xftp-toggle on
# Toggle FTP/TFTP offphp artisan rconfig:xftp-toggle off
Legacy List Commands
Section titled “Legacy List Commands”The following commands list various rConfig resources and their IDs for use with other commands:
php artisan rconfig:list-categories
- Lists all Command Groupsphp artisan rconfig:list-devices
- Lists all devicesphp artisan rconfig:list-snippets
- Lists all command snippetsphp artisan rconfig:list-tags
- Lists all tagsphp artisan rconfig:list-tasks
- Lists all tasks
Additional Notes
Section titled “Additional Notes”- All commands must be run from the rConfig installation directory (
/var/www/html/rconfig8/current
) - Commands require root privileges or sudo access
- Many commands support the
-d
flag for verbose debug output - For detailed integration documentation, refer to the specific integration sections in the documentation
Related Documentation
Section titled “Related Documentation”- Device Management Fundamentals - Core device concepts and workflows
- Network Device Connectivity & Backup Process - Understanding device connectivity
- Configuration Snippets - Automated configuration deployment
- SNMP Trap Handler - Event-driven automation
- System Logs - Troubleshooting and diagnostics