Lightweight health monitoring for your nSelf stack. Check service status, poll custom endpoints, and stream a live dashboard — without the full depth of nself doctor.
# Check all services in one shot
nself health check
# Watch a live dashboard (refreshes every 5 s)
nself health watch
# Check a specific service
nself health service hasura
# Probe any HTTP endpoint
nself health endpoint https://api.nself.org/healthznself health <SUBCOMMAND> [FLAGS]nself health is the day-to-day monitoring companion to the diagnostic nself doctor. Where doctor runs exhaustive checks and suggests fixes, health answers one question quickly: is everything running right now?
Use health check in cron jobs or CI pipelines to gate deployments. Use health watchfor a terminal dashboard during load tests or deploys. Use health endpoint to probe arbitrary URLs — useful for testing custom services and third-party integrations.
Health history is recorded locally and queryable with health history, giving you a lightweight uptime log without a separate monitoring stack.
Run a one-shot health check against all required and optional services in the current environment.
nself health check
# SERVICE STATUS LATENCY
# postgres healthy 12ms
# hasura healthy 24ms
# auth healthy 18ms
# nginx healthy 8ms
# redis healthy 5ms
# minio healthy 31ms
nself health check --jsonCheck a single named service and print detailed status including the container state, port binding, and last restart time.
nself health service hasura
# Service: hasura
# Status: healthy
# Container: nself-hasura-1 (running 3d 14h)
# Port: 8080 → 127.0.0.1:8080
# Last event: started 2026-05-04T09:12:43ZSend an HTTP GET to any URL and report the response code, latency, and TLS validity. Exits non-zero on any non-2xx response.
nself health endpoint https://api.nself.org/healthz
nself health endpoint https://ping.nself.org/version --expect 200
nself health endpoint http://localhost:8001/healthz --timeout 3Stream a continuously-refreshed terminal dashboard showing all service statuses. Refresh interval is configurable.
nself health watch # default: refresh every 5 s
nself health watch --interval 2 # refresh every 2 s
nself health watch --json # emit JSON lines (for piping to jq)Print the local health-check history log. Each entry records the timestamp, service, status, and latency.
nself health history # last 50 entries
nself health history --limit 200
nself health history --service postgres
nself health history --since 2026-05-01
nself health history --jsonShow or update the health-check configuration (custom endpoints, thresholds, notification hooks).
nself health config show
nself health config set watch.interval 10
nself health config set endpoint.timeout 5| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Emit JSON output (check, service, history) |
--interval | int | 5 | Refresh interval in seconds (watch) |
--timeout | int | 10 | HTTP probe timeout in seconds (endpoint) |
--expect | int | 200 | Expected HTTP status code (endpoint) |
--limit | int | 50 | Max history entries to display |
--since | string | — | Filter history from date (YYYY-MM-DD) |
--service | string | — | Filter history by service name |
--env | string | current | Target environment: local, staging, prod |
nself health check --json | jq '.services[] | select(.status != "healthy")'
# empty output = all healthy; non-empty = abortnself health check --env staging
nself health endpoint https://api.nself.org/healthz --env stagingnself health watch --json >> /var/log/nself-health.jsonlnself health history --service postgres --json | jq '.[] | select(.status != "healthy")'nself health endpoint https://ping.nself.org/license/validate --timeout 5 --expect 200NSELF_HEALTH_INTERVAL — default watch refresh interval in secondsNSELF_HEALTH_TIMEOUT — default probe timeout in seconds0 — all checks healthy1 — one or more services unhealthy2 — invalid arguments or missing subcommand3 — connection error (cannot reach Docker or service)