Skip to main content

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

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

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:

  1. Open Grafana: http://localhost:3000
  2. Import dashboard: grafana/athenabng-dashboard.json
  3. Select Prometheus data source
  4. 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

FieldValidation
prometheus.enabledBoolean
prometheus.listenValid address:port
prometheus.pathValid URL path
syslog.enabledBoolean
syslog.serverValid IP or hostname
syslog.portInteger 1-65535
syslog.protocolOne of: udp, tcp

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

High Memory Usage

  1. Check Prometheus retention: Reduce if needed
  2. Check syslog backlog: Ensure server is reachable
  3. Check for log spam: Review log levels

Next Steps