\"The internet is slow\": SD-WAN SLA thresholds and office line monitoring with Prometheus
Overly strict SD-WAN SLA thresholds took a healthy line out of service. Threshold tuning and plain-language line monitoring with Prometheus, Grafana and Alertmanager.
One morning the same complaint came from several people: "The internet is really slow." Speed tests looked fine, both lines were up, and the provider saw no problem. The problem wasn't the lines. It was the grade the firewall was giving them.
Symptoms
- The slowness comes and goes during the day, not tied to any particular time.
- Speed tests mostly come out normal.
- On the firewall, one of the two lines keeps showing as "out of SLA". All traffic flows over a single line, and that line fills up.
Why does it happen?
SD-WAN probes each line with a health check (performance SLA). If latency, jitter or loss crosses a threshold, the line is considered "unhealthy" and traffic is moved to the other line.
In setups like this, thresholds are usually written on day one, without any measurement. Put a 50 ms threshold on a line whose normal latency sits between 40 and 60 ms, and the line will drop in and out all day. The firewall does its job correctly: it sets the line aside and loads everything onto the other one. Users experience that as "the internet is slow".
Diagnosis
- Open the SD-WAN member status and SLA history. Which line drops, how often, and because of which metric?
- Measure the line's normal latency and jitter over a few days. The threshold has to sit above that baseline.
- At the same time, look at the utilization of the other line. If one line is idle while the other is maxed out, the cause is most likely the SLA decision.
Fix
First, tune the thresholds to the measured values. Set a threshold comfortably above normal noise. Require several consecutive failed checks before a line goes down, and a hold time before it comes back. That way a line doesn't flap on a momentary spike.
Then set up monitoring. A small Docker Compose stack is enough: Prometheus, Grafana, Alertmanager, and a tiny exporter that reads the firewall's REST API. The exporter exposes these as metrics:
- Latency, jitter, loss and health state per SD-WAN member
- IPsec tunnel status
- HA sync status
- Wi-Fi radio utilization
services:
prometheus:
image: prom/prometheus:${PROM_VERSION}
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.retention.time=90d
volumes:
- ./prometheus:/etc/prometheus:ro
- prom-data:/prometheus
restart: unless-stopped
alertmanager:
image: prom/alertmanager:${AM_VERSION}
volumes:
- ./alertmanager:/etc/alertmanager:ro
restart: unless-stopped
grafana:
image: grafana/grafana:${GRAFANA_VERSION}
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
restart: unless-stopped
fw-exporter:
build: ./fw-exporter
environment:
FW_URL: https://fw.example.com
FW_TOKEN_FILE: /run/secrets/fw_token # the token is read from a file, not kept in an env variable
secrets:
- fw_token
restart: unless-stopped
secrets:
fw_token:
file: ./secrets/fw_token
volumes:
prom-data:
grafana-data:
The alert rule looks at an average, not at the instantaneous value:
groups:
- name: wan
rules:
- alert: WanLineLoss
# 5-minute average; momentary spikes should not raise an alert
expr: avg_over_time(fw_sdwan_member_loss_percent[5m]) > 2
for: 10m
labels:
severity: warning
annotations:
line: "{{ $labels.member }}"
loss: "{{ $value | printf \"%.1f\" }}"
The annotations are deliberately language-neutral. The wording lives in the template that builds the email.
The alert email is a plain-language HTML email. Alertmanager sends to a webhook, and a small service builds the email. It contains:
- What happened, in one sentence: "Loss increased on one of the lines, traffic moved to the other line."
- The current state of the lines: latency, loss, which one is active.
- The top 10 sources and top 10 applications by traffic over the last 10 minutes.
That last item does a lot of work. Whoever reads the email sees the answer to "who is using the line?" on the same screen. A large download or a backup job shows up immediately.
There is also a daily summary email at the start of the workday: yesterday's outages, SLA switches, busiest hours. It arrives even when nothing went wrong. That way people can also see that the monitoring itself is working.
Watch out
- Use a read-only API token for the exporter, and restrict it so it can only be used from the monitoring host.
- Keep alert thresholds above normal noise. An alert that arrives every morning is an alert nobody reads after a week.
- Write a plain-language dashboard guide for people outside IT: what each panel tells you, and which color is worth worrying about.
Lesson
"The internet is slow" is usually not a bandwidth problem but a decision problem. Measure whatever the network device bases its decisions on, and explain the result in language everyone can read.
Checklist
- [ ] Were the SLA thresholds written against a measured baseline?
- [ ] Is there a hold-down margin for a line going down and coming back?
- [ ] Is the exporter token read-only and restricted to the monitoring host?
- [ ] Does the alert email include line status and top talkers?
- [ ] Is the daily summary email arriving?
- [ ] Has the dashboard guide reached people outside IT?