Prometheus integration

At first I wanted to flash Jeff Geerling’s Sketch onto my AirGradient so I can integrate it into my Prometheus/Grafana.
Then I figured flashing is not THAT easy so as a workaround I wrote a python script that will receive the json data and serve it so it can directly be scraped by prometheus. Enjoy

1 Like

FYI, I have sent a pull request to get Prometheus support directly in the official firmware.

1 Like

I’ve installed firmware 3.0.7 but when I browse to /metrics it says

Not found: /metrics/

The versioning schema is a bit confusing. There are features in 3.0.5 beta that are not in 3.0.7…
It’s working with 3.0.5 beta

I will check tomorrow. If it’s accidentally gone, we will bring it back.

Please mention this in the documentation . Prometheus is something I’m interested in but I would have missed it if I wasn’t browsing the forum as it isn’t mentioned in the docs. There are probably more firmware features that aren’t documented.

1 Like

Note the correct endpoint is /metrics , not /metrics/.

Thanks again for adding the support @edechamps, it’s working really well :heart:

I’ve written up a blogpost about Prometheus support here: OpenSource Air Quality Monitoring with Prometheus and Airgradient

There are already a couple of dashboards published for this already which is great! Dashboards | Grafana Labs

@Achim_AirGradient I do agree that it’ll be great if we can document it somewhere. I only found it because I was reading the firmware 🫣 Maybe here as well: airgradient[.]com/integrations/ ?

(Can only post two links as a new user so had to get creative for the integrations URL, sorry)

1 Like