Recreate a "Download" button that permits displayed results to be downloaded as a formatted file

If the following inquiry or something similar has already been posted kindly point me to that post…

*Grafana version: 7.3.5


  • We have a simple query that returns active alarms in a table format dashboard panel from various sites we monitor; the data source is a PostgreSQL db.

  • The query has a variable that filters active alarms by site; click the drop-down, click-select a site and the table updates to display only those active alarms for the chosen site.

  • Clicking the Panel Title drop-down you can select “Inspect>Data” - a “side panel” slides in showing you the query results.
    On this slide-out panel is a horizontal row that contains a big button that says, " Download CSV " If you click it, you get a CSV formatted file of the query results that downloads to your desktop…

  • Is it possible to re-create this button that will either download the results, and have that button displayed in the main dashboard, or above the panel query results?

Providing this button would allow view-only users the ability to select a site’s active alarms then either download the CSV file.
Has anyone been able to create something like this?

I don’t think that possibility exists. But I’ve come across the idea more than once, and I think it’s a great potential feature request (to be filed agains the Github repo, in case one doesn’t already exist). I did just do a cursory search and I don’t actually see an open request for this specifically - this probably comes the closest: Feature Request: Expose API for generating CSV files from Graphs · Issue #8171 · grafana/grafana · GitHub

Thanks, svetb for the insight pertaining to the possibility that this is a feature request.

However, the button already exists: if you click on a panel, choose Inspect > Data, a slide-out panel displays the currently displayed data for that panel – at the top right of the slide-out panel is a big button that prompts you the option to “Download CSV”.

I just want to basically have an instance of that button appear with the main panel display/dashboard, without the need to click edit>inspect>data; in other words, avoid the additional steps.

That would allow any user viewing the panel to click and download that panel data.

For sure - that’s also what I meant. When I said that “I don’t think that possibility exists” my choice of language was somewhat poor. I just meant that the button itself doesn’t exist in an directly accessible place, but is hidden behind a couple of layers of menu items :slight_smile:

No, your choice of language is fine, svetb.
I will continue to research things - perhaps find a way to make a “shortcut” to that hidden button.