SNMP Polling Implementation
SNMP Polling Implementation
Section titled “SNMP Polling Implementation”SNMP Polling in rConfig V8 Pro automates collection of device properties and operational data using the Simple Network Management Protocol. This transforms rConfig into a comprehensive network inventory platform, enabling organizations to maintain accurate, up-to-date device information without manual data entry. SNMP data collection happens automatically during device backups, seamlessly integrating inventory management with configuration management workflows.
Understanding SNMP Polling in rConfig
Section titled “Understanding SNMP Polling in rConfig”What SNMP Polling Provides
Section titled “What SNMP Polling Provides”Automated inventory maintenance: Device properties update automatically during backups—serial numbers, software versions, hardware models, uptime, and custom data points are captured without administrator intervention.
Real-time visibility: Access current device status and operational metrics without logging into individual devices, accelerating troubleshooting and capacity planning.
Compliance and audit support: Automated collection of asset data provides audit-ready documentation demonstrating version control and asset tracking.
Integration enablement: Collected data exports via API or reports to feed CMDB, ITSM platforms, or analytics tools.
How SNMP Polling Works
Section titled “How SNMP Polling Works”When rConfig performs device backups, SNMP polling occurs as part of the workflow:
- Backup initiates for devices with assigned polling groups
- rConfig connects using configured connection profiles and queries defined OIDs
- Raw SNMP responses are parsed, applying regex patterns to extract values
- Extracted values are stored as device properties
- Changes are logged for historical tracking
This integration means SNMP collection happens seamlessly without separate polling schedules.
Prerequisites
Section titled “Prerequisites”- rConfig V8 Pro (SNMP Polling is a Pro-only feature)
- Network devices with SNMP enabled (v2c or v3)
- SSH or console access to the rConfig server to install the PHP SNMP extension
- SNMP credentials for your target devices (community string for v2c; username, auth and privacy details for v3)
Step 1: Install PHP SNMP Extension
Section titled “Step 1: Install PHP SNMP Extension”The PHP SNMP extension is required for all SNMP functionality and must be installed before configuring polling.
CentOS / Rocky Linux

cd /homednf -y install wgetwget https://dl.rconfig.com/downloads/php-updates/centos-php8-update.sh -O /home/centos-php8-update.shchmod +x centos-php8-update.sh./centos-php8-update.shRHEL 9

cd /homednf -y install wgetwget https://dl.rconfig.com/downloads/php-updates/centos-php8-update.sh -O /home/centos-php8-update.shchmod +x centos-php8-update.sh./centos-php8-update.shAlma Linux 9
cd /homednf -y install wgetwget https://dl.rconfig.com/downloads/php-updates/centos-php8-update.sh -O /home/centos-php8-update.shchmod +x centos-php8-update.sh./centos-php8-update.shUbuntu 20.04+

