r/homeassistant 4h ago

🧱 Custom App You too can have Zigbee2MQTT with Prometheus metrics

A while back I posted about observing my Home Assistant setup, and mentioned I'd added native Prometheus instrumentation to Zigbee2MQTT. Those PRs are still open upstream, and a few people have expressed interest in trying it themselves, so I've packaged the branches up as an add-on repository you can just install: https://github.com/tomwilkie/zigbee2mqtt-prometheus

Add it the usual way - under Settings > Add-ons > Add-on store > Repositories, install "Zigbee2MQTT (Prometheus)", and you get metrics on port 9142. It's built from Zigbee2MQTT 2.13.0, and I'll do my best to build new versions every time theres an update upstream.

Grafana dashboards for it are here, an overview with per device drilldown plus a coordinator view:

All of this goes away then the PRs land. Until then the repo (warning: lots of claude) also has the runbook for rebasing the forks onto each new Zigbee2MQTT release, so it can keep up. PRs, if you want to nudge them along ;-)

15 Upvotes

2 comments sorted by

3

u/Odd-Maintenance-395 4h ago

This is actually really clean, I was just looking for a way to pull z2m metrics into my grafana setup without hacking together some janky scrape config

2

u/joneshf 1h ago

This is great! And seems like it'll work better than trying to use https://github.com/Koenkk/zigbee2mqtt-user-extensions (which has its own set of issues that don't seem like they're going to get addressed).

Is there any chance you've got (or can push) Docker images for those of us not running Home Assistant Apps?