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

Ability to batch-import an exported file #4

Open
ankon opened this issue Feb 8, 2019 · 2 comments
Open

Ability to batch-import an exported file #4

ankon opened this issue Feb 8, 2019 · 2 comments

Comments

@ankon
Copy link
Contributor

ankon commented Feb 8, 2019

It would be awesome if one could use this also to batch-import all dashboards.

For anyone looking for that, I now used this script:

#!/bin/sh

GRAFANA= # Set to URL of grafana
APIKEY= # Set to key created in settings

find /path/to/extracted/zip-file -name '*.json' | while read fullname; do
    jq -rc '. * {overwrite:true,dashboard:{id:null}}' < "${fullname}" | \
    curl -k -f -v -X POST -H "Content-Type: application/json" -H "Authorization: Bearer ${APIKEY}" ${GRAFANA}/api/dashboards/db?orgId=1 -d @- || break
done
@jangaraj
Copy link
Member

jangaraj commented Feb 8, 2019

Could you add it as an example script to the README, please? Thank you.

@zsq1314
Copy link

zsq1314 commented Aug 6, 2019

@jangaraj Can batch import capability be implemented in the dashboard? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants