mirror of
https://github.com/home-assistant/core
synced 2024-09-18 19:55:20 +02:00
Add prometheus metric naming guidelines (#37149)
* Add prometheus metric naming guidelines. * Update homeassistant/components/prometheus/README.md Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com> Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com>
This commit is contained in:
parent
b64ae55c66
commit
6ca476fe21
15
homeassistant/components/prometheus/README.md
Normal file
15
homeassistant/components/prometheus/README.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Prometheus integration
|
||||
|
||||
This integration exposes metrics in a Prometheus compatible format.
|
||||
|
||||
## Metric naming guidelines
|
||||
|
||||
Please follow these guidelines while defining metrics.
|
||||
|
||||
* Metric and label names should conform to [Prometheus
|
||||
naming guidelines](https://prometheus.io/docs/practices/naming/).
|
||||
* Domain-specific metrics should have the domain (`sensor`, `switch`,
|
||||
`climate`, etc.) as a metric name prefix.
|
||||
* Enum-like values (e.g. entity state or current mode) should be exported using
|
||||
a "boolean" metric (values of 0 or 1) broken down by state/mode (as a metric
|
||||
label).
|
Loading…
Reference in New Issue
Block a user