Metrics history¶
The overview's tiles and sparklines are live (a sample a second, in the
browser). strongholdd also keeps the box's metrics over time
(internal/history), like a router's RRD graphs, for the overview's
History card and GET /v1/metrics/history.
What is kept¶
A sample a minute, on the minute:
| Series | What |
|---|---|
cpu, memory |
% busy, % used |
conntrack |
connections tracked |
traffic.<network>.rx, .tx |
bit/s, each network and tunnel (download and upload for a WAN) |
wan.<network>.rtt, .loss, .up |
the WAN's probes: round trip (ms, while up), loss (%), up (1) or down (0) |
dhcp.<network> |
active DHCP leases (both families) |
dns.queries, dns.blocked |
per minute, from Unbound's counters (blocked: with blocklists) |
ids.alerts |
Suricata's alerts per minute (with the IDS on) |
Counters become rates from one sample to the next; a counter that went back (a restart) gives no point.
Resolutions¶
| Points | Kept for | Used for ranges up to |
|---|---|---|
| a minute apart | 2 days | 1 hour to 48 hours |
| 15 minutes apart (averages) | 30 days | 7 and 30 days |
| 2 hours apart (averages) | a year | a year |
Each series is three rings of 32-bit values, about 40 KB; all of them
are a few MB in /var/lib/stronghold/history.gob, written every five
minutes (a crash loses at most that). Minutes when strongholdd didn't run
have no point, and the charts leave a gap.
API and UI¶
GET /v1/metrics/history?range=24h&series=cpu,traffic.wan.rx:step(seconds),start(Unix time of the first point) and the series' points,nullwhere there is none. Ranges: 1h, 6h, 24h, 48h, 7d, 30d, 1y.- The overview's History card: per WAN its traffic, round trip (and loss when there was any); CPU and memory; connections; DHCP leases per network; DNS queries and blocked; IDS alerts.
- In a pair each box keeps its own (the standby's traffic is small).