Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support global_prefix on Grafana import #87

Closed
Matthias-Beck opened this issue May 31, 2021 · 2 comments
Closed

Support global_prefix on Grafana import #87

Matthias-Beck opened this issue May 31, 2021 · 2 comments
Labels

Comments

@Matthias-Beck
Copy link

Is your feature request related to a problem? Please describe.
Support exporter global_prefix for Grafana dashboard import. If a prefix is defined today, all queries on the dashboards have to be updated manually

Describe the solution you'd like
While importing the dashboards via the Grafana tool, the exporter section should be checked for global_prefix entries.

Describe alternatives you've considered
Add a command parameter (e.g. --db-prefix) to the Grafana tool like the --datasource parameter for naming the prefix and updating the queries in the dashboards.

@Matthias-Beck Matthias-Beck added the feature New feature or request label May 31, 2021
@vgratian
Copy link
Contributor

vgratian commented Jun 2, 2021

Hi Matthias, good point.

This issue is loosely related to #22

@cgrinds
Copy link
Collaborator

cgrinds commented Aug 25, 2021

Verified dashboard queries are rewritten on import

bin/harvest --version
harvest version 21.08.0-1 (commit 956ebfa) (build date 2021-08-25T11:36:10-0400) linux/amd64

bin/grafana import --directory grafana/dashboards/ --folder h2 --prefix foople

using API token from config
connected to Grafana server (version: 8.1.2)
created Grafana folder [h2] - OK
preparing to import 12 dashboards...
OK - imported [harvest_dashboard_aggregate.json]
OK - imported [harvest_dashboard_cluster.json]
OK - imported [harvest_dashboard_disk.json]
OK - imported [harvest_dashboard_metadata.json]
OK - imported [harvest_dashboard_network.json]
OK - imported [harvest_dashboard_node.json]
OK - imported [harvest_dashboard_nvme_fc.json]
OK - imported [harvest_dashboard_shelf.json]
OK - imported [harvest_dashboard_snapmirror.json]
OK - imported [harvest_dashboard_svm.json]
OK - imported [harvest_dashboard_volume.json]

Then went to dashboards and confirmed queries are prefixed with foople

image

@cgrinds cgrinds removed their assignment May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants