nself health
هذا المحتوى غير متوفر بلغتك بعد.
nself health
Section titled “nself health”Health check management with continuous monitoring.
Synopsis
Section titled “Synopsis”nself health [subcommand] [flags]Description
Section titled “Description”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.
Subcommands
Section titled “Subcommands”| Subcommand | Description |
|---|---|
check | Run all health checks (default when no subcommand given) |
service <name> | Check a single service by name |
endpoint <url> | Check an HTTP endpoint |
watch | Continuous health monitoring (Ctrl+C to stop) |
history | Show last 20 health checks |
config | Show health check settings |
| Flag | Default | Description |
|---|---|---|
--timeout | 30 | Check timeout in seconds |
--interval | 10 | Watch interval in seconds (for watch) |
--retries | 3 | Retry count on failure |
--json | false | JSON output |
--quiet | false | Only output on failure |
--env | "" | Environment to load config for |
--help, -h | none | Show help |
Examples
Section titled “Examples”# Run all health checksnself healthnself health check
# Check a single servicenself health service postgresnself health service hasura
# Check an HTTP endpointnself health endpoint https://api.myapp.dev/health
# Continuous monitoring every 5 secondsnself health watch --interval 5
# Monitor silently, only print on failurenself health watch --quiet
# Show last 20 health check resultsnself health history
# Show health check configurationnself health config
# JSON output for monitoring integrationsnself health --jsonSample output:
Service Status Time Detailspostgres ✓ healthy 3ms pg_isreadyhasura ✓ healthy 45ms /healthz 200auth ✓ healthy 52ms /healthz 200nginx ✓ healthy 8ms /health 200