تخطَّ إلى المحتوى

nself health

هذا المحتوى غير متوفر بلغتك بعد.

Health check management with continuous monitoring.

nself health [subcommand] [flags]

nself health runs health checks against running ɳSelf services and HTTP endpoints. Running �P1� health without a subcommand executes all health checks, the same as �P2� health check.

Each service is checked using its native health method: pg_isready for PostgreSQL, HTTP /healthz for Hasura and Auth, PING for Redis, and /health for Nginx. Response times are shown alongside the health status.

The watch subcommand provides continuous monitoring, it re-runs all checks every --interval seconds until you press Ctrl+C. Use --quiet to suppress output when all services are healthy and only print on failure, suitable for monitoring scripts.

SubcommandDescription
checkRun all health checks (default when no subcommand given)
service <name>Check a single service by name
endpoint <url>Check an HTTP endpoint
watchContinuous health monitoring (Ctrl+C to stop)
historyShow last 20 health checks
configShow health check settings
FlagDefaultDescription
--timeout30Check timeout in seconds
--interval10Watch interval in seconds (for watch)
--retries3Retry count on failure
--jsonfalseJSON output
--quietfalseOnly output on failure
--env""Environment to load config for
--help, -hnoneShow help
Terminal window
# Run all health checks
nself health
nself health check
# Check a single service
nself health service postgres
nself health service hasura
# Check an HTTP endpoint
nself health endpoint https://api.myapp.dev/health
# Continuous monitoring every 5 seconds
nself health watch --interval 5
# Monitor silently, only print on failure
nself health watch --quiet
# Show last 20 health check results
nself health history
# Show health check configuration
nself health config
# JSON output for monitoring integrations
nself health --json

Sample output:

Service Status Time Details
postgres ✓ healthy 3ms pg_isready
hasura ✓ healthy 45ms /healthz 200
auth ✓ healthy 52ms /healthz 200
nginx ✓ healthy 8ms /health 200

Commands | Home