Skip to main content

How to integrate Verdigris with Prometheus

Stream real-time energy telemetry to your observability stack

Updated today

The Verdigris Prometheus Pusher is a lightweight Python script that polls the Verdigris energy monitoring API and pushes metrics to any Prometheus-compatible remote_write endpoint — including Prometheus, Grafana Cloud, Mimir, and Thanos. No Docker or web server required.

Available metrics

Metric

Labels

Description

verdigris_building_energy_wh

building_id, type

Energy consumption at the building level

verdigris_breaker_energy_wh

breaker_id, type

Energy consumption at the breaker level

verdigris_circuit_energy_wh

circuit_id, type

Energy consumption at the circuit level

Data intervals are configurable: 1m, 15m (default), 1h, or 1d.

How it works

  1. The Pusher runs on your infrastructure as a Python script (Python 3.10+)

  2. It authenticates with the Verdigris API using OAuth 2.0 (client ID + secret)

  3. It polls energy data for your configured buildings, breakers, and/or circuits at a configurable interval (default: every 15 minutes)

  4. It writes metrics directly to your remote_write endpoint using the Prometheus remote write protocol

Requirements

  • Python 3.10+ and pip

  • Verdigris OAuth 2.0 credentials (client ID and secret)

  • A Prometheus-compatible remote_write endpoint

  • Building IDs for the sites you want to monitor (breaker and circuit IDs are optional for more granular data)

Configuration

All configuration is via environment variables:

Variable

Required

Default

Description

VERDIGRIS_CLIENT_ID

Yes

OAuth 2.0 client ID

VERDIGRIS_CLIENT_SECRET

Yes

OAuth 2.0 client secret

VERDIGRIS_BUILDING_IDS

Yes

Comma-separated building IDs

VERDIGRIS_BREAKER_IDS

No

Comma-separated breaker IDs

VERDIGRIS_CIRCUIT_IDS

No

Comma-separated circuit IDs

REMOTE_WRITE_URL

Yes

Prometheus remote_write endpoint URL

REMOTE_WRITE_USERNAME

No

Basic auth username (e.g. Grafana Cloud)

REMOTE_WRITE_PASSWORD

No

Basic auth password / API key

POLL_INTERVAL_SECONDS

No

900

Seconds between collection cycles

DATA_INTERVAL

No

15m

Verdigris API interval (1m, 15m, 1h, 1d)

Deployment options

  • Long-running process: Run python main.py — it polls continuously at the configured interval

  • systemd service: Install as a systemd unit for automatic startup and restart on failure

  • Cron job: Set POLL_INTERVAL_SECONDS=0 for one-shot mode and schedule via cron

Grafana Cloud example

Set your remote write URL and credentials:

REMOTE_WRITE_URL=https://influx-prod-us-central1.grafana.net/api/prom/push REMOTE_WRITE_USERNAME=123456 REMOTE_WRITE_PASSWORD=glc_abc123...

Get started

The source code and full setup instructions are available. Contact your Verdigris solutions engineer for OAuth credentials and building IDs, or reach out at solutions@verdigris.co.

Did this answer your question?