1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00
ha-core/homeassistant/components/prometheus
Antoine Meillet 4dc0cdbb5f
Ignore STATE_UNKNOWN in prometheus (#47840)
Giving a value of 0 by default can lead to erroneous
data being exported. For example, if a MQTT temperature
sensor is in `STATE_UNKNOWN` (which can happen after a
HASS restart), a temperature of 0°C will be exported.
Some user might prefer no value rather than a wrong one.
2021-03-16 16:11:51 +01:00
..
__init__.py Ignore STATE_UNKNOWN in prometheus (#47840) 2021-03-16 16:11:51 +01:00
manifest.json
README.md

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