7d256f56c5
* Removed prometheus from .coveragerc * Update prometheus tests with handler categories * Updated prometheus metrics to use the current registry - don't use the registry created on import (needed for tests) * Reset the prometheus CollectorRegistry before every test * Update prometheus metrics generation - Use latest registry when generating a response * Add default collectors when resetting the registry * Move entities to the specific prometheus test case * Refactor body generation for prometheus tests * Add test case for sensors without unit after rebase * Fix prometheus tests - Wait for events in prometheus tests - Add workaround for demo platform dependecy conversation (aiohttp frozen router) * Added prometheus tests for attribute metrics * Added prometheus tests for binary_sensor * Add prometheus test for input_boolean * Add prometheus test for lights * Add prometheus test for lock * Add prometheus test for sensor fahrenheit conversion * Fix prometheus test for input_number |
||
---|---|---|
.. | ||
README.md | ||
__init__.py | ||
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).