Skip to the content

Check full Central's health with doctor

Check every store, role, grant and tenant of a full Central deployment in one pass, read what a warning means, and feed the result to monitoring.

Built, not yet claimed preview: this guide describes a package that has not passed its release gate.

garm-central doctor checks a full Central deployment in one pass: Postgres, the event streams and ClickHouse, the roles' processes, the backups, who may write and read each table, and each tenant's own state. Every check has a stable id, says what to do when it is not ok and which guide covers it, and the whole report comes as JSON for your monitoring and as a support bundle with no tenant data.

1. Run doctor on the operator host

Run doctor on the operator host, with the --full file and a tenant's state directory. It prints one line per check, grouped by store and then by tenant, each ok, WARN or FAIL with its id, and under any that is not ok the fix and the guide.

It exits 0 when every check is ok, 1 on a warning and 2 on a failure. Every check reads; none changes the stores, and a store that does not answer within 5 seconds fails its check rather than holding up the rest.

garm-central --full operator.json --state-dir acme doctor

See also

Install full Central with Helm

Install full Central on Kubernetes: its datastores, the first tenant and its root, each role's keys, the chart from digests, a first admin and machine.

2. Give doctor the operator host's sign-ins

Some checks read what only the operators may: the roles' heartbeats, the event backups and the tenants' quotas through the operator role's postgres_operator, and ClickHouse's grants and row policies through clickhouse.operator, signed in as your operator_user. Without them those checks warn "not checked", as they do in helm test, which runs with edge's settings.

With them, clickhouse.writers fails when anyone but the roles may insert into an event table, and clickhouse.row_policies fails on a row policy Central did not make, which could show one tenant's rows to another's reader. A deployment upgraded but not yet migrated warns until migrate grants the operators' user those reads.

datastores.tls warns for each ClickHouse or NATS server your settings reach in clear on the network. Central refuses such a URL unless allow_plaintext names that datastore; serve them over https:// and tls:// and drop it.

See also

Run a full Central deployment from the operator console

Open full Central's operator console on the operator host, add your passkey, and read the deployment's health, tenants, backups and audit chain.

3. Read what a warning or failure means

doctor --explain with a check's id says what the check holds and when it warns or fails. An id never changes meaning: a check that comes to mean something else gets a new id, so a rule in your monitoring keeps meaning the same thing.

Some warnings are expected for a while: backups.events until event backups are set up, the setup checklist's items until each is done, and postgres.quotas while more than one tenant has no quota. central.tls_pin failing is never expected: the TLS key is not the one the tenant's org root pins, and every enrolled machine refuses to connect.

garm-central doctor --explain clickhouse.row_policies

4. Check the stores before an install or upgrade

doctor --preflight runs only the stores' checks and needs no state directory. The chart runs it as a hook Job before the migration and before any role starts, so a store that does not answer, a schema this release does not run or a stream with the wrong settings stops the install and names the fix.

Under --preflight, what migrate makes next is not a problem: a stream, a grant or a tenant reader's row policy not made yet is ok. Anything more than Central makes still fails.

garm-central --full operator.json doctor --preflight

5. Feed the report to monitoring

doctor --json prints the report as JSON, versioned as agentgarm.doctor.v1: each check's id, group, level, summary, fix and guide, with the counts and the exit code. Run it on a schedule from the operator host and alert on the exit code or on the ids you care about.

--pass-warnings exits 0 on a warning, for a job that should fail only on a failure, as the chart's hook and test Jobs do.

garm-central --full operator.json --state-dir acme doctor --json --pass-warnings

6. Make a support bundle

doctor --bundle writes the report, this binary's version and the stores' addresses without their credentials to a new file only you can read. It holds no tenant data and never overwrites a file. Send it with a support request.

Some things are not checked, because no client of Central can read them: the Postgres operator's version, each NATS server set's sync settings, whether the key encryption key answers, and the erasure journal bucket's object lock. Check those in your cloud's or cluster's own tools.

garm-central --full operator.json --state-dir acme doctor --bundle doctor-bundle.json

See also

Send a redacted support bundle

Write a JSON file of diagnostics with your home directory, user and host names and the secrets AgentGarm recognises redacted, sent only when you share it.