Nautobot Device Sync (Legacy V1)
Nautobot Device Sync (Legacy V1): Network Device Inventory Synchronization with rConfig V8
Section titled “Nautobot Device Sync (Legacy V1): Network Device Inventory Synchronization with rConfig V8”
Nautobot Device Sync enables automated synchronization of network device inventory from Nautobot network automation platform into rConfig V8. This integration extracts device information from Nautobot, transforms it using tag-based mappings, and imports devices through a staging process for administrator review before production deployment.
| Platform | rConfig V8 Support | Platform Version Tested |
|---|---|---|
| Nautobot | ✓ Verified | 2.0+, 2.4.8+ |
When to Use This Page
Section titled “When to Use This Page”Follow this guide only if you are maintaining an existing legacy Nautobot integration on rConfig V8.2.x. For any new integration, use Nautobot Device Sync V2 instead, which supports Device Profiles and a unified preview/apply pipeline.
How It Works
Section titled “How It Works”The Nautobot Device Sync follows an ETL (Extract, Transform, Load) pattern with a review stage:
- Extract: Connect to Nautobot API and retrieve device inventory based on configured tags
- Transform & Map: Parse Nautobot device data and apply rConfig-specific tag mappings
- Load to Staging: Import transformed devices into staging table for review
- Review & Approve: Administrator validates staged devices and resolves any issues
- Deploy: Import approved devices into main rConfig device inventory
- Schedule: Automated sync jobs keep inventory synchronized with Nautobot
This idempotent process prevents duplicate device creation and maintains consistency across synchronizations. Staging tables are cleared after successful deployment to production.
Prerequisites
Section titled “Prerequisites”Before configuring Nautobot Device Sync, ensure you have:
Nautobot requirements:
- Nautobot 2.0 or later (2.4.8+ recommended)
- Administrator access to Nautobot
- API token with read permissions for devices, tags, and related objects
- Devices tagged for filtering and mapping
- Network connectivity between Nautobot and rConfig servers
rConfig requirements:
- rConfig V8 Professional
- Administrator access to rConfig
- Credential sets configured for device authentication
- Device templates, vendors, categories, and tags created
Nautobot device tagging:
All devices to be synchronized must have the following rConfig-specific tags applied in Nautobot (these are optional from V8.2.0+ if using Device Profiles - see below):
| Tag Name | Required | Description | Example |
|---|---|---|---|
rconfig::template::{id} | Yes | Device template ID | rconfig::template::1 |
rconfig::credentialset::{id} | Yes | Credential set ID | rconfig::credentialset::5 |
rconfig::vendor::{id} | Yes | Vendor ID | rconfig::vendor::2 |
rconfig::category::{id} | Yes | Category ID | rconfig::category::3 |
rconfig::tag::{id} | Yes | Tag ID (comma-separated for multiple) | rconfig::tag::7,8,9 |
rconfig::model::{string} | Yes | Device model string | rconfig::model::Catalyst 9300 |
rconfig::prompt::{string} | Yes | Command prompt regex | rconfig::prompt::[>#] |
rconfig::enable_prompt::{string} | Yes | Enable prompt regex | rconfig::enable_prompt::[>#] |
rconfig::snmp_group::{id} | No | SNMP group ID for device | rconfig::snmp_group::5 |
rconfig::agent::{id} | No | Agent ID for device (Requires Vector Server) | rconfig::agent::3 |
rconfig::device_profile::{slug} | Conditional | Device Profile slug reference (profile mode) | rconfig::device_profile::core-switch-profile |
(snmp_group and agent tags are optional and only work after version 8.2.0)
rconfig::device_profile::{slug} is supported in V8.2.0+ for legacy NetBox/Nautobot sync, using the same transform logic as the NetBox integration.
Device Profile Mode in Nautobot (V8.2.0+)
Section titled “Device Profile Mode in Nautobot (V8.2.0+)”Use this Nautobot tag format in profile mode:
rconfig::device_profile::<profile-slug>
Behavior summary:
- Profile slug resolves to an active Device Profile in rConfig
- Profile baseline fields are authoritative
rconfig::tag::{id}values can remain additive where supported
Legacy-to-Profile Migration (Nautobot)
Section titled “Legacy-to-Profile Migration (Nautobot)”Recommended sequence:
- Create Device Profiles in rConfig for common device roles.
- Add
rconfig::device_profile::{slug}to a pilot device set in Nautobot. - Remove legacy hard-conflict mapping tags from those devices.
- Keep
rconfig::tag::{id}values where additive tagging is needed. - Run extract/transform/load-to-staging and validate mapped results.
- Run full deployment and expand rollout in batches.
Configure Nautobot
Section titled “Configure Nautobot”Step 1: Create API Token
Section titled “Step 1: Create API Token”Create a Nautobot API token with read permissions:
- Navigate to User > API Tokens in Nautobot
- Click Add to create new token
- Configure token settings:
- User: Select your user account
- Allowed IPs: Leave blank for any IP, or restrict to rConfig server IP
- Write enabled: Leave unchecked (read-only access sufficient)
- Description:
rConfig Device Sync
- Click Create
- Copy the token immediately (you won’t be able to view it again)
Step 2: Tag Devices for Sync
Section titled “Step 2: Tag Devices for Sync”Apply rConfig-specific tags to Nautobot devices:
- Navigate to Devices > Devices
- Select a device to edit
- Scroll to Tags section
- Add required rConfig tags with IDs:
Example tagging:
rconfig::template::1rconfig::credentialset::5rconfig::vendor::2rconfig::category::3rconfig::tag::7,10,15rconfig::model::Catalyst 9300rconfig::prompt::[>#]rconfig::enable_prompt::[>#]rconfig::snmp_group::5rconfig::agent::3- Save the device
- Repeat for all devices to be synchronized
Step 3: Create Filter Tags (Optional)
Section titled “Step 3: Create Filter Tags (Optional)”Create Nautobot tags to filter which devices to sync:
- Navigate to Organization > Tags
- Create tags such as:
sync-to-rconfigproduction-networkmanaged-devices
- Apply filter tags to devices you want to sync
Configure the Connection
Section titled “Configure the Connection”Run the Sync
Section titled “Run the Sync”Legacy Nautobot sync is CLI-only: there is no Extract List, Transform, Staging Table, or Deploy UI for it. Run the ETL steps using rconfig:integration-nautobot, described fully in CLI Commands below:
--connection(-c): test connectivity to the configured Nautobot server--usertest(-u): verify the API token is valid--extract(-e): retrieve devices from Nautobot matching your configured tag filters--transform(-t) /--mapping(-m): parse rConfig tags and map them to templates, vendors, categories, and credentials--load(-l): load validated devices into the staging table--assessment(-a): run extract, transform, and load to staging without deploying, useful for validating configuration--deployment(-d): run the full pipeline and deploy valid devices to production
Verify Imported Devices
Section titled “Verify Imported Devices”Navigate to Devices to confirm newly imported devices appear with the templates, vendor, category, tags, and credential set specified in your tag mappings. Re-run --extract (or --assessment) to preview what the next sync would add before deploying again.
Schedule Automated Sync
Section titled “Schedule Automated Sync”There is no “Integration Job” task type in the Scheduled Tasks UI for legacy Nautobot sync. Automate it with a cron entry that runs the deployment command directly, in root’s crontab (rConfig’s scheduled artisan commands are expected to run as root):
sudo crontab -eAdd a line for the desired frequency, for example daily at 2:00 AM:
0 2 * * * php /var/www/html/rconfig8/current/artisan rconfig:integration-nautobot --deployment >> /var/log/rconfig-nautobot-sync.log 2>&1Review the log file after the first few scheduled runs to confirm the sync completes and devices deploy as expected.
CLI Commands
Section titled “CLI Commands”Main Integration Command
Section titled “Main Integration Command”php /var/www/html/rconfig8/current/artisan rconfig:integration-nautobotRunning without options displays available commands.
Available options:
| Option | Shortcut | Description |
|---|---|---|
--connection | -c | Test connection to Nautobot API |
--usertest | -u | Test API token credentials |
--extract | -e | Extract devices from Nautobot |
--transform | -t | Transform and map devices |
--mapping | -m | Run mapping process |
--load | -l | Load devices to staging table |
--assessment | -a | Run full process without deployment |
--deployment | -d | Run full process and deploy to production |
Example command sequences:
# Test connectionphp artisan rconfig:integration-nautobot --connection
# Full assessment (no deployment)php artisan rconfig:integration-nautobot --assessment
# Production deploymentphp artisan rconfig:integration-nautobot --deploymentSingle Device Sync Command
Section titled “Single Device Sync Command”Synchronize an individual Nautobot device through the complete ETL workflow:
php /var/www/html/rconfig8/current/artisan rconfig:integration-nautobot-single-device {deviceid} [options]Parameters:
{deviceid}: Nautobot device ID (UUID) to synchronize (required)
Options:
-d, --deployment: Deploy device to production after staging-a, --assessment: Run assessment only (load to staging without deployment)
Use cases:
Test device mapping:
# Extract, transform, and stage single devicephp artisan rconfig:integration-nautobot-single-device 30ae748e-7f27-4598-84d0-2e0284f896e6 --assessmentQuick device import:
# Import single device directly to productionphp artisan rconfig:integration-nautobot-single-device 30ae748e-7f27-4598-84d0-2e0284f896e6 --deploymentWorkflow:
- Extracts specified Nautobot device using device UUID
- Transforms device data using rConfig tag mappings
- Validates required tags and referenced resources
- Loads to staging table for review
- Deploys to production (if
-dflag used) - Outputs detailed process information and any errors
Example output:
$ php artisan rconfig:integration-nautobot-single-device 30ae748e-7f27-4598-84d0-2e0284f896e6 -d
Processing Nautobot Device UUID: 30ae748e-7f27-4598-84d0-2e0284f896e6✓ Extracting device from Nautobot✓ Device found: core-router-01.example.com✓ Transforming device data✓ Parsing tags: template::1, vendor::2, category::3✓ Validating required tags✓ Loading to staging table✓ Deploying to production devices✓ Device created: core-router-01.example.com✓ Scheduling initial configuration backup
Single device sync completed successfully.Common Gotchas
Section titled “Common Gotchas”Troubleshooting
Section titled “Troubleshooting”Connection test fails
Section titled “Connection test fails”Check Nautobot URL: Verify base URL is correct and accessible from rConfig server
Verify SSL settings: Disable SSL verification for self-signed certificates
Test network connectivity: Ensure firewall allows traffic between rConfig and Nautobot
Check Nautobot API status: Verify Nautobot API is enabled and responding
Credential test fails
Section titled “Credential test fails”Verify API token: Confirm token was copied correctly without extra spaces
Check token permissions: Ensure token has read access to devices and tags
Review token status: Confirm token is not expired or revoked in Nautobot
Test token manually: Use curl to test API access with the token
No devices extracted
Section titled “No devices extracted”Verify tag filters: Check that filter tags match Nautobot device tags exactly
Review AND condition: Remember multiple tags use AND logic, devices need ALL filter tags
Check device status: Confirm devices are active in Nautobot
Validate tag syntax: Verify tag names are spelled correctly (case-sensitive)
Transformation errors
Section titled “Transformation errors”Missing required tags: Add all required rConfig tags to Nautobot devices
Invalid ID format: Ensure tags use correct format with :: delimiters (e.g., rconfig::template::1)
Wrong ID numbers: Verify template, vendor, category IDs exist in rConfig
Tag parsing issues: Check for extra spaces or special characters in tag values
Devices fail to deploy
Section titled “Devices fail to deploy”Duplicate hostnames: Check for existing devices with same hostname in rConfig
Invalid IDs: Verify all ID numbers in tags correspond to existing rConfig resources
Credential set errors: Confirm credential set ID exists and is accessible
Database constraints: Review Laravel logs for database errors
Single device sync fails
Section titled “Single device sync fails”Invalid device UUID: Verify UUID exists in Nautobot and is correctly formatted
Device not accessible: Ensure API token can access the specific device
Missing tags: Check device has all required rConfig tags in Nautobot
Review command output: The single-device command prints each ETL step (extract, transform, validate, load, deploy) as it runs, so the failing step is visible directly in the output
Tag filter issues
Section titled “Tag filter issues”Too restrictive: Multiple filter tags use AND logic, making extraction too narrow
No matching devices: Verify at least some devices have ALL specified filter tags
Case sensitivity: Ensure filter tag names match Nautobot tags exactly
Solution: Run multiple sync processes with different single-tag filters if OR logic needed
Scheduled sync not running
Section titled “Scheduled sync not running”Verify the cron entry: Confirm the crontab line exists and is correctly formatted (sudo crontab -l)
Check it’s in root’s crontab: rConfig’s scheduled artisan commands are expected to run as root, not a lower-privilege service account
Review the log file: Check the output redirected from the cron entry (e.g. /var/log/rconfig-nautobot-sync.log) for errors from the last run
Test the command manually: Run php artisan rconfig:integration-nautobot --deployment directly as the same user the cron job runs as, to rule out permission or environment differences
Best Practices
Section titled “Best Practices”Use ID-based tagging: Always use numeric IDs in Nautobot tags for templates, credentials, vendors, and categories.
Document ID mappings: Maintain a reference document mapping rConfig IDs to resource names for easy tagging.
Start with test group: Create a small set of test devices in Nautobot with proper tags before full-scale sync.
Single filter tags: Use one filter tag per sync configuration to avoid overly restrictive AND conditions.
Test single devices: Use single device sync command to validate mappings before bulk operations.
Consistent tag format: Establish and enforce tag naming standards across Nautobot inventory.
Regular monitoring: Check sync logs regularly for errors or validation issues.
Staged review: Use assessment mode to preview imports before deploying to production.
Schedule wisely: Run automated syncs during low-activity periods to minimize impact.
Backup before bulk imports: Create rConfig backup before first large-scale deployment.
Related Documentation
Section titled “Related Documentation”- Device Sync Overview - Understanding device synchronization concepts
- Zabbix Sync Setup - Configure Zabbix integration
- NetBox Sync Setup - Configure NetBox integration
- Device Management - Managing devices in rConfig