Skip to main content

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 established
  • session_down — Session terminated
  • rate_change — Rate changed via CoA
  • error — 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

MetricDescription
athenabng_sessions_totalTotal active sessions
athenabng_sessions_pppoePPPoE sessions
athenabng_sessions_dhcpDHCP sessions
athenabng_sessions_created_totalTotal sessions created
athenabng_sessions_terminated_totalTotal sessions terminated

QoS Metrics

MetricDescription
athenabng_qos_sessionsSessions with QoS applied
athenabng_qos_qdiscsActive CAKE qdiscs

CGNAT Metrics

MetricDescription
athenabng_cgnat_sessionsCGNAT sessions
athenabng_cgnat_pool_utilizationCGNAT pool utilization %

Demux Metrics

MetricDescription
athenabng_vlan_interfacesDynamic VLAN interfaces
athenabng_vlan_creation_rateVLAN creation rate

System Metrics

MetricDescription
athenabng_uptime_secondsSystem uptime
athenabng_version_infoVersion information

SNMP Monitoring

ATHENA-BNG-MIB

28 metrics under enterprise OID 1.3.6.1.4.1.65245 across 6 groups:

GroupOID BranchKey Metrics
System.1Version, uptime, hostname
Subscribers.2Session counts, traffic counters, provisioned bandwidth
QoS.3CAKE sessions, IFB devices, pending QoS
CGNAT.4CGNAT vs public session split
Demux.5Dynamic VLANs, unique access interfaces
Services.6Daemon 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

  1. Prometheus — Scrape every 15-30 seconds
  2. Retention — Keep 15 days of Prometheus data
  3. Syslog — Use TCP for reliable delivery
  4. Alerts — Set thresholds for session count and resource usage
  5. Dashboards — Create custom Grafana dashboards
  6. Archival — Archive logs for compliance
  7. Security — Restrict access to monitoring endpoints

Troubleshooting

Prometheus Metrics Not Available

  1. Check Prometheus is enabled: show configuration | match prometheus
  2. Check port is listening: sudo netstat -tlnp | grep 9100
  3. Check firewall allows port 9100
  4. Query metrics: curl http://localhost:9100/metrics

Syslog Not Forwarding

  1. Check syslog is enabled: show configuration | match syslog
  2. Check server is reachable: ping 10.255.0.20
  3. Check port is open: nc -u 10.255.0.20 514
  4. Check abngd logs: journalctl -u abngd -f

Next Steps