avojak / pihole-influxdb-monitor

Export Pi-hole statistics to InfluxDB 2.x
MIT License
23 stars 6 forks source link

Grafana pi-hole query data = null #9

Open golvellius opened 8 months ago

golvellius commented 8 months ago

Hi .. I would like to thanks you about this great pihole monitor docker. I have been using for 1 week and all is working, but i have a small problem, on query data i have always null value .. image

This is my pihole versions: Docker:2024.01.0 Pi-Hole:5.17.3 FTL:5.24 WebInter:5.21.

Thanks.

avojak commented 7 months ago

Are there any errors in the logs? And could you try running with the environment variable DEBUG=true and providing a small sample of the log output? It should log out the data retrieved from the Pi-hole before sending to InfluxDB - that'll help me narrow things down a bit. I'm not currently able to reproduce the issue with my setup.

Jh123x commented 6 months ago

image Not sure if this helps, but this is the data shape

Jh123x commented 6 months ago

image

Seems like changing the transform for the dashboard to this solves the issue

Previously it was max. The data is of type string which seemed to resolve to null when transforming using max

avojak commented 6 months ago

@Jh123x Thanks for the data! I'll need to check out the code more closely, but I wonder if I'm not properly ensuring that the data is sent as the right type...