cd /homesudo apt-get install wgetwget https://dl.rconfig.com/downloads/php-updates/ubuntu-php8-update.sh -O /home/ubuntu-php8-update.shchmod +x ubuntu-php8-update.sh./ubuntu-php8-update.shVerify Installation
Section titled “Verify Installation”After running the installation script, confirm the SNMP extension is properly loaded:
php -m | grep snmpYou should see snmp in the output. If not, restart services:
systemctl restart nginx php-fpm# or for Apache:systemctl restart httpd php-fpmStep 2: Configure SNMP on Network Devices
Section titled “Step 2: Configure SNMP on Network Devices”Before rConfig can poll devices, SNMP must be enabled on target devices. Configuration varies by vendor. Please refer to your device documentation for exact commands. Below are examples for common vendors.
Cisco IOS/IOS-XE
Section titled “Cisco IOS/IOS-XE”SNMPv2c configuration:
snmp-server community YourSecureCommunity ROaccess-list 10 permit 10.1.1.10snmp-server community YourSecureCommunity RO 10snmp-server location "Data Center A, Rack 15"snmp-server contact "netops@example.com"SNMPv3 configuration (recommended):
snmp-server group readonly v3 priv read v1defaultsnmp-server user snmpuser readonly v3 auth sha AuthPassword123 priv aes 128 PrivPassword123snmp-server location "Data Center A, Rack 15"snmp-server contact "netops@example.com"Juniper JUNOS
Section titled “Juniper JUNOS”SNMPv2c:
set snmp community YourSecureCommunity authorization read-onlyset snmp community YourSecureCommunity clients 10.1.1.10/32set snmp location "Data Center A, Rack 15"set snmp contact "netops@example.com"commitSNMPv3:
set snmp v3 usm local-engine user snmpuser authentication-sha authentication-password AuthPassword123set snmp v3 usm local-engine user snmpuser privacy-aes128 privacy-password PrivPassword123set snmp v3 vacm security-to-group security-model usm security-name snmpuser group readonlyset snmp v3 vacm access group readonly default-context-prefix security-model any security-level privacy read-view allset snmp view all oid .1 includecommitNetwork Access
Section titled “Network Access”Ensure rConfig can reach devices on:
- UDP 161 (SNMP queries) - REQUIRED
- UDP 162 (SNMP traps) - Optional
Test connectivity from rConfig server:
# Install SNMP utilities if needed# CentOS/RHEL/Rocky/Alma:dnf install net-snmp-utils
# Ubuntu:apt-get install snmp
# Test SNMPv2csnmpwalk -v2c -c YourSecureCommunity 192.168.1.1 sysDescr
# Test SNMPv3snmpwalk -v3 -l authPriv -u snmpuser -a SHA -A AuthPassword123 -x AES -X PrivPassword123 192.168.1.1 sysDescrStep 3: Create SNMP Connection Profiles
Section titled “Step 3: Create SNMP Connection Profiles”Connection Profiles store credentials and parameters for SNMP communication. Navigate to Inventory → SNMP Properties → SNMP Connections and click Add Connection Profile.
SNMPv2c Profile
Section titled “SNMPv2c Profile”Configuration:
- Name:
Production-ReadOnly-V2c(descriptive name) - SNMP Version:
v2c - Community String: Your read-only community (e.g.,
YourSecureCommunity) - Timeout: 5-10 seconds (increase for slow devices or high latency)
- Retries: 3-5 attempts
SNMPv3 Profile (Recommended)
Section titled “SNMPv3 Profile (Recommended)”Configuration:
- Name:
Production-ReadOnly-V3 - SNMP Version:
v3 - Security Level:
authPriv(recommended for production) - Security Name: SNMP username (e.g.,
snmpuser) - Authentication Protocol:
SHA(recommended) - Authentication Passphrase: Strong password (8+ characters)
- Privacy Protocol:
AES-128(recommended) - Privacy Passphrase: Strong password (8+ characters)
- Timeout: 5-10 seconds
- Retries: 3-5 attempts
Security recommendations:
- Always use
authPrivsecurity level in production - Use SHA or stronger for authentication
- Use AES-128 or higher for encryption
- Use strong, unique passphrases (12+ characters, mixed case, numbers, symbols)
- Rotate credentials quarterly
Step 4: Define SNMP OIDs
Section titled “Step 4: Define SNMP OIDs”OIDs specify what data to collect from devices. Navigate to Inventory → SNMP Properties → SNMP OIDs and click Add OID.
Common Standard OIDs
Section titled “Common Standard OIDs”| OID | Name | Description |
|---|---|---|
| 1.3.6.1.2.1.1.1.0 | sysDescr | System description and version |
| 1.3.6.1.2.1.1.3.0 | sysUpTime | Time since last reboot |
| 1.3.6.1.2.1.1.4.0 | sysContact | System contact |
| 1.3.6.1.2.1.1.5.0 | sysName | System hostname |
| 1.3.6.1.2.1.1.6.0 | sysLocation | Physical location |
Vendor-Specific OID Examples
Section titled “Vendor-Specific OID Examples”Cisco (1.3.6.1.4.1.9.*):
1.3.6.1.4.1.9.3.6.3.0- Chassis serial number
Juniper (1.3.6.1.4.1.2636.*):
1.3.6.1.4.1.2636.3.1.3.0- Serial number
HP/Aruba (1.3.6.1.4.1.11.*):
1.3.6.1.4.1.11.2.36.1.1.5.1.1.3.1- Serial number
Palo Alto Networks (1.3.6.1.4.1.25461.*):
1.3.6.1.4.1.25461.2.1.2.1.3.0- Serial number
Creating OID Definitions
Section titled “Creating OID Definitions”Example: System Description
OID: 1.3.6.1.2.1.1.1.0Name: sysDescrDescription: System description including hardware model and software versionRegex: (leave empty to capture full output)Example: Software Version with Regex
OID: 1.3.6.1.2.1.1.1.0Name: softwareVersionDescription: Extract software version from system descriptionRegex: /Version\s+([0-9]+\.[0-9]+\.[0-9]+[a-zA-Z0-9]*)/Regex extracts: 16.12.04 from full output: Cisco IOS Software, C3850 Software (CAT3850-UNIVERSALK9-M), Version 16.12.04, RELEASE SOFTWARE (fc5)
Regex Pattern Guidelines
Section titled “Regex Pattern Guidelines”Use capture groups: Wrap the value you want in parentheses: /Serial:\s+([A-Z0-9]+)/
Test patterns: Use regex101.com with PHP flavor to validate patterns before deploying
Common patterns:
# Serial number/Serial Number:\s*([A-Z0-9]+)/i
# IP address/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/
# Version number/Version:?\s*([0-9]+\.[0-9]+[0-9.]*)/
# MAC address/([0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2})/iStep 5: Create SNMP Polling Groups
Section titled “Step 5: Create SNMP Polling Groups”Polling Groups link devices, OIDs, and connection profiles. Navigate to Inventory → SNMP Properties → SNMP Groups and click Add Polling Group.
Example: Cisco Router Group
Section titled “Example: Cisco Router Group”Name: Cisco-Routers-ProductionDescription: Standard polling for Cisco IOS/IOS-XE routersConnection Profile: Production-ReadOnly-V2cOIDs: - sysDescr - sysUpTime - sysLocation - ciscoSerialNumber - softwareVersionEnabled: YesExample: Multi-Vendor Basic Group
Section titled “Example: Multi-Vendor Basic Group”Name: All-Devices-Basic-InfoDescription: Universal polling using standard OIDs for all vendorsConnection Profile: Production-ReadOnly-V3OIDs: - sysDescr - sysUpTime - sysName - sysLocation - sysContactEnabled: YesBest Practices
Section titled “Best Practices”Limit OID count: Keep groups to 10-20 OIDs maximum to avoid timeout issues
Group by vendor: Create separate groups for Cisco, Juniper, etc. to avoid querying incompatible OIDs
Use descriptive names: Clear naming like {Vendor}-{DeviceType}-{Purpose} aids management
Test before scaling: Create test group with single device before broad deployment
Step 6: Assign Devices to Polling Groups
Section titled “Step 6: Assign Devices to Polling Groups”Individual Assignment
Section titled “Individual Assignment”- Navigate to Devices → [Your Device]
- Click Edit
- Select polling group from SNMP Polling Group dropdown
- Click Save
Step 7: Execute SNMP Polling
Section titled “Step 7: Execute SNMP Polling”Automatic Polling During Backups
Section titled “Automatic Polling During Backups”SNMP polling happens automatically when devices with assigned polling groups are backed up. No additional configuration needed.
Manual Polling via CLI
Section titled “Manual Polling via CLI”Poll specific device:
php artisan rconfig:snmp-poll-device 1001Poll all devices:
php artisan rconfig:snmp-poll-devicePerform SNMP walk (discover available OIDs):
php artisan rconfig:snmp-poll-device 1001 --walkSNMP walk outputs the snmpwalk command for the device so you can run it manually and inspect all available OIDs, useful for discovering vendor-specific OIDs.
Step 8: View SNMP Properties
Section titled “Step 8: View SNMP Properties”Device Properties Page
Section titled “Device Properties Page”- Navigate to Devices → [Your Device]
- SNMP-polled properties appear with values on the left side panel
SNMP-polled values appear in the left-hand properties panel of the device view, each labelled with the OID name and the timestamp of the last successful poll.
Inventory Reports
Section titled “Inventory Reports”- Navigate to Devices → Inventory Report
- Generate report
- Download CSV/Excel
- SNMP properties appear as columns
API Access
Section titled “API Access”# Get device properties via APIcurl -X GET https://rconfig.example.com/api/devices/1001/properties \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json"Monitoring and Logging
Section titled “Monitoring and Logging”View Polling Logs
Section titled “View Polling Logs”- Navigate to System Settings → Monitoring & Debugging → Application Logs
- Filter by SNMP or device name
- Review polling success/failure messages
The application log records each polling event with the device ID and a success or error status. Filter by snmp_polling channel to isolate SNMP-related entries.
File-Based Logging
Section titled “File-Based Logging”# View recent SNMP log entriestail -f /var/www/html/rconfig8/current/storage/logs/laravel.log | grep -i snmp
# Search for errorsgrep -i "error.*snmp" /var/www/html/rconfig8/current/storage/logs/laravel.logTroubleshooting
Section titled “Troubleshooting”PHP SNMP Extension Not Loaded
Section titled “PHP SNMP Extension Not Loaded”Symptoms: “SNMP extension not loaded” errors
Resolution:
- Run installation script for your OS
- Restart web services:
systemctl restart nginx php-fpm - Verify:
php -m | grep snmp
No Response from Device
Section titled “No Response from Device”Symptoms: Polling times out, “No response from agent” errors
Diagnosis:
# Test connectivityping 192.168.1.1
# Test SNMPsnmpwalk -v2c -c YourCommunity 192.168.1.1 sysDescrPossible causes:
- Device unreachable or SNMP not enabled
- Firewall blocking UDP 161
- Incorrect community string/credentials
- Device ACLs restricting access
Resolution:
- Verify device IP and network connectivity
- Check firewall rules
- Confirm SNMP configuration on device
- Verify credentials match exactly
Authentication Failure (SNMPv3)
Section titled “Authentication Failure (SNMPv3)”Symptoms: “Authentication failure” or “USM authentication failure” errors
Resolution:
- Verify credentials match device configuration exactly (case-sensitive)
- Check security level matches (authPriv vs authNoPriv)
- Verify protocols match (SHA, AES match device)
- Test with command line using same credentials
- Check device SNMP user status and permissions
Timeout Errors
Section titled “Timeout Errors”Symptoms: Some OIDs timeout or entire polling operation times out
Resolution:
- Increase timeout in connection profile (10-15 seconds)
- Increase retry count (5+ retries)
- Reduce OID count per polling group
- Check device CPU/memory load
- Test network latency:
ping -c 10 192.168.1.1 - Avoid expensive OIDs (routing tables, large caches)
Regex Patterns Not Extracting Values
Section titled “Regex Patterns Not Extracting Values”Symptoms: Extracted values empty, null, or contain full raw output
Diagnosis:
- Check raw SNMP output:
snmpget -v2c -c Community 192.168.1.1 OID - Test regex at regex101.com with PHP flavor
- Verify pattern matches actual output format
Common fixes:
# Missing capture groupWrong: /Serial Number: [A-Z0-9]+/Correct: /Serial Number: ([A-Z0-9]+)/
# Case sensitivityWrong: /Serial Number: ([A-Z0-9]+)/Correct: /Serial Number: ([A-Z0-9]+)/i
# Escaped charactersWrong: /Version (16.12.04)/Correct: /Version \(([0-9.]+)\)/Debug Mode
Section titled “Debug Mode”Use the SNMP walk option to inspect raw device responses and verify OID availability:
php artisan rconfig:snmp-poll-device 1001 --walkThe walk output shows the snmpwalk command with connection parameters pre-filled. Run it manually on the server to inspect each OID response and identify mismatches between device output and your regex patterns.
Best Practices
Section titled “Best Practices”Security
Section titled “Security”- Use SNMPv3 with authPriv whenever possible for encrypted authentication
- Never use default community strings like “public” or “private”
- Restrict SNMP to management VLANs to isolate traffic
- Use read-only credentials - rConfig only needs read access
- Implement device ACLs restricting SNMP to rConfig server IP only
- Rotate credentials quarterly per security policy
- Monitor logs for unauthorized access attempts
Performance
Section titled “Performance”- Limit OIDs per group to 10-20 maximum
- Group by vendor to avoid querying incompatible OIDs
- Avoid expensive OIDs like full routing tables or ARP caches
- Enable SNMP caching on devices where supported
- Schedule intensive polls during off-peak hours
- Monitor system resources on rConfig server
Organization
Section titled “Organization”- Use descriptive names for profiles, OIDs, and groups
- Document custom OIDs thoroughly in description fields
- Test new OIDs on subset before broad deployment
- Maintain external documentation of polling configurations
- Version control regex patterns and document changes
What’s next
Section titled “What’s next”- Devices Management - Adding and configuring devices in rConfig
- SNMP Polling Concepts - Why and when to use SNMP polling vs config property parsing
- Scheduled Tasks - Automating backup and polling workflows
Quick Reference
Section titled “Quick Reference”CLI Commands
Section titled “CLI Commands”# Poll specific devicephp artisan rconfig:snmp-poll-device {device_id}
# Poll all devicesphp artisan rconfig:snmp-poll-device
# Poll with SNMP walkphp artisan rconfig:snmp-poll-device {device_id} --walk
# Enable debug outputphp artisan rconfig:snmp-poll-device {device_id} -dDefault SNMP Ports
Section titled “Default SNMP Ports”- UDP 161: SNMP queries (polling)
- UDP 162: SNMP traps (notifications)
Configuration Workflow
Section titled “Configuration Workflow”- Install PHP SNMP extension
- Enable SNMP on devices
- Create Connection Profile (credentials)
- Define OIDs (what to poll)
- Create Polling Group (link devices + OIDs + profile)
- Assign devices to Polling Group
- Run backup or manual poll