Health API reference
Dapr provides health checking probes that can be used as readiness or liveness of Dapr and for initialization readiness from SDKs.
Get Dapr health state
Gets the health state for Dapr by either:
- Check for sidecar health
- Check for the sidecar health, including component readiness, used during initialization.
Wait for Dapr HTTP port to become available
Wait for all components to be initialized, the Dapr HTTP port to be available and the app channel is initialized. For example, this endpoint is used with Kubernetes liveness probes.
HTTP Request
GET http://localhost:<daprPort>/v1.0/healthz
HTTP Response Codes
Code | Description |
---|---|
204 | Dapr is healthy |
500 | Dapr is not healthy |
URL Parameters
Parameter | Description |
---|---|
daprPort | The Dapr port |
示例
curl -i http://localhost:3500/v1.0/healthz
Wait for specific health check against /outbound
path
Wait for all components to be initialized, the Dapr HTTP port to be available, however the app channel is not yet established. This endpoint enables your application to perform calls on the Dapr sidecar APIs before the app channel is initalized, for example reading secrets with the secrets API. For example used in the Dapr SDKs waitForSidecar
method (for example .NET and Java SDKs) to check sidecar is initialized correctly ready for any calls.
For example, the Java SDK and the .NET SDK uses this endpoint for initialization.
Currently, the v1.0/healthz/outbound
endpoint is supported in the:
HTTP Request
GET http://localhost:<daprPort>/v1.0/healthz/outbound
HTTP Response Codes
Code | Description |
---|---|
204 | Dapr is healthy |
500 | Dapr is not healthy |
URL Parameters
Parameter | Description |
---|---|
daprPort | The Dapr port |
示例
curl -i http://localhost:3500/v1.0/healthz/outbound
Related articles
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.