macropower-analytics-panel icon indicating copy to clipboard operation
macropower-analytics-panel copied to clipboard

How to install the panel on all dashboards

Open MMihaiMarian opened this issue 4 years ago • 1 comments

It is possible to install the panel on all dashboards automatically? I have one 3K dashboards on my grafana instance.

MMihaiMarian avatar Sep 03 '21 14:09 MMihaiMarian

@MMihaiMarian Nothing pre-built that I'm aware of. But I think you could do this by adding the plugin to the underlying JSON of each dashboard. If you would like to know what needs to be added, you can export a dashboard, add the panel, re-export it, and then diff the two versions.

For actually modifying existing dashboards, there's a few ways you could potentially go about this:

  1. If you're defining your dashboards as code (Jsonnet/Grafonnet), you can merge in the plugin somewhere there.
  2. If you're storing dashboards as JSON in GitHub / some other VCS and deploying them, you could probably add it there.
  3. You could write a shell script to download all your dashboards, inject the plugin JSON, and upload the modified version.

If you find a good & standard way of doing this, please let me know or send a PR as I would love to add that to the docs.

MacroPower avatar Sep 03 '21 21:09 MacroPower