Monitoring
Real-time monitoring and observability features.
Overview
AthenaBNG provides multiple monitoring capabilities:
- CLI Monitoring — Real-time session events via CLI
- Prometheus Metrics — Time-series metrics for Grafana
- SNMP — Integration with NOC monitoring systems
- Syslog — Centralized log forwarding
- REST API — Programmatic access to metrics
CLI Monitoring
Real-Time Session Monitor
abng> monitor subscribers
Displays events:
session_up— Session establishedsession_down— Session terminatedrate_change— Rate changed via CoAerror— Session error
Session Queries
# Get session counts
abng> show subscribers summary
# Get QoS coverage
abng> show qos | count
# Get CGNAT sessions
abng> show configuration | match cgnat
Prometheus Metrics
Session Metrics
| Metric | Description |
|---|---|
athenabng_sessions_total | Total active sessions |
athenabng_sessions_pppoe | PPPoE sessions |
athenabng_sessions_dhcp | DHCP sessions |
athenabng_sessions_created_total | Total sessions created |
athenabng_sessions_terminated_total | Total sessions terminated |
QoS Metrics
| Metric | Description |
|---|---|
athenabng_qos_sessions | Sessions with QoS applied |
athenabng_qos_qdiscs | Active CAKE qdiscs |
CGNAT Metrics
| Metric | Description |
|---|---|
athenabng_cgnat_sessions | CGNAT sessions |
athenabng_cgnat_pool_utilization | CGNAT pool utilization % |
Demux Metrics
| Metric | Description |
|---|---|
athenabng_vlan_interfaces | Dynamic VLAN interfaces |
athenabng_vlan_creation_rate | VLAN creation rate |
System Metrics
| Metric | Description |
|---|---|
athenabng_uptime_seconds | System uptime |
athenabng_version_info | Version information |
SNMP Monitoring
ATHENA-BNG-MIB
28 metrics under enterprise OID 1.3.6.1.4.1.65245 across 6 groups:
| Group | OID Branch | Key Metrics |
|---|---|---|
| System | .1 | Version, uptime, hostname |
| Subscribers | .2 | Session counts, traffic counters, provisioned bandwidth |
| QoS | .3 | CAKE sessions, IFB devices, pending QoS |
| CGNAT | .4 | CGNAT vs public session split |
| Demux | .5 | Dynamic VLANs, unique access interfaces |
| Services | .6 | Daemon health checks (abngd, demux, accel-ppp, qos, dhcpd, API) |
SNMP Queries
# Get session count
snmpget -v2c -c my-community localhost 1.3.6.1.4.1.65245.2.1.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
Syslog Forwarding
Forward logs to centralized syslog server:
monitoring:
syslog:
enabled: true
server: "10.255.0.20"
port: 514
protocol: "udp"
REST API Monitoring
Health Check
curl -k https://localhost:8443/api/health
Get Metrics
curl -k https://localhost:8443/api/metrics
Get Subscriber List
curl -k -H "Authorization: Bearer $TOKEN" \
https://localhost:8443/api/subscribers
Grafana Dashboard
Pre-built dashboard available at:
grafana/athenabng-dashboard.json
Import into Grafana and select Prometheus data source.
Alerting
Session Count Alert
Alert when session count exceeds threshold:
- alert: HighSessionCount
expr: athenabng_sessions_total > 5000
for: 5m
annotations:
summary: "High session count: {{ $value }}"
QoS Coverage Alert
Alert when QoS coverage is low:
- alert: LowQoSCoverage
expr: athenabng_qos_sessions / athenabng_sessions_total < 0.95
for: 5m
annotations:
summary: "Low QoS coverage: {{ $value }}"
Best Practices
- Prometheus — Scrape every 15-30 seconds
- Retention — Keep 15 days of Prometheus data
- Syslog — Use TCP for reliable delivery
- Alerts — Set thresholds for session count and resource usage
- Dashboards — Create custom Grafana dashboards
- Archival — Archive logs for compliance
- Security — Restrict access to monitoring endpoints
Troubleshooting
Prometheus Metrics Not Available
- Check Prometheus is enabled:
show configuration | match prometheus - Check port is listening:
sudo netstat -tlnp | grep 9100 - Check firewall allows port 9100
- Query metrics:
curl http://localhost:9100/metrics
Syslog Not Forwarding
- Check syslog is enabled:
show configuration | match syslog - Check server is reachable:
ping 10.255.0.20 - Check port is open:
nc -u 10.255.0.20 514 - Check abngd logs:
journalctl -u abngd -f
Next Steps
- Configuration Overview — All configuration sections
- Architecture Overview — System design