Skip to content

Watch your servers

Search and follow your logs

Every connected server sends its new log lines each minute. Search seven days of them from every server at once, or follow them live, without logging in to a server.

From What Levels
Containers The output of every running container, through Docker All
nginx /var/log/nginx/access.log and /var/log/nginx/error.log All
Your own services systemd services you installed (unit files in /etc/systemd/system, such as myapp.service or pm2-root.service), and cron All
The rest of the system Every other service, and the kernel Warnings and errors only
Sign-ins and typed commands SSH, sudo, su and login records Never, unless you turn it on
Firewall blocks The firewall’s lines for refused connections, mostly internet scans Never, unless you turn it on

Restarts, new images and memory kills appear as lines too, from docker and kernel.

Only new lines are sent: nothing written before the agent started. A container that starts later, such as a new deploy, is read from its first line.

Passwords and tokens are masked on your server, before anything is sent, and masked again by the service: redis://default:[masked]@redis:6379. See what the agent reads and sends. A masked line means the app wrote a secret to its logs: Clean and lean lists each app that does, and tells you the first time.

In the dashboard, open Logs. Each server’s page also has Open logs.

  • Search: words anywhere in a line, in any case, such as heap limit or a request id.
  • Server, Source (a container, nginx, a service or kernel) and Time: the last 15 minutes, hour, 6 hours, 24 hours or 7 days.
  • All levels, Errors, or Warnings (warnings and errors).
  • The chart counts lines over the time; red bars contain errors, so you can see when trouble started.
  • Follow live adds new lines as they arrive, every five seconds, until you choose Stop following.

The newest lines in the time show first, 50 at a time; Show 50 more goes back further. Follow live adds new lines at the top.

Lines written as JSON, such as Caddy’s access log or a Node app’s pino log, show as a short summary, such as GET /v1/orders → 200 · 12 ms · 203.0.113.9. Click the row (or press Enter on it) to open the line as it was written; click again to close it. Search and downloads always use the full line.

Download saves every line the filters match in the time chosen, oldest first, up to 100,000 lines, as text (.txt) or JSON lines (.jsonl, one object a line, for scripts). Passwords and tokens stay masked. If there are more lines, the file ends by saying so: choose a shorter time or more filters.

Downloading needs the Download and export files switch, which the Owner and Admin roles have, and any role you made with it. Members and viewers can read logs, but not download them.

Terminal window
kiyesi logs --server checkout-api-prod --level error --since 1h
kiyesi logs checkout-api-prod --follow
kiyesi logs --search "heap limit" --since 24h
kiyesi logs --server checkout-api-prod --since 7d --output checkout.jsonl
Option What it does
--server <name> Only this server. Without it, every server you can see.
--source <name> Only this container, service or file, such as checkout-api or nginx.
--level error or --level warn Only errors, or warnings and errors.
--since 15m, 1h, 6h, 24h or 7d How far back. The default is 1h.
--search "text" Only lines with this text, in any case.
--follow, -f Keep showing new lines until Ctrl+C.
--json Print JSON, for scripts (one object a line with --follow).
--limit <n> The most lines to show. The default is 300, up to 1000.
--raw Print JSON lines in full, rather than a short summary of each.
--output <file> Save every matching line to a file instead: .txt, or .jsonl for JSON lines. Up to 100,000 lines. Needs the Download and export files switch.

Add a logs section to /etc/kiyesi/config.yaml on the server. The agent reads it again each minute, so there is no restart.

logs:
# false sends no log lines at all. Metrics, scans and alerts carry on.
enabled: true
# false skips the system log; containers and nginx are still sent.
journal: true
# true also sends SSH, sudo and login records. Off by default.
auth: false
# true also sends the firewall's blocked-connection lines. Off by default.
firewall: false
# Send every line of these services too, not only warnings and errors.
include: [postgresql, redis-server]
# Never send these containers, services or files. * matches anything.
exclude: [worker-*, debug-tools]
# Never send a line that contains one of these texts.
drop: ["GET /health", "GET /favicon.ico"]

To leave a container out of everything, not only its log lines (its figures, requests, restarts and the scan’s checks too), add a containers section. It applies within a minute, and to the next scan:

containers:
# Leave out these containers entirely. * matches anything.
exclude: [scratch-*, kiyesi-drill-*]
# Or read only these containers.
include: []
  • Seven days. Older lines are deleted.
  • Per server, per minute: 2,000 lines and 1 MB, and 8 KB a line (longer lines are cut, and say so). Error lines have a small reserve of their own, so a flood of ordinary lines cannot hide them. When a minute is over, one line says how many were left out.
  • Per team, per day: a total allowance of log text. Past it, new lines are counted, not kept, until midnight UTC, and the Logs screen says so.

Anyone whose role has View on logs reads the logs of the servers they can see: Owner, Admin, Member and Viewer, and any role you made with it. A person limited to some projects, or with servers left out, sees only those servers, in the lines, the chart and the sources alike. Billing and Client do not see Logs, and neither does any role with the servers hidden. See Choose who sees what.

  • No lines from containers. The agent reads Docker’s logs through its socket, so it needs root, as the service installed by kiyesi connect has. Containers using the none log driver write nothing to read.
  • No lines from your own service. Check it writes to the system log: journalctl -u myapp -n 5. If its unit file is elsewhere than /etc/systemd/system, add it to logs.include.
  • Logs cannot be read right now. The log store is briefly unavailable. Lines sent meanwhile are kept and appear once it is back; metrics and alerts are not affected.