johntdyer / home-assistant-promql

Home Assistant Custom Component for quering Prometheus values

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)

About

Home Assistant Custom Component for quering Prometheus values

License:MIT License


Languages

Language:Python 100.0%