Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Chronograf dashboard import/export tool - EXPERIMENTAL
#!/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
You can’t perform that action at this time.