1
mirror of https://github.com/home-assistant/core synced 2024-09-15 17:29:45 +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:
Anton Tolchanov 2020-07-05 18:00:37 +01:00 committed by GitHub
parent b64ae55c66
commit 6ca476fe21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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).