Created
December 7, 2018 16:45
-
-
Save carlessanagustin/a5c3ea4ba0a35c1f57db3ec6aca4bd62 to your computer and use it in GitHub Desktop.
Chronograf dashboard import/export tool - EXPERIMENTAL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
URL=$2 # http://localhost:8888 | |
FILENAME=$3 # dashboard.json | |
if [ $1 == "export" ]; then | |
curl -i -X GET $URL/chronograf/v1/dashboards > $FILENAME | |
elif [ $1 == "import" ]; then | |
curl -i -X POST -H "Content-Type: application/json" $URL/chronograf/v1/dashboards -d @$FILENAME | |
else | |
echo "Usage: $0 export|import <URL> <FILENAME>" | |
fi | |
# from: https://www.influxdata.com/blog/chronograf-dashboard-definitions/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment