Log drain

A server’s Log drain tab (Servers, then the server) sends every app’s logs on a server to Loki: Grafana Cloud’s, or your own.

  1. Give the Loki address (Grafana Cloud: on the Loki stack’s page, like https://logs-prod-012.grafana.net), the user (Grafana Cloud: the stack’s user number) and a token with write and read access to logs. The token is sealed in your browser to the server’s agent; the panel never has it.
  2. From then on the agent sends each app’s lines every two seconds, labelled yawl_project, yawl_env, yawl_service and yawl_server. In Grafana: {yawl_project="acme", yawl_service="web"}.

What leaves the server is masked first: every variable Yawl knows, and every value the container was started with, except names that are not secrets (PATH, HOME, PORT, NODE_ENV and a few more).

A service’s Logs tab on such a server has From: Loki, last 24 hours or last 7 days, searched by Loki.

Not sent: releases, builds and Caddy; lines from before the drain was set; lines written while the agent restarts. While Loki does not answer, up to 10 000 lines wait; then the oldest are dropped.