mirror of
https://github.com/containrrr/watchtower.git
synced 2025-02-01 19:14:37 +02:00
Add additional information for metrics.md (#1193)
Mention the specific endpoint and an example Promethes scrape_config.
This commit is contained in:
parent
084249c5fc
commit
8590d88d0d
@ -7,6 +7,8 @@ Metrics can be used to track how Watchtower behaves over time.
|
|||||||
To use this feature, you have to set an [API token](arguments.md#http-api-token) and [enable the metrics API](arguments.md#http-api-metrics),
|
To use this feature, you have to set an [API token](arguments.md#http-api-token) and [enable the metrics API](arguments.md#http-api-metrics),
|
||||||
as well as creating a port mapping for your container for port `8080`.
|
as well as creating a port mapping for your container for port `8080`.
|
||||||
|
|
||||||
|
The metrics API endpoint is `/v1/metrics`.
|
||||||
|
|
||||||
## Available Metrics
|
## Available Metrics
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
@ -17,6 +19,21 @@ as well as creating a port mapping for your container for port `8080`.
|
|||||||
| `watchtower_scans_total` | Counter | Number of scans since the watchtower started |
|
| `watchtower_scans_total` | Counter | Number of scans since the watchtower started |
|
||||||
| `watchtower_scans_skipped` | Counter | Number of skipped scans since watchtower started |
|
| `watchtower_scans_skipped` | Counter | Number of skipped scans since watchtower started |
|
||||||
|
|
||||||
|
## Example Prometheus `scrape_config`
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: watchtower
|
||||||
|
scrape_interval: 5s
|
||||||
|
metrics_path: /v1/metrics
|
||||||
|
bearer_token: demotoken
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- 'watchtower:8080'
|
||||||
|
```
|
||||||
|
|
||||||
|
Replace `demotoken` with the Bearer token you have set accordingly.
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
|
|
||||||
The repository contains a demo with prometheus and grafana, available through `docker-compose.yml`. This demo
|
The repository contains a demo with prometheus and grafana, available through `docker-compose.yml`. This demo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user