datastax / adelphi

Automation tool for testing C* OSS that assembles cassandra-diff, nosqlbench, fqltool
Apache License 2.0
10 stars 6 forks source link

Support programatic export of NoSQLBench Grafana dashboards #89

Open jdonenine opened 3 years ago

jdonenine commented 3 years ago

Feature Request

Description

As part of the recent NoSQLBench result storage work, we are now generating Grafana dashboards to display the results of the testing. Those can be accessed live through a port forward while the deployment is live, but we'd like a way to export those dashboards AND their data content to recreate/display externally after the workflow is complete and the deployment has been destroyed.

Describe the solution you'd like

Grafana supports and export/import mechanism: https://grafana.com/docs/grafana/latest/dashboards/export-import/

We'd like the content exported from Adelphi to be directly usable as an import into the Grafana mechanism.

The download of the content should be available via HTTP API from the live deployment.

┆Issue is synchronized with this Jira Task by Unito ┆Issue Number: AD-52

jdonenine commented 3 years ago

There's a good bit of info on this topic in the Grafana documentation:

https://grafana.com/docs/grafana/latest/dashboards/export-import/

That doc points to this API reference:

https://grafana.com/docs/grafana/latest/http_api/dashboard/#create-update-dashboard

absurdfarce commented 3 years ago

Re-stating from comments in Slack.

At one time Mick was exploring the idea of using Grafana's snapshots (and the sharing of those snapshots) as a means to get this info out of Adelphi. Some detail on the Grafana support can be found at https://grafana.com/docs/grafana/latest/sharing/share-dashboard/. Snapshots can be hosted locally or also at a public service; Grafana maintains http://snapshot.raintank.io/ but there may be others.

Something like this might at least accomplish the goal of getting the dashboard + data out of the k8s env into something that users could query/work with/export via standard Grafana mechanisms after the fact. That said, it's far from clear that this is a correct (or even complete) solution to export of Grafana dashboards.

One outstanding question: can we initiate the snapshot publish operation via the Grafana API? We'd want to do this export as part of the Helm workflow so we'd need some way to make it happen without a user navigating to a page and pushing a button.