Logs
shc logs reads the containers of one deployment, wherever they run. Name
the deployment with -s. Each line carries the name of the replica that
wrote it; web has one, nginx-r0.
$ shc logs -s web -n 5nginx-r0 | 2026/10/10 18:45:50 [notice] 1#1: OS: Linux 6.12.107+deb13-cloud-amd64nginx-r0 | 2026/10/10 18:45:50 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1024:524288nginx-r0 | 2026/10/10 18:45:50 [notice] 1#1: start worker processesnginx-r0 | 2026/10/10 18:45:50 [notice] 1#1: start worker process 22nginx-r0 | 2026/10/10 18:45:50 [notice] 1#1: start worker process 23-n keeps the last lines of each replica. db has one service, so one
name appears. The first line is the major-version check postgres-1 runs
before its server starts. What postgres wrote before its last two lines
depends on whether it has started once or twice.
$ shc logs -s db -n 6postgres-1-r0 | server stoppedpostgres-1-r0 |postgres-1-r0 | PostgreSQL init process complete; ready for start up.postgres-1-r0 |postgres-1-r0 | 2026-10-10 18:30:27.689 UTC [1] LOG: redirecting log output to logging collector processpostgres-1-r0 | 2026-10-10 18:30:27.689 UTC [1] HINT: Future log output will appear in directory "log".A positional service narrows the read to one service. --where picks a
replica by the labels the daemon keeps on it: node, service, member,
role and the rest. db’s primary carries role=primary, the live label
Postgres measures.
$ shc logs postgres-1 -s db -n 3postgres-1-r0 |postgres-1-r0 | 2026-10-10 18:30:27.689 UTC [1] LOG: redirecting log output to logging collector processpostgres-1-r0 | 2026-10-10 18:30:27.689 UTC [1] HINT: Future log output will appear in directory "log".$ shc logs -s db --where role=primary -n 3...--since takes a duration or a timestamp. --timestamps prefixes each line
with the engine’s own clock, which is how lines from several replicas were
put in order. --no-color drops the colours a terminal would get.
$ shc logs -s web --since 30m --timestamps -n 3nginx-r0 | 2026-10-10T18:45:50.454419960Z 2026/10/10 18:45:50 [notice] 1#1: start worker processesnginx-r0 | 2026-10-10T18:45:50.454641541Z 2026/10/10 18:45:50 [notice] 1#1: start worker process 22nginx-r0 | 2026-10-10T18:45:50.455531855Z 2026/10/10 18:45:50 [notice] 1#1: start worker process 23$ shc logs -s web --no-color -n 2...--all reads every running deployment in the tenant, one after the other.
-e names an environment, and -t a tenant: the platform’s own deployments
live in master, environment default.
$ shc logs --all -n 1...$ shc logs -t master -e default -s traefik -n 3...-f follows. Like shc events -f it does not return, so run it in tmux,
make nginx write a line by fetching its page through the port web publishes,
and read the session. -n 1 starts the follow at the last line already
written.
$ tmux new -d -x 200 -y 50 -s lg shc logs -s web -f -n 1$ curl -s http://127.0.0.1:18080/<!doctype html><title>hello</title><p>Hello from SHC.</p>$ tmux capture-pane -pt lgnginx-r0 | 2026/10/09 00:41:43 [notice] 1#1: start worker process 25nginx-r0 | 10.128.16.1 - - [09/Oct/2026:00:43:57 +0000] "GET / HTTP/1.1" 200 60 "-" "curl/8.14.1" "-"$ tmux kill-session -t lgThe daemon has a log of its own on every node. shc cluster logs reads a
unit’s log on a node: -S names the unit, shc for the daemon, and -n
the number of lines. The store runs inside the daemon, so its lines are in
the same log. On these machines the daemon runs under systemd and writes to
the journal, not to a file, so the route reads the unit’s journal and prints
its last lines. Each line is one record: time=, level=, msg= and the
fields the record carries, such as the code= of an event it reports. Which
lines are last depends on what the daemon was doing, so yours differ.
$ shc cluster logs obs01 -S shc -n 5...The same lines sit in the journal on the node itself.
$ journalctl --no-pager -u shc -n 3 -o cat...Container logs also leave the node. A collector container runs on every node and ships the containers’ stdout, with the node’s host metrics, to the system OpenObserve on obs01. It is not a deployment you install; the daemon keeps it running.
The daemon starts the collector once OpenObserve answers, so on obs01 it can take several minutes after the first page of this ladder. Run the command again until it shows.
$ docker ps --filter name=shc-collector --format '{{.Names}} {{.State}}'shc-collector runningThe next page reads what the collector shipped.
This page changed nothing. The tmux sessions it opened are closed.
Next: Metrics.