Node-local figures of an instance for dashboards: counters, the busiest clients, bans and recent decisions.
Everything here scans tables or copies buffers, so it belongs in dashboards and health checks, not on the request path.
Summary
Functions
Active bans, soonest to expire first.
Per-second rates of every counter between two snapshots.
The most recent sampled decisions.
A snapshot of the counters and gauges, with the time it was taken.
The JA4 fingerprints with the most clients (prefixes) in the current minute epoch. A prefix counts for the fingerprint of its first request of the minute.
The prefixes with the most requests in the current minute epoch.
Functions
@spec bans(atom(), pos_integer()) :: [map()]
Active bans, soonest to expire first.
Per-second rates of every counter between two snapshots.
@spec recent(atom(), pos_integer()) :: [map()]
The most recent sampled decisions.
A snapshot of the counters and gauges, with the time it was taken.
@spec top_ja4(atom(), pos_integer()) :: [%{ja4: String.t(), clients: pos_integer()}]
The JA4 fingerprints with the most clients (prefixes) in the current minute epoch. A prefix counts for the fingerprint of its first request of the minute.
@spec top_prefixes(atom(), pos_integer()) :: [ %{prefix: String.t(), requests: pos_integer()} ]
The prefixes with the most requests in the current minute epoch.