Read-only detailed health checks for the homelab cluster and hosts over an HTTP/JSON API
  • Go 93.6%
  • Python 4.2%
  • Go Template 1%
  • Shell 0.9%
  • Makefile 0.2%
  • Other 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
renovate[bot] 6ba9f8a25d
ci(github-action): update zekihan/release-workflows digest ( e01866e → 98a85ab ) (#31)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-27 05:34:19 +03:00
.github/workflows ci(github-action): update zekihan/release-workflows digest ( e01866e → 98a85ab ) (#31) 2026-11-27 05:34:19 +03:00
charts/argus Allow a per-group PBS backup max age (#27) 2026-11-23 20:21:20 +03:00
cmd/argus Adopt the checklist-adopted golangci middle tier and fix findings (#28) 2026-11-25 22:55:55 +03:00
docs Allow a per-group PBS backup max age (#27) 2026-11-23 20:21:20 +03:00
examples Add the Helm chart 2026-11-07 18:59:26 +03:00
internal Report refused SSH sessions as session failures (#30) 2026-11-26 18:39:57 +03:00
LICENSES Add build and release tooling from backrestwatch 2026-11-07 18:34:02 +03:00
scripts Never check a release against its own unpublished chart 2026-11-08 06:37:05 +03:00
tests Adopt the checklist-adopted golangci middle tier and fix findings (#28) 2026-11-25 22:55:55 +03:00
.dockerignore Add build and release tooling from backrestwatch 2026-11-07 18:34:02 +03:00
.gitignore Add build and release tooling from backrestwatch 2026-11-07 18:34:02 +03:00
.golangci.yaml Adopt the checklist-adopted golangci middle tier and fix findings (#28) 2026-11-25 22:55:55 +03:00
.goreleaser.yaml Add build and release tooling from backrestwatch 2026-11-07 18:34:02 +03:00
AGENTS.md Serve Prometheus metrics on an internal listener (#24) 2026-11-23 15:05:32 +03:00
CLAUDE.md Add repository scaffolding 2026-11-07 18:12:45 +03:00
Dockerfile Serve Prometheus metrics on an internal listener (#24) 2026-11-23 15:05:32 +03:00
go.mod feat(deps): update module github.com/zekihan/go-commons ( v1.2.0 → v1.4.1 ) (#33) 2026-11-27 02:28:16 +00:00
go.sum feat(deps): update module github.com/zekihan/go-commons ( v1.2.0 → v1.4.1 ) (#33) 2026-11-27 02:28:16 +00:00
LICENSE Add repository scaffolding 2026-11-07 18:12:45 +03:00
Makefile Render every config field in the released-chart check 2026-11-08 06:52:16 +03:00
NOTICE Add build and release tooling from backrestwatch 2026-11-07 18:34:02 +03:00
README.md Add a PBS backup freshness collection (#26) 2026-11-23 19:36:59 +03:00
renovate.json Add build and release tooling from backrestwatch 2026-11-07 18:34:02 +03:00
VERSION Allow a per-group PBS backup max age (#27) 2026-11-23 20:21:20 +03:00

argus

Read-only, detailed health checks for the homelab Kubernetes cluster and its hosts, served over a versioned HTTP/JSON API.

Each check reports one result per dimension (ok, n/a or a fixed reason code) plus the raw values behind it, per item and aggregated per collection, so a consumer can alert on a single field and see exactly what failed. Gatus is the first consumer; the API is not tied to it.

Argus replaces the homelab's separately deployed monitors with one static Go binary:

  • pgBackRest backup completion freshness (absorbs backrestwatch)
  • PostgreSQL cluster health (Crunchy PostgresCluster)
  • PVC filesystem fill from verified kubelet statistics (80% default), including pgdata and Redis
  • DNS over HTTPS: a decoded positive answer through the public route, not just HTTP 200
  • Longhorn volumes, replicas, backup targets and system backups
  • cert-manager certificates and the shared PostgreSQL PKI
  • External Secrets sync and store readiness
  • CronJob freshness and run history
  • Kubernetes nodes and Argo CD Applications
  • Host health over SSH through a fixed, forced-command probe

It performs no writes to the cluster other than its own state ConfigMap, never reads Secret contents, and never echoes raw condition messages, API bodies or spec fields.

API

Every route except /healthz requires Authorization: Bearer <token>. Check routes respond 200 when every result is healthy (ok or n/a) and 503 otherwise; /healthz always responds 200, and /v1/checks responds from its process results (apiserver, sample_fresh) alone, so an unhealthy collection listed there does not by itself make it 503.

Route Body
/metrics on :9090 (metricsAddress, empty disables) Prometheus exposition: http_requests_total and http_request_duration_seconds by method, route and status, argus_collection_healthy by collection, argus_pbs_last_backup_timestamp_seconds by datastore, backup type and backup id, plus Go runtime and process metrics; internal only, never through the ingress
/v1/<collection>/<item> one item: results per dimension plus collection, raw values
/v1/<collection> per dimension ok or the failing items, plus collection and inventory; items gives each item's verdict
/v1/checks every route and its verdict; results.apiserver and results.sample_fresh describe the process
/healthz process liveness only, no authentication

"Persistent for" windows (a node cordoned or version-skewed for more than 2h, an Argo CD app OutOfSync for more than 15m or 7 days) are tracked in memory and restart with the pod: a window never fails before it has been observed in full, and observedSinceSeconds shows how long the current pod has watched. With nightly edge updates, a 7-day window rarely elapses.

Collections: doh, pvcs, hosts, nodes, postgres, pgbackrest, longhorn/volumes, longhorn/system, cronjobs, certificates, pki, externalsecrets, clusterexternalsecrets, secretstores, clustersecretstores, argocd, pbs/backups.

{"check":"longhorn/volume","target":"immich/library","healthy":false,
 "observedAt":"2026-11-07T14:11:28Z","summary":"backup: backup_stale(last 1d7h, max 1d2h)",
 "results":{"collection":"ok","volume":"ok","state":"ok","robustness":"ok","replicas":"ok",
            "backup":"backup_stale(last 1d7h, max 1d2h)","scheduled":"ok","snapshots":"ok"},
 "values":{"sizeBytes":53687091200,"replicasHealthy":2,"replicasDesired":2,"attached":true}}

Command line

argus serve -config /config/config.json            # the service
argus serve -config config.json -check-config      # validate configuration only
argus once -config config.json -check cronjobs     # one collection; exit 0 healthy, 1 unhealthy, 2 usage or config error
kubectl --context <ctx> proxy --port 8001 &
argus once -api-url http://127.0.0.1:8001 -check pki-lifecycle
argus once -check pki-lifecycle -snapshot certificates.json
argus state validate -file evidence.json           # check an exported backrestwatch ledger before import

Plain HTTP is accepted only for a loopback origin such as kubectl proxy. once never writes. A failed collection (API error, 403) is reported in the envelope and exits 1, like any unhealthy result.

Development

make lint test test/race test/integration (or make audit), make chart-test, make container-test, make release-check. See docs/design.md for the design, docs/parity.md for the mapping from each replaced monitor's tests, charts/argus/README.md for deployment and docs/publishing.md for releases.

License

GNU Affero General Public License v3.0. See LICENSE and NOTICE.