Monitoring Configuration
Configure Prometheus metrics and syslog forwarding.
Overview
The monitoring section configures:
- Prometheus — Metrics export for time-series monitoring
- Syslog — Log forwarding to centralized syslog server
Configuration Options
prometheus
Prometheus metrics configuration (optional).
monitoring:
prometheus:
enabled: true
listen: "0.0.0.0:9100"
path: "/metrics"
Prometheus Options
enabled
Enable or disable Prometheus metrics (optional).
prometheus:
enabled: true
Type: Boolean
Required: No
Default: false
Valid values: true, false
CLI:
abng# set monitoring prometheus enabled true
listen
Prometheus listen address and port (optional).
prometheus:
listen: "0.0.0.0:9100"
Type: String (address:port)
Required: No
Default: "0.0.0.0:9100"
Constraints: Valid IP:port combination
CLI:
abng# set monitoring prometheus listen "0.0.0.0:9100"
path
Prometheus metrics endpoint path (optional).
prometheus:
path: "/metrics"
Type: String
Required: No
Default: "/metrics"
Constraints: Valid URL path
CLI:
abng# set monitoring prometheus path "/metrics"
syslog
Syslog forwarding configuration (optional).
monitoring:
syslog:
enabled: true
server: "10.255.0.20"
port: 514
protocol: "udp"
Syslog Options
enabled
Enable or disable syslog forwarding (optional).
syslog:
enabled: true
Type: Boolean
Required: No
Default: false
Valid values: true, false
CLI:
abng# set monitoring syslog enabled true
server
Syslog server IP address (optional).
syslog:
server: "10.255.0.20"
Type: IPv4 address or hostname
Required: No
Default: None
Constraints: Valid IP or hostname
CLI:
abng# set monitoring syslog server "10.255.0.20"
port
Syslog server port (optional).
syslog:
port: 514
Type: Integer
Required: No
Default: 514
Constraints: Valid port number (1-65535)
CLI:
abng# set monitoring syslog port 514
protocol
Syslog protocol (optional).
syslog:
protocol: "udp"
Type: String
Required: No
Default: "udp"
Valid values: "udp", "tcp"
CLI:
abng# set monitoring syslog protocol "tcp"
Example Configurations
Prometheus Only
monitoring:
prometheus:
enabled: true
listen: "0.0.0.0:9100"
path: "/metrics"
Syslog Only
monitoring:
syslog:
enabled: true
server: "10.255.0.20"
port: 514
protocol: "udp"
Prometheus and Syslog
monitoring:
prometheus:
enabled: true
listen: "0.0.0.0:9100"
path: "/metrics"
syslog:
enabled: true
server: "10.255.0.20"
port: 514
protocol: "udp"
Configuration via CLI
Enable Prometheus
abng> configure
abng# set monitoring prometheus enabled true
abng# commit
Set Prometheus Listen Address
abng# set monitoring prometheus listen "10.255.0.1:9100"
abng# commit
Enable Syslog
abng# set monitoring syslog enabled true
abng# set monitoring syslog server "10.255.0.20"
abng# commit
Verification
View Monitoring Configuration
abng> show configuration | match "^monitoring:"
monitoring:
prometheus:
enabled: true
listen: 0.0.0.0:9100
path: /metrics
syslog:
enabled: true
server: 10.255.0.20
port: 514
protocol: udp
Query Prometheus Metrics
curl http://localhost:9100/metrics
Check Syslog Forwarding
sudo journalctl -u abngd | grep -i syslog
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 |
Prometheus Scrape Configuration
Add to Prometheus scrape config:
scrape_configs:
- job_name: 'athenabng'
static_configs:
- targets: ['localhost:9100']
scrape_interval: 15s
scrape_timeout: 10s
Grafana Dashboard
Import pre-built dashboard:
- Open Grafana:
http://localhost:3000 - Import dashboard:
grafana/athenabng-dashboard.json - Select Prometheus data source
- View metrics
Syslog Message Format
Messages are forwarded in standard syslog format:
<PRI>TIMESTAMP HOSTNAME TAG[PID]: MESSAGE
Example:
<134>Mar 13 10:30:00 AthenaBNG abngd[1234]: Session 1 (user1) established
Integration with Monitoring Systems
Prometheus + Grafana
# docker-compose.yml
version: '3'
services:
prometheus:
image: prom/prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
ELK Stack (Elasticsearch, Logstash, Kibana)
Configure Logstash to receive syslog:
input {
syslog {
port => 514
type => "syslog"
}
}
filter {
if [type] == "syslog" {
grok {
match => { "message" => "%{SYSLOGLINE}" }
}
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "athenabng-%{+YYYY.MM.dd}"
}
}
Validation Rules
| Field | Validation |
|---|---|
prometheus.enabled | Boolean |
prometheus.listen | Valid address:port |
prometheus.path | Valid URL path |
syslog.enabled | Boolean |
syslog.server | Valid IP or hostname |
syslog.port | Integer 1-65535 |
syslog.protocol | One of: udp, tcp |
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
High Memory Usage
- Check Prometheus retention: Reduce if needed
- Check syslog backlog: Ensure server is reachable
- Check for log spam: Review log levels
Next Steps
- Configuration Overview — All configuration sections
- Features — Feature documentation
- Architecture — System design