Skip to content

Nautobot Device Sync

Nautobot Device Sync: Network Device Inventory Synchronization with rConfig V8

Section titled “Nautobot Device Sync: Network Device Inventory Synchronization with rConfig V8”
Nautobot network automation platform logo for device synchronization with rConfig V8 Pro network configuration management

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.

PlatformrConfig V8 SupportPlatform Version Tested
Nautobot✓ Verified2.0+, 2.4.8+

The Nautobot Device Sync follows an ETL (Extract, Transform, Load) pattern with a review stage:

  1. Extract: Connect to Nautobot API and retrieve device inventory based on configured tags
  2. Transform & Map: Parse Nautobot device data and apply rConfig-specific tag mappings
  3. Load to Staging: Import transformed devices into staging table for review
  4. Review & Approve: Administrator validates staged devices and resolves any issues
  5. Deploy: Import approved devices into main rConfig device inventory
  6. 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.

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:

Tag NameRequiredDescriptionExample
rconfig::template::{id}YesDevice template IDrconfig::template::1
rconfig::credentialset::{id}YesCredential set IDrconfig::credentialset::5
rconfig::vendor::{id}YesVendor IDrconfig::vendor::2
rconfig::category::{id}YesCategory IDrconfig::category::3
rconfig::tag::{id}NoTag ID (comma-separated for multiple)rconfig::tag::7,8,9
rconfig::model::{string}NoDevice model stringrconfig::model::Catalyst 9300
rconfig::prompt::{string}NoCommand prompt regexrconfig::prompt::[>#]
rconfig::enable_prompt::{string}NoEnable prompt regexrconfig::enable_prompt::[>#]

Create a Nautobot API token with read permissions:

  1. Navigate to User > API Tokens in Nautobot
  2. Click Add to create new token
  3. 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
  4. Click Create
  5. Copy the token immediately (you won’t be able to view it again)

Apply rConfig-specific tags to Nautobot devices:

  1. Navigate to Devices > Devices
  2. Select a device to edit
  3. Scroll to Tags section
  4. Add required rConfig tags with IDs:

Example tagging:

rconfig::template::1
rconfig::credentialset::5
rconfig::vendor::2
rconfig::category::3
rconfig::tag::7,10,15
rconfig::model::Catalyst 9300
rconfig::prompt::[>#]
rconfig::enable_prompt::[>#]
  1. Save the device
  2. Repeat for all devices to be synchronized

Create Nautobot tags to filter which devices to sync:

  1. Navigate to Organization > Tags
  2. Create tags such as:
    • sync-to-rconfig
    • production-network
    • managed-devices
  3. Apply filter tags to devices you want to sync

Navigate to Settings > Integrations in rConfig and click Configure on the Nautobot integration.

Integration Options Nautobot Configuration

Complete the Nautobot integration form:

Integration Name:

  • Descriptive name for this integration (e.g., “Production Nautobot”)

Nautobot Base URL:

  • Full URL to Nautobot server (e.g., https://nautobot.example.com)

Nautobot API Token:

  • API token created in Nautobot with read permissions

SSL Verification:

  • SSL Verify Host: Uncheck if using self-signed certificates
Nautobot Tag Filters

Select which Nautobot devices to synchronize using tags:

Tag Filter Configuration:

  • Enter tag name in the input field
  • Click Add tag to include in filter
  • Add multiple tags as needed

Example filter tags:

  • sync-to-rconfig
  • production-network
  • managed-devices

Click Save to store the configuration.

Test Connection:

  1. Click Test Connection button
  2. Verify successful connection to Nautobot API
  3. Review connection status message

Test Credentials:

  1. Click Test Credentials button
  2. Successful test confirms API token is valid
  3. Verify API permissions are correct

Click Next on the configuration screen or navigate to the Extract List tab.

Empty Extract List

Click Run extract from Nautobot to retrieve devices.

The extraction process:

  1. Connects to Nautobot API
  2. Retrieves devices based on configured tag filters
  3. Extracts device properties and tags
  4. Displays results in extract list table
Extracted Devices List

Review the extracted device list:

  • View in Nautobot: Opens device directly in Nautobot interface
  • Delete: Remove device from extract list (will re-import on next automated run)
  • Expand row: View detailed device information from Nautobot

Click Run Transform & Mapping to process extracted devices.

The transformation process:

  1. Parses rConfig-specific tags from Nautobot devices
  2. Extracts IDs from tag values (e.g., rconfig::template::1 → template ID 1)
  3. Maps tag values to rConfig templates, vendors, categories
  4. Validates required tags are present
  5. Checks that referenced rConfig resources exist
  6. Flags any devices with validation errors
Transformed Devices

After transformation, the extract list updates:

  • Expandable rows: Show mapped rConfig properties for each device
  • Status indicators: Show whether device is ready for import
  • Validation messages: Display any errors preventing import

Common validation errors:

  • Missing required tags
  • Invalid template, vendor, or category IDs
  • Credential set not found
  • Tag ID format incorrect (missing :: delimiter or ID number)
  • Duplicate hostnames

Click Status & Logs tab to view detailed transformation logs:

  • Successful transformations
  • Validation errors with device names
  • Tag parsing issues
  • Resource not found errors

Click Load to Device Staging Table to import transformed devices.

The loading process:

  1. Validates all devices in extract list
  2. Imports valid devices to staging table
  3. Skips devices with validation errors
  4. Maintains staging table for review
Device Staging Table

The staging table displays:

  • All devices ready for import
  • Expandable rows showing complete rConfig property mappings
  • Final validation status
  • Device details as they will appear in rConfig

Staging table actions:

  • Run assessment: Execute full ETL process up to staging (no deployment)
  • Run full deployment: Complete ETL process and import to production devices
  • Manual review: Examine individual devices before deployment

Review staged devices and click Run full deployment when ready.

The deployment process:

  1. Validates staged devices one final time
  2. Creates devices in main rConfig device inventory
  3. Links devices to templates, vendors, categories, tags
  4. Assigns credential sets
  5. Schedules immediate configuration backups
  6. Clears staging table
  7. Logs deployment results

Click Run assessment to test the full process without deploying:

  • Executes extract, transform, and load to staging
  • Does not deploy to production devices
  • Useful for validating configuration before automated runs
  • Staging table remains populated for review

Navigate to Devices to view newly imported devices.

Imported Devices

Integration indicator: Imported devices display an integration icon next to the hostname, showing the device source.

Device details: Click a device to view full details. Integration-sourced devices include:

  • View in Nautobot button linking to Nautobot device
  • Integration device ID stored for API reference
  • Source integration name in device metadata

Navigate to Scheduled Tasks and click Add Task.

Create Integration Task

Task Type: Select Integration Job from dropdown

Task Name: Descriptive name (e.g., “Daily Nautobot Sync”)

Task Description: Optional description of sync purpose

Choose the Nautobot integration configured in previous steps.

Configure sync frequency:

  • Daily: Run at specific time each day
  • Weekly: Run on specific day and time
  • Monthly: Run on specific date and time
  • Cron expression: Custom schedule using cron syntax

Example schedules:

  • Daily at 2:00 AM: 0 2 * * *
  • Every 6 hours: 0 */6 * * *
  • Monday through Friday at 1:00 AM: 0 1 * * 1-5

Review task settings and click Save.

The scheduled task will:

  • Run full ETL process automatically
  • Extract devices from Nautobot
  • Transform and map using configured tags
  • Load to staging table
  • Deploy valid devices to production
  • Log all activities
Terminal window
php /var/www/html/rconfig8/current/artisan rconfig:integration-nautobot

Running without options displays available commands:

Nautobot Integration CLI Commands

Available options:

OptionShortcutDescription
--connection-cTest connection to Nautobot API
--usertest-uTest API token credentials
--extract-eExtract devices from Nautobot
--transform-tTransform and map devices
--mapping-mRun mapping process
--load-lLoad devices to staging table
--assessment-aRun full process without deployment
--deployment-dRun full process and deploy to production

Example command sequences:

Terminal window
# Test connection
php artisan rconfig:integration-nautobot --connection
# Full assessment (no deployment)
php artisan rconfig:integration-nautobot --assessment
# Production deployment
php artisan rconfig:integration-nautobot --deployment

Synchronize an individual Nautobot device through the complete ETL workflow with verbose debugging output:

Terminal window
php /var/www/html/rconfig8/current/artisan rconfig:integration-nautobot-single-device {device_uuid} [options]

Parameters:

  • {device_uuid}: Nautobot device UUID to synchronize (required)

Options:

  • -d, --deployment: Deploy device to production after staging
  • -a, --assessment: Run assessment only (load to staging without deployment)
  • -v, --verbose: Display verbose output

Use cases:

Troubleshoot individual device:

Terminal window
# Process single device with verbose output
php artisan rconfig:integration-nautobot-single-device 30ae748e-7f27-4598-84d0-2e0284f896e6 -v

Test device mapping:

Terminal window
# Extract, transform, and stage single device
php artisan rconfig:integration-nautobot-single-device 30ae748e-7f27-4598-84d0-2e0284f896e6 --assessment

Quick device import:

Terminal window
# Import single device directly to production
php artisan rconfig:integration-nautobot-single-device 30ae748e-7f27-4598-84d0-2e0284f896e6 --deployment

Workflow:

  1. Extracts specified Nautobot device using device UUID
  2. Transforms device data using rConfig tag mappings
  3. Validates required tags and referenced resources
  4. Loads to staging table for review
  5. Deploys to production (if -d flag used)
  6. Outputs detailed process information and any errors

Example output:

Terminal window
$ 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.

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

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

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)

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

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

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

Use verbose flag: Run with -v option to see detailed error information

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

Verify task enabled: Check scheduled task is active

Review cron schedule: Ensure cron expression is valid

Check task logs: View scheduled task execution history

Verify queue workers: Ensure Horizon/queue workers are running

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.