Table Query returns different number of results each run

Cloudian HyperIQ uses Grafana and Prometheus. I am writing a script that uses the Grafana API to execute one of the dashboard queries. For the most part it works and behaves just like the table in HyperIQ. What I noticed in HyperIQ is that query never pulls the total list of disks with each run display a different number of disk and associated in formation in the table.

I’d like to modify the query in my python script so that it pulls all disks each time it runs.

Here is the script from HyperIQ:


I’ve tried appending count, limit, and/or offset and use a loop until I get the total number of unique disks.

Any ideas? Pagination? If so, how can i get around this?

url: /api/datasources/proxy/1/api/v1/query"

There is different current_time when you run, when you run your script, so I would say it is normal to have different results in different time - it depends how often prometheus server/exporter updates metrics.