I would like to download all of the desired data from a controller for a specific time period in one go, rather than entering every single card and graph and downloading them all individually. The problem with the individual method (besides time) is that for example all PAR sensors download with the title “PAR Sensor” and I have to individually label them after downloading to ensure they do not get mixed up.
I understand there is a method available to use the API and Prometheus to query the specific desired data, which will allow downloading of all desired information. Would you be able to walk me through how to set up such a query?
Thank you in advance!
Hi Gregory, welcome to the forum and thank you for your question.
Downloading desired data for a desired time is done in the following steps
- Build a custom dashboard for visualizing and saving your work.
- Gather queries for all desired data
- Paste those queries into a single dashboard panel
- Export that panel to a CSV file for viewing in Excel or other spreadsheet
Instructions for building a custom dashboard are at this link: Writing Custom Dashboards
Each card has a dashboard containing a graph for every element kept in the time series database.
To identify the prometheus query for any panel, right-click on the panel heading and select Explore
The prometheus query can be found under Metrics. You will be pasting these later on, so gather these queries for each panel you wish to export.
Go to the following screen as outlined in the Custom Dashboards article.
Paste your first query in 1, then select 2 to add each additional query.
Save your changes and return to the dashboard. Your graph should show a line for each of your queries.
Once you’re happy with the queries shown in the graph, export that data by right-clicking on the panel heading and selecting Inspect / Data.
Be sure to select Series joined by time in the Show data frame section, then select Download CSV to export your data.