mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Update prometheus configuration example for version 2.26+ (#18565)
* Update prometheus configuration example for version 2.26+ The bearer token configuration entry have changed format in the latest Prometheus (starting at version 2.26). Instead of bearer_token:, it needs a authorization: credentials: entry. * Small tweak Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
86436ca1a7
commit
523d1b0f3b
@ -173,6 +173,23 @@ You can then configure Prometheus to fetch metrics from Home Assistant by adding
|
||||
- targets: ['HOSTNAME:8123']
|
||||
```
|
||||
|
||||
The format to configure the bearer token has changed in Prometheus 2.26, so if you have a newer version, you can use this configuration sample:
|
||||
|
||||
```yaml
|
||||
# Example Prometheus scrape_configs entry (For version 2.26+
|
||||
- job_name: "hass"
|
||||
scrape_interval: 60s
|
||||
metrics_path: /api/prometheus
|
||||
|
||||
# Long-Lived Access Token
|
||||
authorization:
|
||||
credentials: "your.longlived.token"
|
||||
|
||||
scheme: https
|
||||
static_configs:
|
||||
- targets: ['HOSTNAME:8123']
|
||||
```
|
||||
|
||||
When looking into the metrics on the Prometheus side, there will be:
|
||||
|
||||
- All Home Assistant domains, which can be easily found through the common **namespace** prefix, if defined.
|
||||
|
Loading…
x
Reference in New Issue
Block a user