SNMP Configuration
Configure SNMP agent for network monitoring integration.
Overview
The snmp section configures the SNMP agent for:
- Integration with NOC monitoring systems
- Custom ATHENA-BNG-MIB for BNG-specific metrics
- AgentX subagent registration with net-snmp
- Session, QoS, CGNAT, and demux metrics
Configuration Options
enabled
Enable or disable SNMP agent (optional).
snmp:
enabled: true
Type: Boolean
Required: No
Default: false
Valid values: true, false
CLI:
abng# set snmp enabled true
community
SNMP community string (optional).
snmp:
community: "public"
Type: String
Required: No
Default: "public"
Constraints: Non-empty string
Purpose: Community string for SNMPv2c read access.
Security: Change from default in production.
CLI:
abng# set snmp community "my-community"
location
SNMP system location (optional).
snmp:
location: "Brisbane, Australia"
Type: String
Required: No
Default: Empty
Constraints: 1-255 characters
Purpose: System location for SNMP sysLocation OID.
CLI:
abng# set snmp location "Brisbane, Australia"
contact
SNMP system contact (optional).
snmp:
contact: "noc@example.com"
Type: String
Required: No
Default: Empty
Constraints: 1-255 characters
Purpose: System contact for SNMP sysContact OID.
CLI:
abng# set snmp contact "noc@example.com"
Example Configurations
Minimal SNMP Configuration
snmp:
enabled: true
Uses defaults:
- Community: "public"
- Location: Empty
- Contact: Empty
Full SNMP Configuration
snmp:
enabled: true
community: "my-community"
location: "Brisbane, Australia"
contact: "noc@example.com"
Configuration via CLI
Enable SNMP
abng> configure
abng# set snmp enabled true
abng# commit
Set Community String
abng# set snmp community "my-community"
abng# commit
Set Location and Contact
abng# set snmp location "Brisbane, Australia"
abng# set snmp contact "noc@example.com"
abng# commit
Verification
View SNMP Configuration
abng> show configuration | match "^snmp:"
snmp:
enabled: true
community: my-community
location: Brisbane, Australia
contact: noc@example.com
Query SNMP Agent
snmpwalk -v2c -c my-community localhost 1.3.6.1.4.1.65245
Check SNMP Logs
sudo journalctl -u snmpd -f
ATHENA-BNG-MIB
Custom MIB under enterprise OID 1.3.6.1.4.1.65245 — 28 metrics across 6 groups.
System (.1)
| OID | Name | Description |
|---|---|---|
| .1.1 | abngVersion | Software version |
| .1.2 | abngUptime | System uptime (seconds) |
| .1.3 | abngHostname | System hostname |
| .1.4 | abngConfigCommits | Config commits since start |
Subscribers (.2)
| OID | Name | Description |
|---|---|---|
| .2.1 | abngSessionsActive | Total active sessions |
| .2.2 | abngSessionsPppoe | PPPoE sessions |
| .2.3 | abngSessionsDhcp | DHCP sessions |
| .2.4 | abngSessionsAuthenticating | Sessions awaiting RADIUS |
| .2.5 | abngSessionsTerminated | Cumulative terminated |
| .2.6 | abngTotalBytesIn | Aggregate bytes in |
| .2.7 | abngTotalBytesOut | Aggregate bytes out |
| .2.8 | abngTotalPacketsIn | Aggregate packets in |
| .2.9 | abngTotalPacketsOut | Aggregate packets out |
| .2.10 | abngProvisionedBandwidthDown | Sum downstream rates (bps) |
| .2.11 | abngProvisionedBandwidthUp | Sum upstream rates (bps) |
QoS (.3)
| OID | Name | Description |
|---|---|---|
| .3.1 | abngQosSessionsActive | Sessions with CAKE applied |
| .3.2 | abngQosIfbDevices | Active IFB devices |
| .3.3 | abngQosPendingSessions | Sessions without QoS |
CGNAT (.4)
| OID | Name | Description |
|---|---|---|
| .4.1 | abngCgnatSessionsActive | CGNAT sessions (100.64.0.0/10) |
| .4.2 | abngCgnatPublicSessions | Public IPv4 sessions |
Demux (.5)
| OID | Name | Description |
|---|---|---|
| .5.1 | abngDemuxDynamicVlans | Dynamic VLAN interfaces |
| .5.2 | abngDemuxUniqueAccessInterfaces | Unique access interfaces with sessions |
Services (.6) — Health Checks
TruthValue: 1 = up, 2 = down.
| OID | Name | Description |
|---|---|---|
| .6.1 | abngServiceAbngd | abngd orchestrator |
| .6.2 | abngServiceDemux | abng-demux daemon |
| .6.3 | abngServiceAccelPpp | accel-ppp (TCP 2001) |
| .6.4 | abngServiceQos | abng-qos daemon |
| .6.5 | abngServiceDhcpd | abng-dhcpd daemon |
| .6.6 | abngServiceApi | REST API (TCP 8443) |
See MIB Reference for full details.
Example SNMP Queries
Get System Information
snmpget -v2c -c my-community localhost \
1.3.6.1.4.1.65245.1.1.0 \
1.3.6.1.4.1.65245.1.2.0 \
1.3.6.1.4.1.65245.1.3.0
Get Session Counts
snmpget -v2c -c my-community localhost \
1.3.6.1.4.1.65245.2.1.0 \
1.3.6.1.4.1.65245.2.2.0 \
1.3.6.1.4.1.65245.2.3.0
Check Service Health
snmpwalk -v2c -c my-community localhost 1.3.6.1.4.1.65245.6
Walk All Metrics
snmpwalk -v2c -c my-community localhost 1.3.6.1.4.1.65245
Integration with Monitoring Systems
Nagios/Icinga
# Alert on session count
check_snmp -H localhost -C my-community -o 1.3.6.1.4.1.65245.2.1.0 -w 4000 -c 5000
# Alert when abngd is down
check_snmp -H localhost -C my-community -o 1.3.6.1.4.1.65245.6.1.0 -c 1:1
Zabbix
Add SNMP items:
- Sessions: OID
1.3.6.1.4.1.65245.2.1.0 - Traffic In: OID
1.3.6.1.4.1.65245.2.6.0 - Service Health: OID
1.3.6.1.4.1.65245.6.1.0
Prometheus
Use SNMP exporter to convert SNMP to Prometheus metrics:
# snmp_exporter config
athenabng:
version: 2
max_repetitions: 25
timeout: 10s
retries: 3
auth:
community: my-community
Validation Rules
| Field | Validation |
|---|---|
enabled | Boolean |
community | Non-empty string |
location | 1-255 characters |
contact | 1-255 characters |
Best Practices
- Community String — Change from default "public" in production
- Firewall — Restrict SNMP access to trusted networks
- Monitoring — Monitor session count and QoS coverage
- Alerts — Set thresholds for session count and resource usage
- Documentation — Document custom MIB OIDs
- Security — Use SNMPv3 if available (requires net-snmp upgrade)
Troubleshooting
SNMP Agent Not Responding
- Check SNMP is enabled:
show configuration | match snmp - Check service is running:
sudo systemctl status snmpd - Check port is listening:
sudo netstat -tlnp | grep 161 - Check firewall allows UDP 161
- Check SNMP logs:
journalctl -u snmpd -f
MIB Not Found
Error: Unknown Object Identifier (1.3.6.1.4.1.65245)
Solution: Install ATHENA-BNG-MIB:
cp /opt/athena-bng/snmp/ATHENA-BNG-MIB.txt /usr/share/snmp/mibs/
Community String Rejected
Error: Timeout: No Response from localhost
Solution: Check community string matches configuration:
snmpget -v2c -c my-community localhost 1.3.6.1.2.1.1.1.0
Next Steps
- Monitoring Configuration — Prometheus and syslog
- Configuration Overview — All configuration sections