Monitor service health
The azd app health command provides detailed health status for all
your services, helping you quickly identify and troubleshoot issues.
Check Health Status
Get a health overview of all services:
azd app health Expected Output
Service Health Status
βββββββββββββββ¬βββββββββββ¬ββββββββββββββ¬ββββββββββββββββββββ
β Service β Status β Uptime β Last Check β
βββββββββββββββΌβββββββββββΌββββββββββββββΌββββββββββββββββββββ€
β api β β Healthyβ 45m 23s β 2s ago β
β web β β Healthyβ 45m 22s β 2s ago β
β postgres β β Healthyβ 45m 30s β 5s ago β
β redis β β Healthyβ 45m 29s β 3s ago β
βββββββββββββββ΄βββββββββββ΄ββββββββββββββ΄ββββββββββββββββββββ
All services healthy! Detailed Health Information
Get more details about a specific service:
azd app health --service api --verbose Health Check Types
azd app supports various health check types based on your service type:
- HTTP - Checks HTTP endpoints for 2xx responses (default for services with ports)
- TCP - Verifies TCP port connectivity (for databases, gRPC services)
- Process - Checks if the process is running (default for services without ports)
- Output - Matches a regex pattern in stdout (for watch/build services)
Understanding Status vs Health
azd app tracks two independent concepts:
- Lifecycle State - Is the process running? (starting, running, stopped, etc.)
- Health Status - Is the service responding correctly? (healthy, unhealthy, degraded)
A running service can be unhealthy (process up, but health checks failing), and a stopped service has no health status. The dashboard shows both clearly.
Streaming Mode
Continuously monitor health status in real-time:
azd app health --stream Troubleshooting Unhealthy Services
When a service is unhealthy:
- Check the service logs:
azd app logs --service <name> - View detailed health info:
azd app health --service <name> --verbose - Stop services with Ctrl+C and restart with
azd app run
Try It Yourself
Run `azd app health` to see the health status of all your services. Try `--stream` mode to see real-time updates.
Expected: You should see a table showing each service's health status, uptime, and when it was last checked.
Custom Health Endpoints
Configure custom health check endpoints in your azure.yaml:
services:
api:
health:
path: /healthz
interval: 30s
timeout: 5s
retries: 3 JSON Output
For integration with monitoring tools:
azd app health --output json Exit Codes
0- All services healthy1- One or more services unhealthy2- Error checking health