Skip to content

Analytics

Traffic and WAF events are written to a bundled ClickHouse instance and queried back as charts. It is optional; everything else works without it.

Traffic analyticsAdd a filter from any list row, group the chart differently, turn the comparison off, or show only mitigated requests. The numbers are made up in your browser.Nothing you change here is saved
Requests672
+19.4% vs previous116 ms on average
Bandwidth24.8 MB
+12.4% vs previous
Unique IPs240
+4.3% vs previous
Mitigated122
+35.6% vs previous18.2% of requests
5xx rate2.08%
+67.6% vs previous14 5xx responses

Requests over time

Hosts

HostRequestsShareActions
app.example.com
38957.9%
cloud.example.com
15422.9%
grafana.example.com
12919.2%

Paths

PathRequestsShareActions
/
19328.7%
/assets/app.js
10715.9%
/login
9514.1%
/media/stream
9414%
/api/items
8712.9%
/admin/config.php
345.1%

Status codes

StatusRequestsShareActions
200
50274.7%
403
10515.6%
404
345.1%
502
142.1%
401
91.3%
429
81.2%

WAF rules

RuleHitsShareActions
#930130 Restricted File Access Attempt
5557.3%
#913100 Found User-Agent associated with security scanner
4142.7%

Latest requests

TimeClientHostRequestStatusOutcomeDurationSize
China
203.0.113.66
app.example.com
GET /.env
403WAF2 ms0 B
China
203.0.113.66
app.example.com
GET /.env
403WAF2 ms0 B
China
203.0.113.66
app.example.com
GET /wp-login.php
403WAF2 ms0 B
China
203.0.113.66
app.example.com
GET /wp-login.php
403WAF2 ms0 B
France
198.51.100.44
app.example.com
GET /media/stream
200Served40 ms19.6 KB
United Kingdom
2001:db8:ceac::42
app.example.com
POST /media/stream
200Served49 ms56.2 KB
United Kingdom
198.51.100.52
cloud.example.com
GET /login
200Served37 ms85.8 KB
Germany
198.51.100.55
cloud.example.com
GET /media/stream
404Served67 ms8.8 KB
  • GET /.envapp.example.com - 203.0.113.66 - 403WAF
  • GET /.envapp.example.com - 203.0.113.66 - 403WAF
  • GET /wp-login.phpapp.example.com - 203.0.113.66 - 403WAF
  • GET /wp-login.phpapp.example.com - 203.0.113.66 - 403WAF
  • GET /media/streamapp.example.com - 198.51.100.44 - 200Served
  • POST /media/streamapp.example.com - 2001:db8:ceac::42 - 200Served
  • GET /logincloud.example.com - 198.51.100.52 - 200Served
  • GET /media/streamcloud.example.com - 198.51.100.55 - 404Served
  • Five headline numbers: requests, bandwidth, unique IPs, mitigated requests (and their share) and the 5xx rate, each with a sparkline and its change from the period before.
  • Requests over time, with the previous period drawn behind as a dashed line. Split the chart by outcome, status class or host (the five busiest, the rest together).
  • Why each request ended. Every request is recorded with its outcome: served, or the gate that answered it, which is one of WAF, geo block, access list (a refused address), sign-in (a wrong basic-auth password, or a forward-auth server that said no), rate limit or CrowdSec. Anything but served counts as mitigated. Its duration is recorded too.
  • Filters on everything: host, path, country, network (ASN), status code or class (404, 5xx), method, HTTP version, client IP, user-agent family, outcome and WAF rule, each as is or is not. Every top-list row has a button to show only it or leave it out.
  • Top lists of hosts, paths, countries, networks, status codes, client IPs, user agents, methods, HTTP versions and WAF rules. Each shows ten; View all shows up to 100.
  • A country map, from the same GeoIP databases geo blocking uses. Colour it by requests, mitigated requests or unique IPs, and pick a country to see which hosts it reached, how they answered, and which user agents it sent.
  • The latest requests, with their outcome and duration, or only the mitigated ones.
  • CSV export of the chart’s buckets and of every list. A value a client sent that a spreadsheet would run as a formula is kept as text.
  • Ranges of 1 hour, 24 hours, 7 days and 30 days, or a custom range of up to 92 days. Ranges of a day or less refresh every 30 seconds.

