This can be used to scrape data directly into your Prometheus-based monitoring and alerting-system, without the need of any other software.
The list of available metrics can be found by directly browsing your node under
<ip or node_name.local>/metrics, and may be increased in the future.
# Example configuration entry web_server: # Activates prometheus /metrics endpoint prometheus:
id (Optional, ID): Manually specify the ID used for code generation.
include_internal (Optional, boolean): Whether
internalentities should be displayed on the web interface. Defaults to
relabel (Optional): Override metric labels. See relabel
Example integration into the configuration of your prometheus:
scrape_configs: - job_name: esphome static_configs: - targets: [<ip or node_name.local>]
ESPHome allows you to do some basic relabeling of Prometheus metrics. This is useful if you want to have different metric names or IDs than those shown in Home Assistant or the web interface.
You can relabel metric name or ID labels by adding a
relabel block in the
and then adding a block with
name fields for each sensor whose labels your want to override.
Set the the
name label values of the Prometheus metric for the sensor with the specified ID.
# Example configuration entry prometheus: relabel: my_voltage_sensor: id: angry_pixies name: "Angry Pixies"