metrics: Add caddy_reverse_proxy_upstreams_healthy (#257)

This commit is contained in:
Dávid Szabó 2022-09-07 20:24:30 +02:00 committed by GitHub
parent 2ab3061111
commit 3fe4d09713
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,11 +70,12 @@ caddy_http_request_duration_seconds_bucket{code="308",handler="static_response",
... ...
``` ```
There are a number of metrics you'll see, that broadly fall under 3 categories: There are a number of metrics you'll see, that broadly fall under 4 categories:
- Runtime metrics - Runtime metrics
- Admin API metrics - Admin API metrics
- HTTP Middleware metrics - HTTP Middleware metrics
- Reverse proxy metrics
### Runtime metrics ### Runtime metrics
@ -215,6 +216,18 @@ Label | Description
`code` | HTTP status code `code` | HTTP status code
`method` | The HTTP method `method` | The HTTP method
### Reverse proxy metrics
#### `caddy_reverse_proxy_upstreams_healthy`
A gauge of the reverse proxy upstreams healthiness.
Value `0` means the upstream is unhealthy, where as `1` means the upstream is healthy.
Label | Description
-------|------------
`upstream` | Address of the upstream
## Sample Queries ## Sample Queries
Once you have Prometheus scraping Caddy's metrics, you can start to see some Once you have Prometheus scraping Caddy's metrics, you can start to see some