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
| File | Contents | Mode |
|---|---|---|
/etc/constellation/agent.env | CONSTELLATION_API_URL, CONSTELLATION_API_TOKEN, CONSTELLATION_ENDPOINT | 0600, root only |
/etc/constellation/socket.env | CONSTELLATION_SOCKET_PATH | world-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.
| Setting | Default | Set with |
|---|---|---|
| Buffer strategy | disk | CONSTELLATION_BUFFER_STRATEGY |
| Flush interval | 1s | CONSTELLATION_FLUSH_INTERVAL |
| Buffer limit | 100,000 records | agent config |
| Batch size | 500 records | agent 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 callsconstellation.ingest.v2.TelemetryIngest/WriteonCONSTELLATION_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 exceptINVALID_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 onoroff) 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.httptoPOST /v2/telemetry, the earlier path ofPOST /telemetry: the same records and scope (telemetry:write), with aDeprecation: trueheader and aLinkheader 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
| Variable | Default | Effect |
|---|---|---|
CONSTELLATION_API_TOKEN | None | Required. |
CONSTELLATION_API_URL | https://api.constellation.space | REST endpoint. |
CONSTELLATION_ENDPOINT | derived | gRPC ingest host:port. Derived for api.constellation.space and its stage./dev. variants; required otherwise. |
CONSTELLATION_EGRESS | grpc | grpc or http. |
CONSTELLATION_BUFFER_STRATEGY | disk | disk or memory. |
CONSTELLATION_FLUSH_INTERVAL | 1s | Flush cadence. |
CONSTELLATION_TELEGRAF_VERSION | 1.39.2 | Pinned Telegraf version. |
CONSTELLATION_TELEGRAF_SHA256 | pinned | Expected Telegraf package checksum. |
CONSTELLATION_ALLOW_TELEGRAF_TAKEOVER | 0 | Adopt an existing Telegraf. |
CONSTELLATION_ALLOW_TELEGRAF_VERSION_MISMATCH | 0 | Accept an unpinned Telegraf version. |
CONSTELLATION_ARTIFACT_BASE | release URL | Artifact 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
| Path | Purpose |
|---|---|
/usr/local/bin/constellation-agent | CLI. |
/usr/local/bin/telegraf-constellation-grpc | gRPC egress (gRPC only). |
/etc/constellation/agent.env | Credential. |
/etc/constellation/socket.env | Socket path. |
/etc/telegraf/telegraf.d/constellation.conf | Agent configuration. |
/etc/systemd/system/telegraf.service.d/constellation.conf | systemd drop-in. |
/usr/lib/tmpfiles.d/constellation-agent.conf | Recreates the socket directory at boot. |
/run/constellation-agent/telemetry.sock | The socket. |
/var/lib/constellation/buffer | Disk buffer. |
Next: Troubleshooting.