The page keeps its whole state (range, comparison, grouping, filters) in its address, so a link opens exactly what you were looking at.

Views → Save… stores the current state under a name. Pick one from the menu to open it; from Manage… you can rename it, save the current state over it, copy its link or delete it. Ticking Share with every administrator lists it for everyone who can open analytics; only its owner can change it. Each person can keep up to 100. Saving, changing and deleting a view are in the audit log.

The generated Caddy config marks each gate a request reaches (WAF, geo block, access list, sign-in, rate limit, CrowdSec) and logs the last one it got to with the request. A request a gate turns away never gets past the mark, so that gate is its outcome; one that clears them all is served. A host with no gates logs no mark and is always served.

Rows recorded before this existed, or relayed by an agent older than it, count as served (or as geo-blocked where the geo blocker logged them) and have no duration. The network column needs the GeoLite2 ASN database, which the controller downloads with the others when a MaxMind key is set.

A WAF rule filter matches requests by client and path against the WAF events the rule logged, since the access log does not know the rule. The WAF rule list follows the host, path, country, client IP and method filters, the ones a WAF event carries.

The controller also looks for traffic worth a look, over the last 24 hours:

  • 5xx bursts: at least 10 5xx answers making up at least 10% of a host’s requests in those minutes, with runs less than three minutes apart joined. A burst with a 5xx in the last five minutes is still going on.
  • Mitigation spikes: at least 50 mitigated requests, and at least three times the average for a window that long over the 7 days before it, for one host or for all of them together.
  • Blocked traffic concentrations: one host, path and outcome with at least 50 mitigated requests.

They are in the API as trafficSignals; each detector has a time budget, and one that runs out is reported as skipped rather than holding the answer up.

Open Settings → Observability → Analytics, tick Collect analytics, and set a ClickHouse password. Saving starts the container. You do not change .env or list a compose profile, because the agent runs the compose command for you with the saved credentials.

Three things to expect:

  • The first start pulls the ClickHouse image, which takes a few minutes on a slow link. The save returns immediately, and the Analytics page fills in once ClickHouse is up.
  • Turning it off stops the container but keeps the data. History survives, and turning it back on picks up where it left off.
  • Pick one owner. Once credentials live in Settings, drop clickhouse from COMPOSE_PROFILES and delete CLICKHOUSE_PASSWORD from .env. Leaving both means your own docker compose up -d also creates the container, from the now-stale .env values.

Without an agent, Docker is the only thing that can start ClickHouse, so use the profile:

COMPOSE_PROFILES=clickhouse
CLICKHOUSE_PASSWORD=your-clickhouse-password # openssl rand -base64 32

30 days by default, enforced by ClickHouse’s own TTL. Change it under Settings → Observability → Analytics (or CLICKHOUSE_RETENTION_DAYS until a value is stored). Saving it re-checks the schema on the next write, which migrates the existing tables’ TTL and purges expired data, without a restart.

ClickHouse’s internal diagnostic log tables are turned off by a config override the stack mounts. Left on, they flush every few seconds whether or not anyone is using the proxy, which is several GB a day on an idle machine. CPM never queries them.

Logs in the sidebar tails the raw logs, read through an agent so a remote host’s are there too:

  • Access: every request Caddy logged, one line each, when access logging is on (Settings → Observability → Logging). A proxy host’s Logs action opens this, filtered to its domain.
  • WAF: the rules the WAF matched.
  • Caddy: Caddy’s own output, straight from its container.
  • Certificates: only the issuance and renewal lines from Caddy’s output, for when a certificate won’t come through.

It follows new lines as they arrive, pauses on request, and filters what it has on screen. It needs no ClickHouse: the agent reads Caddy’s log files and its container’s output. Only administrators can open it, because access logs name every client and every path they asked for. An agent older than the log viewer can’t serve it; update it.

LogsSwitch the log or the agent, filter, or pause. The lines are made up in your browser.Nothing you change here is saved

Logs

Waiting for new lines…0 lines shown of 0 kept