I currently have a few raspberry pis with sensors set up with Prometheus as a database and grafana as an awesome visualization tool. My grafana dashboard is set to a local ip on my local network ie: ‘localip:3000’. The dashboard has 7 panels and I am wondering if there is a way to interact with the panels through a python script and retrieve csv files for specific panels/ time frames. I am able to download csv files on the grafana UI manually: panel title ==> inspect ==> data ==> Download CSV.
My main goal here is to have grafana on one computer on a specific server, eg: ‘example_server.com’ and be able to access sensor data through other devices. For example say I have sensor 3 in room 1, then I’d like to set up a python call like:
graf = Grafana.client(‘example_server.com’)
graf.get_reading(room = ‘1’, sensor = 3’)
graf.get_csv(room = ‘1’, sensor = ‘3’’, time_frame = ‘1hr’)
And be able to see the last available reading/ access data for 1hr, 6hr, 1 day… ect as a CSV file. I am hoping that this is out there and I just cannot find it. I personally don’t think I have the necessary programming background to set this up properly on my own. Any help would be great, thank you!