Command-line user guide
The owl command publishes node and link observations, reads event history,
controls reader connections, and deletes entities or stream history. For
browser playback, see the viewer guide.
Installation
Install a package
Install the owlclient package using your deployment's configured SPHERE package repository. On a Debian or Ubuntu host with that repository already configured:
sudo apt update
sudo apt install owlclient
owl --help
The SPHERE deployment playbooks configure the repository and install the package on event generator nodes automatically.
Build from source
Install Git and a Go toolchain compatible with go.mod (Go 1.23.5 or later)
on the machine where you will build the CLI. Download the separate
CLI repository, enter the
checkout, and build:
mkdir -p ~/src/owl
git clone https://gitlab.com/mergetb/frontends/owl/cli.git ~/src/owl/cli
cd ~/src/owl/cli
go build -o build/owl .
./build/owl --help
If you already have the checkout, enter ~/src/owl/cli instead of cloning it
again. For a private repository, authenticate with a GitLab account and a token
with read_repository access when prompted for a password.
The build downloads the versioned Owl API module and other Go dependencies;
private GitLab modules require your normal GitLab module access configuration.
The Makefile also supports make build-amd64 and make build-arm64, producing
Linux binaries at build/owl-amd64 and build/owl-arm64.
Package maintainers can find Debian and RPM build notes in the CLI
checkout at debian/README.md and rpm/README.md. The executable built above
is ~/src/owl/cli/build/owl; use that path in place of owl in the following
examples, or install it in a directory on your PATH.
Connect to a stream
Every operation needs a full server URL, including http:// or https://, and
an Owl ID. On an attached XDC, copy the ID shown in the viewer. It has the form
REALIZATION.EXPERIMENT.PROJECT. Direct CLI use can use other stream names;
the XDC browser only opens its attached realization's stream.
owl --server http://control.infra --owlid REALIZATION.EXPERIMENT.PROJECT \
send node server --state ok
The server URL is the backend's base URL, not the browser viewer's /api
address. Browser login does not configure CLI authentication. Use the backend
reachable from your experiment network.
For repeated commands, create ~/.owl/config.yaml:
server: http://control.infra
owlid: REALIZATION.EXPERIMENT.PROJECT
Create the ~/.owl directory first if it does not exist. The CLI looks for the
first config.yaml in this order: /etc/owl/, your home directory, ~/.owl/,
then the current directory. Settings are not merged across those files.
Explicit flags override environment variables, which override the selected
configuration file. Environment names are SERVER and OWLID, without an
OWL_ prefix:
SERVER=http://control.infra OWLID=demo owl send node server --state ok
The owl config command shows help about configuration; edit the YAML file to
change saved values. It does not write configuration, and there is no
--config file option.
| Global flag | Short | Purpose |
|---|---|---|
--server URL | -s | Owl backend base URL. |
--owlid ID | -o | Stream to read or modify. |
--loglevel LEVEL | -l | panic, fatal, error, warning, info, debug, or trace; default info. warn is also accepted. |
--help | -h | Show help for the current command. |
All subsequent examples assume you have configured the server and stream.
Use a separate ID such as demo for terminal-only experiments.
Publish observations
An event changes exactly one characteristic: state, color, or shape. Send multiple events to change multiple characteristics.
owl send node server --state ok --message "Service ready"
owl send node server --color '#43dbc0'
owl send node server --shape square
owl send link server client1 --state warning \
--message "Packet loss" --narrative "Loss exceeded the experiment threshold."
The experiment model defines the experiment topology, including every experiment node name. Use those names when publishing observations about experiment nodes. If an observation names something outside the experiment model, Owl creates an additional visualization node in the viewer.
Additional nodes are useful when they serve a specific observability purpose, such as representing a logical service or an aggregate status. Otherwise, using the experiment's existing node names usually gives the clearest view. These additional viewer nodes do not create resources in your SPHERE experiment. Link endpoint order does not affect which link the viewer updates.
| Flag | Short | Value |
|---|---|---|
--state | -S | ok, warning, error, or unspecified. Case-insensitive; names such as STATE_OK also work. |
--color | -c | A CSS color, such as red or '#eb5757'. Quote hexadecimal colors in the shell. |
--shape | -p | A shape string. The viewer draws node shapes circle, square, triangle, and star; other strings fall back to a circle. |
--message | -m | A short description. |
--narrative | -n | A longer explanation. |
--duration | -d | Nonnegative duration in milliseconds; default 0 means no expiry. |
Exactly one of --state, --color, and --shape is required for send node
and send link. A message or narrative accompanies a characteristic change;
it cannot be sent alone with these commands. State and color are independent:
an error state does not replace an explicitly assigned color.
The CLI accepts link shape strings, such as --shape dashed, and records
them. The viewer does not apply link shape changes; the legend can show
solid, dashed, and dotted line samples.
Temporary changes
owl send node server --state ok --message "Normal operation"
owl send node server --state error --duration 5000 \
--message "Temporary fault" --narrative "A five-second simulated outage."
In the viewer, the error expires five seconds after that event is received, revealing the previous unexpired state. The record remains in history. Replay starts the duration again, and changing playback speed does not scale the duration. Other readers decide how to interpret this metadata.
Publish a legend or topology
Save the example snapshots as legend.json and
topology.json in your current directory, then run:
owl send legend legend.json
owl send topology topology.json
Each file contains a complete snapshot, replacing the preceding snapshot's
meaning for consumers. Earlier records remain in history. Both commands
accept - to read JSON from standard input:
printf '%s\n' '{"entries":[{"state":"STATE_OK","message":"Healthy"}]}' \
| owl send legend -
See the event format reference for the JSON
structure. A topology snapshot is recorded for stream consumers; the XDC
viewer gets the experiment model from the SPHERE portal to build its initial
topology, and can add visualization nodes as observations arrive. A legend is shown
only after the viewer receives a legend record, so replay from offset 0 to
include one sent at startup.
Generate sample data
owl -o demo send random events 20 --interval 250
This sends 20 random events, spaced 250 milliseconds apart. An interval of
0 (the default) sends them in one request. Use positive counts and
nonnegative intervals. Random events use names node-1 through node-10.
Names outside the experiment model create additional visualization nodes.
Use a separate stream if you do not want to add them to your experiment view,
or use the supplied experiment demos for matching
topology and names.
Read and replay events
owl get stream # From offset 0, without playback delays
owl get stream 0 --speed 1 # From the beginning at original timing
owl get stream 42 --speed 2 # From offset 42, twice as fast
owl get stream -- -1 # Live tail: only events arriving after connection
owl get stream --timestamp 2026-11-17T14:00:00Z --speed 1
The reader stays open after it catches up and waits for new events. Press Ctrl+C to close it. Output is human-readable log text, including entity, legend, and topology records; it is not a JSON export.
get stream option | Meaning |
|---|---|
[offset] | Start at that stored position, default 0. A negative number selects the live tail; use -- -1 so it is parsed as an argument. |
--timestamp, -t | An RFC3339 time with a timezone; cannot be combined with a numeric offset. Uses RabbitMQ's stored timestamp position. |
--speed, -p | 0 (default) sends without pacing; 0.5 is half speed, 1 preserves timing, 2 is twice as fast. Any finite nonnegative value is allowed. |
--clientid, -c | Set the reader's ID; otherwise a UUID is generated and printed. |
Playback timing uses timestamps assigned by the Owl server on receipt. Events sent in a single request share a timestamp. Use separate, spaced requests when producing data that should replay with gaps. Numeric offsets must fit in a signed 64-bit integer. Older positions may no longer exist after stream retention removes history.
Fetch a batch
owl get events 10 --clientid batch-reader
Use a positive count. The server stores the next consumer offset after
receiving a full batch; reusing the client ID requests subsequent events.
Without --clientid, each command generates a new reader ID. The current
implementation can wait for the requested number of events when too few are
available. Use get stream and Ctrl+C for interactive reading of sparse
streams.
Stop a reader
Start a named reader in one terminal:
owl get stream 0 --clientid observer
Then stop it from another terminal using the same server and Owl ID:
owl stop stream observer
# Equivalent:
owl stop stream --clientid observer
Supply either the positional ID or --clientid, not both. This closes that
reader; it does not stop publishers or remove history. Stop requests must
reach the server process hosting the reader. A missing reader produces a
message saying no active stream was found. The browser uses a separate ID
for each transport connection; use its own Stop button for browser playback.
Delete an entity or history
owl delete link server client1
owl delete node client1
These append deletion records to history. In the viewer, deleting a node also
removes its links. Earlier records remain available for replay, and later
node observations can restore deleted visualization nodes as well as nodes
defined in the experiment model. nodes and links are aliases for node
and link.
To erase the entire selected stream's history:
owl delete stream
This takes effect immediately without confirmation and affects all readers of that Owl ID. The server recreates an empty stream. Stop event generators first if you want it to stay empty, and resend legends or snapshots if needed.
Troubleshooting
| Symptom | Check |
|---|---|
| Invalid URL, refused connection, or no response | Use a full backend URL and check experiment network access. control.infra is the supplied demos' backend, not a universal endpoint. |
| Unexpected stream or server | Check command flags, SERVER/OWLID, and the first matching config.yaml. Run with --loglevel debug to see the file used. |
| Expected node observation is missing | Check the backend URL and the viewer's attached stream ID. Check the node name for typos; an unfamiliar name creates a separate viewer node. |
| New events missing during replay | Try --speed 0 to catch up, or use get stream -- -1 to watch only new arrivals. |
| Batch command keeps waiting | Publish enough events or switch to get stream; see the batch behavior above. |
| Cannot set both state and color | Send two events, one per characteristic. |
| Stop reports no reader | Check the Owl ID, client ID, and which backend process received the request. |
Use owl COMMAND --help for the available options on your installed version.