oijkn / Docker-Raspberry-PI-Monitoring

A docker-compose stack solution for monitoring host and containers with Prometheus, Grafana, cAdvisor and NodeExporter.
MIT License
410 stars 61 forks source link

Metrics Tweak so it works on DietPi 64 and Pi OS bullseye #6

Closed rmiddle closed 2 years ago

rmiddle commented 2 years ago

I was getting N/A for the Containers count. I tweaking the metrics until it starting work. I found I needed the same tweak on the new PI OS that is running Bullseye. So I am submitting the tweak for your review.

oijkn commented 2 years ago

Hi @rmiddle, I think this query is better and shorter : count(rate(container_tasks_state{image!="", state=~"running"}[$__range]))

rmiddle commented 2 years ago

Confirmed the query you posted also works. Updated the PR to use it.

oijkn commented 2 years ago

@hugo-leij sorry but this query doesn't work for me. Did you try putting single quotes instead of double quotes?