Observability
Every node checks its own health every 30 seconds and reports failing checks and active alerts.
Until you’ve enrolled a user device, pass --as-operator to node API commands (node status,
node services, node logs).
Check cluster health
Section titled “Check cluster health”anastroctl node status # health, version, API health, git rev, and active alertsanastroctl node services # every service on each node and its stateFilter to specific nodes with -n <node> (repeatable). node status exits non-zero if any node is
unhealthy.
Because node status talks to each node’s own machined API, it still works when apid or
Postgres is down. A node is unhealthy if any enabled service isn’t active or if any of these checks
fail (the same gate upgrades wait on):
| Check | Fails when |
|---|---|
secrets |
Node is sealed (missing a secret referenced by its config) |
starting |
Services haven’t finished starting yet |
etcd-member |
etcd sees no leader (3 or 5 nodes) |
postgres-replication |
Postgres is neither leading nor replicating closely (3 or 5 nodes) |
secure-boot |
[node.boot] secure_boot = true, but booted without Secure Boot |
image-security |
Production image lacks its signed PCR 11 epoch policy or /var isn’t bound to PCR 7 + PCR 11 |
The API column checks whether apid is reachable and talking to Postgres (a dash means it wasn’t
checked or wasn’t reachable, such as when calling with --as-operator). Alerts show alongside
health without marking a node unhealthy.
Drill down into specific subsystems:
anastroctl cluster postgres status # members, primary, replication laganastroctl cluster backup status # base backups and WAL archivinganastroctl cluster etcd membersanastroctl cluster host list # workers and machine resource usageanastroctl cluster fs status # workspace GC stateanastroctl node list # registered control-plane nodesService logs and restarts
Section titled “Service logs and restarts”anastroctl node logs -n cp1 apid # last 100 linesanastroctl node logs -n cp1 postgres -f # stream liveanastroctl node logs -n cp1 schedd --lines 1000anastroctl node restart -n cp1 apidService names match anastroctl node services: apid, schedd, postgres (Patroni on HA
clusters), etcd, relay, agents, secretd, keyd, opd, hostagent, dwfsd, egress
(Package firewall), and postgres-other during a Postgres major
upgrade.
Built-in alerts
Section titled “Built-in alerts”Cluster-wide alerts are evaluated by the Postgres primary (which also logs each raise/clear event);
node-local alerts come from each node. All active alerts appear in anastroctl node status.
| Alert | Fires when |
|---|---|
BackupsDisabled |
Backups are turned off |
BaseBackupMissed |
No base backup exists, or the scheduled one is >1 hour overdue |
WalArchiveStalled |
WAL archiving has failed for 5 minutes |
BackupVerifyFailed |
Latest automated backup verification failed |
ReplicationLagHigh |
A Postgres replica is >16 MiB behind |
EtcdQuorumAtRisk |
Losing one more etcd member will break quorum |
PostgresNoPrimary |
No Postgres primary is elected |
KeyProviderUnavailable |
keyd is down or missing keys while filesystem is enabled |
SecretStoreUnavailable |
secretd is down on a node holding secrets/kek |
TunnelDown |
Cloudflare Tunnel is enabled, but cloudflared isn’t connected |
TunnelStopped |
Watchdog stopped cloudflared because hooks /healthz failed (other connectors carry traffic) |
CertExpiringSoon |
A certificate the node depends on ends within 30 days, or has ended: the image’s Secure Boot certificate (past it, the node admits no upgrade), or on HA control-plane nodes etcd’s peer certificate or CA |
StoreUnreachable |
A store in use (backup.store, filesystem.store, pidurable.payload_store) doesn’t answer the primary within 10 seconds; checked every 5 minutes |
GcStalled |
Filesystem GC hasn’t finished a pass for an hour past its scheduled time, or the last pass reported errors |
PortabilityLagHigh |
A machine’s workspace has a snapshot that hasn’t reached the store for over 15 minutes: if its host were lost, the machine would resume that far back |
For CertExpiringSoon on etcd’s peer certificate, run anastroctl cluster bundle renew-etcd, then
anastroctl cluster unseal; for etcd’s CA, roll it over with anastroctl cluster bundle etcd-ca prepare, activate and finish, unsealing every node after each. For StoreUnreachable, run
anastroctl cluster storage test <store> to see which operation fails. For GcStalled,
anastroctl cluster fs gc shows the last pass and --now runs another. For
PortabilityLagHigh, the host’s dwfsd logs say why its uploads are behind: usually a slow
uplink after large writes, or a store that refuses them. A planned move or drain never loses that
work; only a lost host does.
Export metrics and alerts over OTLP
Section titled “Export metrics and alerts over OTLP”Configure an OTLP/HTTP endpoint in anastro.toml (applies live across control-plane and
worker-only nodes):
[observability]otlp_endpoint = "https://otel.example.com:4318"otlp_headers = { authorization = "secret:observability/otlp_token" }printf 'Bearer %s' "$TOKEN" | anastroctl cluster bundle set observability/otlp_tokenanastroctl cluster unsealanastroctl cluster applyAfter each 30-second check cycle, every node pushes JSON OTLP metrics to
<otlp_endpoint>/v1/metrics and alert raise/clear logs (anastro.alert.raised,
anastro.alert.cleared) to <otlp_endpoint>/v1/logs.
Resource attributes include service.name = "anastro-machined", host.name, anastro.node.name,
anastro.cluster.name, anastro.cluster.id, and service.version. Exported metrics include:
| Metric | Meaning |
|---|---|
anastro.node.healthy, anastro.node.failing{check} |
Same status shown by node status |
anastro.node.sealed |
1 while sealed |
anastro.alert.active{alert} |
1 while the alert is firing |
anastro.postgres.primary, anastro.postgres.replica_lag_bytes |
Primary status and replica lag |
anastro.backup.wal_archive_age_seconds, anastro.backup.base_backup_age_seconds |
Backup freshness |
anastro.postgres.database_size_bytes, anastro.postgres.xid_headroom, anastro.postgres.backends |
Built-in Postgres stats (no separate exporter needed) |