Skip to content

wdx observe

Run Grafana with the logs and metrics.

It runs in a container on this machine, under Docker or Podman, and reads the log files of the home; the daemon sends its metrics to it at otel.endpoint.

Command What it does
wdx observe start Start Grafana with the logs and metrics
wdx observe status Show whether Grafana is running
wdx observe stop Stop Grafana

Start Grafana with the logs and metrics.

Terminal window
wdx observe start [flags]

Waits until the stack is ready: the grafana/otel-lgtm image, with Grafana on 127.0.0.1:3000 and the collector the daemon sends its metrics to on 127.0.0.1:4318. The first start pulls the image, which can take minutes. It runs until stopped, and its data stays across starts.

Terminal window
# Start Grafana, then open the URL it prints
wdx observe start

The stack, already running or started, and where to open Grafana. With --json: {“result”: …, “stack”: {…}, “data_removed”: null}

With --json, result is one of: running or started.

Code Exit When
port_in_use 1 a port the observability stack needs is taken
runtime_failed 3 Docker or Podman failed
runtime_missing 3 neither Docker nor Podman is installed
usage 2 the request, command line or a setting is invalid
internal 3 an unexpected failure: database, filesystem or git

Show whether Grafana is running.

Terminal window
wdx observe status [flags]

Show whether Grafana is running

Terminal window
# Show whether Grafana is running
wdx observe status

Whether the stack is running, under which runtime, and its container: where to open Grafana, where it takes metrics and which logs it reads. With --json: {“running”: …, “runtime”: …, “stack”: {…}}

Code Exit When
runtime_failed 3 Docker or Podman failed
usage 2 the request, command line or a setting is invalid
internal 3 an unexpected failure: database, filesystem or git

Stop Grafana.

Terminal window
wdx observe stop [--purge] [flags]

The stack’s container is removed. Its data, the logs and metrics it stored, stays for the next start unless --purge is given.

Flag Default Description
--purge also remove the stack’s data
Terminal window
# Stop Grafana and keep its data
wdx observe stop
# Stop it and remove its data
wdx observe stop --purge

Whether the stack was stopped and, with --purge, whether its data was removed. With --json: {“result”: …, “stack”: null, “data_removed”: …}

With --json, result is one of: not_running or stopped.

Code Exit When
runtime_failed 3 Docker or Podman failed
runtime_missing 3 neither Docker nor Podman is installed
usage 2 the request, command line or a setting is invalid
internal 3 an unexpected failure: database, filesystem or git