Simplescriptsforimport/exportdashboards,datasourcesandalertstoGrafana
Supportorganizations.
Examplewastakenfromhttps://gist.github.com/crisidev/bd52bdcc7f029be2f295
DependenciesJQ-toprocess.json
ConfigurationReplaceHOSTandFILE_DIRvariablesatconfig.shwithyourown.AlsofillORGSarraywithpairsORGANIZATION:API_KEY.
exporterRun:
./exporter.shExpectedoutput:
./exporter.sh%Total%Received%XferdAverageSpeedTimeTimeTimeCurrentDloadUploadTotalSpentLeftSpeed1002110202110200530000--:--:----:--:----:--:--53020Lookforexported.jsondashboardsanddatasourcesatFILE_DIRpath
importerToimportall.jsonfilesfromFILE_DIRtoyourGrafana:
./importer.shToimportonlysomeofthem:
./importer.shorganization/dashboards/dashboard.jsonorganization/datasources/datasource.jsonToimportallfororganization:
./importer.shorganization/dashboards/*.jsonorganization/datasources/*.json
评论