/home-assistant-promql

Home Assistant Custom Component for quering Prometheus values

Primary LanguagePythonMIT LicenseMIT

hacs_badge

Home Assistant PromQL

This is a custom component for quering Prometheus values with Home Assistant.

Installation

  1. Install this Integration as a HACS custom repository or just copy the content of the custom_components folder.
  2. Add a query by navigating to Configuration -> Integrations -> Add Integration and search for PromQL

Sensors

The integration will create a seperate sensor for each combination of labels.

You can also use complex PromQL queries like e.g.

100 - (avg by (instance) (irate(node_cpu_seconds_total{job="node",mode="idle"}[5m])) * 100)