Skip to main content

Operate a fleet

Commands​

constellation-agent status | logs [lines] | logs -f | test | debug [on|off]
constellation-agent verify --ground-station-id <id> --ground-antenna-id <id> --satellite-id <id>
constellation-agent emit --ground-station-id <id> --ground-antenna-id <id> --satellite-id <id> --field k=v ... [--radio-id <id>] [--contact-id <id>] [--timestamp-ns <ns>] [--print]
constellation-agent emit --json [--print] < record.json

verify, test, and debug need root. The systemd unit is telegraf, so systemctl restart telegraf restarts the agent. Install, upgrade, and uninstall use the installer script.

logs wraps journalctl -u telegraf -o cat. Rejected records show up here:

sudo constellation-agent logs 2000 | grep -e rejected -e dropping

test validates the installed configuration against a scratch socket, leaving the live socket alone.

Debug mode​

sudo constellation-agent debug on # log every record as raw line protocol
sudo constellation-agent logs -f
sudo constellation-agent debug off

Both commands restart the agent, so connected publishers have to reconnect. Turn it off when you're done: it logs every record body.

Upgrades​

Re-run the install command. The socket path stays the same; publishers need to reconnect after the restart.

curl -fsSL https://install.constellation.space/agent | \
sudo --preserve-env=CONSTELLATION_API_TOKEN,CONSTELLATION_API_URL sh

If the host already runs a Telegraf the installer didn't install, or one at a different version, the installer stops. Set CONSTELLATION_ALLOW_TELEGRAF_TAKEOVER=1 or CONSTELLATION_ALLOW_TELEGRAF_VERSION_MISMATCH=1 to proceed. Taking over replaces that Telegraf's configuration.

Credentials​

FileContentsMode
/etc/constellation/agent.envCONSTELLATION_API_URL, CONSTELLATION_API_TOKEN, CONSTELLATION_ENDPOINT0600, root only
/etc/constellation/socket.envCONSTELLATION_SOCKET_PATHworld-readable

To rotate the key, re-run the installer with the new one exported as CONSTELLATION_API_TOKEN.

Application access​

sudo usermod -aG constellation constellation-publisher # grant
sudo gpasswd -d constellation-publisher constellation # revoke

Restart the application afterwards. A running process keeps the groups it started with.

Buffering​

The agent queues records while Constellation is unreachable and sends them when it's back.

SettingDefaultSet with
Buffer strategydiskCONSTELLATION_BUFFER_STRATEGY
Flush interval1sCONSTELLATION_FLUSH_INTERVAL
Buffer limit100,000 recordsagent config
Batch size500 recordsagent config

disk survives a restart but tops out around 290 records/s on NVMe, less on eMMC or SD. memory is much faster and loses up to one flush interval if the node dies. When the buffer is full, the oldest records are dropped.

Egress​

CONSTELLATION_EGRESS=grpc (default) or http.

  • gRPC runs /usr/local/bin/telegraf-constellation-grpc, which calls constellation.ingest.v2.TelemetryIngest/Write on CONSTELLATION_ENDPOINT. The platform writes the records that pass and reports the rest, which the agent logs and never resends. The agent holds and retries a batch on any error except INVALID_ARGUMENT, which it logs and drops, and splits a batch that is too large in halves.

    A restart during an outage loses what the gRPC child already took. While the platform refuses writes (unreachable, or the key revoked), the child holds the batch it took and stops reading, and up to 64 KiB of records (a few hundred) wait in the pipe from Telegraf to it. Restarting the agent then (re-running the installer, an upgrade, debug on or off) loses them, and the log counts only the held batch. Records still in the disk buffer survive. Fix the cause (restore the key or the network) before restarting when you can.

    Points written over gRPC are not yet counted in Telemetry points on the Usage page; points written over HTTP are.

  • HTTP uses Telegraf's own outputs.http to POST /v2/telemetry, the earlier path of POST /telemetry: the same records and scope (telemetry:write), with a Deprecation: true header and a Link header naming /telemetry. A rejected batch is dropped whole. HTTP egress has no restart gap: Telegraf keeps a failed batch in its buffer.

constellation-agent verify reads its proof record back from GET /v2/topology, the observed half of GET /topology at its earlier path, with the same topology:read scope.

Install-time variables​

VariableDefaultEffect
CONSTELLATION_API_TOKENNoneRequired.
CONSTELLATION_API_URLhttps://api.constellation.spaceREST endpoint.
CONSTELLATION_ENDPOINTderivedgRPC ingest host:port. Derived for api.constellation.space and its stage./dev. variants; required otherwise.
CONSTELLATION_EGRESSgrpcgrpc or http.
CONSTELLATION_BUFFER_STRATEGYdiskdisk or memory.
CONSTELLATION_FLUSH_INTERVAL1sFlush cadence.
CONSTELLATION_TELEGRAF_VERSION1.39.2Pinned Telegraf version.
CONSTELLATION_TELEGRAF_SHA256pinnedExpected Telegraf package checksum.
CONSTELLATION_ALLOW_TELEGRAF_TAKEOVER0Adopt an existing Telegraf.
CONSTELLATION_ALLOW_TELEGRAF_VERSION_MISMATCH0Accept an unpinned Telegraf version.
CONSTELLATION_ARTIFACT_BASErelease URLArtifact download base.

For an offline install, supply every artifact locally: CONSTELLATION_TELEGRAF_PACKAGE with CONSTELLATION_TELEGRAF_SIGNATURE, CONSTELLATION_INFLUXDATA_KEY, CONSTELLATION_CLI_PACKAGE, and (for gRPC) CONSTELLATION_GRPC_PACKAGE. Checksums are verified as for a download. Downloads lists every file with its checksum and walks through an offline install.

Uninstall​

curl -fsSL https://install.constellation.space/agent | sudo sh -s -- --uninstall
curl -fsSL https://install.constellation.space/agent | sudo sh -s -- --uninstall --purge # also delete buffered records

Uninstall removes the agent's configuration, binaries, and env files. The Telegraf package stays installed; a Telegraf that predated the agent gets its old configuration back. --purge also deletes /var/lib/constellation/buffer, including anything not yet delivered.

Files​

PathPurpose
/usr/local/bin/constellation-agentCLI.
/usr/local/bin/telegraf-constellation-grpcgRPC egress (gRPC only).
/etc/constellation/agent.envCredential.
/etc/constellation/socket.envSocket path.
/etc/telegraf/telegraf.d/constellation.confAgent configuration.
/etc/systemd/system/telegraf.service.d/constellation.confsystemd drop-in.
/usr/lib/tmpfiles.d/constellation-agent.confRecreates the socket directory at boot.
/run/constellation-agent/telemetry.sockThe socket.
/var/lib/constellation/bufferDisk buffer.

Next: Troubleshooting.