Skip to content

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 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+

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.

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 (these are optional from V8.2.0+ if using Device Profiles - see below):

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}YesTag ID (comma-separated for multiple)rconfig::tag::7,8,9
rconfig::model::{string}YesDevice model stringrconfig::model::Catalyst 9300
rconfig::prompt::{string}YesCommand prompt regexrconfig::prompt::[>#]
rconfig::enable_prompt::{string}YesEnable prompt regexrconfig::enable_prompt::[>#]
rconfig::snmp_group::{id}NoSNMP group ID for devicerconfig::snmp_group::5
rconfig::agent::{id}NoAgent ID for device (Requires Vector Server)rconfig::agent::3
rconfig::device_profile::{slug}ConditionalDevice 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.

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

Recommended sequence:

  1. Create Device Profiles in rConfig for common device roles.
  2. Add rconfig::device_profile::{slug} to a pilot device set in Nautobot.
  3. Remove legacy hard-conflict mapping tags from those devices.
  4. Keep rconfig::tag::{id} values where additive tagging is needed.
  5. Run extract/transform/load-to-staging and validate mapped results.
  6. Run full deployment and expand rollout in batches.

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::[>#]
rconfig::snmp_group::5
rconfig::agent::3
  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

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:

  1. --connection (-c): test connectivity to the configured Nautobot server
  2. --usertest (-u): verify the API token is valid
  3. --extract (-e): retrieve devices from Nautobot matching your configured tag filters
  4. --transform (-t) / --mapping (-m): parse rConfig tags and map them to templates, vendors, categories, and credentials
  5. --load (-l): load validated devices into the staging table
  6. --assessment (-a): run extract, transform, and load to staging without deploying, useful for validating configuration
  7. --deployment (-d): run the full pipeline and deploy valid devices to production

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.

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):

Terminal window
sudo crontab -e

Add a line for the desired frequency, for example daily at 2:00 AM:

Terminal window
0 2 * * * php /var/www/html/rconfig8/current/artisan rconfig:integration-nautobot --deployment >> /var/log/rconfig-nautobot-sync.log 2>&1

Review the log file after the first few scheduled runs to confirm the sync completes and devices deploy as expected.

Terminal window
php /var/www/html/rconfig8/current/artisan rconfig:integration-nautobot

Running without options displays available 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:

Terminal window
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:

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

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

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 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

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.