Skip to content

WatchLog v1.5.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 18:13
· 226 commits to main since this release

WatchLog 1.5.0: Nginx, complete

Open-source Nginx tells almost nothing about its traffic: stub_status has connection and
request totals only. Status codes, latency, sites, URLs and upstreams are in its access log,
and the causes in its error log. WatchLog's agent now reads both on the machine and turns
them into metrics there.
No log line leaves the machine and none is stored: what leaves it is
counts, sums, latency histograms and short top lists. On Linux servers (package or source,
systemd or not), Docker and Kubernetes (plain Nginx and ingress-nginx), with nothing to install
in Nginx.

What's new

  • Sites and URLs. Requests, 5xx, 4xx, 499, p95, bandwidth and cache hits by server name;
    URL patterns (GET /orders/{id}: the query string is never read, ids become placeholders)
    with their errors, latency, time spent in the backend and upstream. Every tab filters by
    site.
  • Upstreams and their servers. Each upstream with the workload behind each server's address
    (a Deployment, a systemd service, a container), requests, errors, response and connect time
    per server, retries to the next server and kept-alive connections. An upstream's page shows
    its servers side by side, and which one refuses, times out or can't be reached.
  • Errors, with their cause. 502, 504, 499 (the client gave up) with the URLs they hit, rate
    limiting, scanners' 404s, and why, from the error log: refused or reset by an upstream,
    timed out, no live upstreams, worker_connections or open files reached, limit_req and
    limit_conn by zone, bodies too large, headers too big, failed reloads.
  • Latency where you have it: p50, p95, p99 and where the time goes (connecting, waiting for
    the backend's first byte, sending the response).
  • Clients. The busiest addresses (the 50 per site, kept 24 hours; shortened to /24 and /48,
    or off, in Settings → Privacy), what they ask for and what they get; browsers, apps, crawlers
    (named), scripts and monitors by user-agent class (the user agent itself is never kept).
  • Cache, TLS, connections and workers: hit shares by site and URL; TLS versions and ciphers,
    certificates and their expiry; connections against worker_connections, open files against the
    limit; workers, reloads, failed reloads and old workers still shutting down.
  • Findings with the cause first: "502 because server 10.0.3.14:3000 of upstream cart refuses
    connections: cart isn't listening"; "clients give up (499) on GET /search: its p95 is 9 s";
    "worker_connections reached"; "one address sends 38% of all requests"; "a reload failed: Nginx
    still runs the old configuration".
  • Seven default alerts, few and precise, and per-site, per-URL and per-upstream alerts from
    their pages. Services monitored before are offered the new ones on their Alerts tab.
  • The Connection tab says what WatchLog reads, which log_format variables are present,
    what each missing one costs, and the one line to paste. Everything else works with combined.

Upgrading

Update the agents (the Helm chart, the server package or the install command); nothing else.
The agent reads the logs from where Nginx writes them with the access it already has; a
migration adds the org's client address setting (default: keep the busiest addresses). Turn log
reading off with --nginx-logs=false (WATCHLOG_NGINX_LOGS=false). Cost, measured: 8 % of one
core at 20,000 lines a second for the whole agent, about 30 MiB. Details: ADR-251 and the
Nginx page.

Changes since v1.4.4

Features

  • Nginx's strings for the new panels, and a Playwright spec of its tabs and item pages at 1440 and 390 px (web)
  • the Nginx log reader reports its own reading time (watchlog_nginx_read_seconds_total) (agent)
  • Nginx's new tabs: an upstream's servers side by side, the log_format line to copy, site chips that filter every tab, the site, URL pattern, upstream and client pages, and the Privacy setting for client addresses (ADR-251) (web)
  • Nginx from its logs: Sites, URLs, Upstreams, Clients, Cache, TLS, Connections and workers; site, URL pattern, upstream and client pages; findings with their cause; new default alerts (ADR-251) (backend)
  • the org's client address setting for Nginx (on, shortened, off), sent to the agents in the heartbeat's answer; client addresses deleted after 24 hours (ADR-251) (backend)
  • Nginx's access and error logs turned into metrics on the machine (ADR-251) (agent)

Fixes

  • Nginx: an upstream server's backend is the workload the agents mapped, never an outside network; eBPF's latency finding gives way to the logs' (backend)
  • Nginx with worker_processes auto crashed the agent on its first round; the log collector now recovers from any panic instead of stopping the agent (agent)
  • the log_format line WatchLog offers was missing its closing quote; a test reads it as configuration (nginx -t passes it in the lab); the Nginx docs rewritten (ADR-251)
  • Nginx pages: counts by status code and site over the range, a server card's state from its cause, the upstream's definition, scanners' and the busiest address's shares from this hour's counts, the reader's cost on the Connection tab (backend)
  • Nginx logs: error-log times without a zone wait for the access log's offset, nothing is stamped ahead of the clock, a service is named by its unit, a kind node's pods are left to its cluster (agent)
  • verify-release finds a dry run's deb and rpm under their pre-release names (0.0.0~dryrun.N) (ci)
  • the release signs the five images in one cosign call (two cosign processes at once collide on its local cache) (ci)
  • the release's publish job checks out before downloading the digests (checkout cleaned them away); the dry-run cleanup also deletes a run's untagged per-architecture images (ci)

Install

Kubernetes (backend, web, agents in one chart):

helm install watchlog oci://ghcr.io/watchlog-light/charts/watchlog --version 1.5.0 \
  --namespace watchlog --create-namespace

Docker hosts: see the install guide.

Verify

Images and charts are signed with cosign (keyless, GitHub Actions OIDC):

cosign verify ghcr.io/watchlog-light/agent:1.5.0 \
  --certificate-identity-regexp '^https://github.com/watchlog-light/watchlog/\.github/workflows/release\.yml@refs/tags/v' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com