Giter Club home page Giter Club logo

grafana-utils's Introduction

Managed by Monitoring Artist: DevOps / Docker / Kubernetes / AWS ECS / Zabbix / Zenoss / Terraform / Monitoring

Grafana Dashboard Exporter/Importer

Export/import Grafana dashboards (Grafana 5+).

Dashboard

Grafana Dashboard Exporter/Importer

Dashboard restore operation

Use dashboard API to restore dashboard. For example:

cat <exported-dashboard.json> | jq '. + {overwrite: true}' | curl -X POST \
-H "Content-Type: application/json" -H "Authorization: Bearer <api-key-with-write-permissions>" \
<grafana-uri>/api/dashboards/db -d @-

When importing dashboards for the first time reset the id:

cat <exported-dashboard.json> | jq '. * {overwrite: true, dashboard: {id: null}}' | curl -X POST \
-H "Content-Type: application/json" -H "Authorization: Bearer <api-key-with-write-permissions>" \
<grafana-uri>/api/dashboards/db -d @-

Grafana 6+ users

The text panel does no longer by default allow unsantizied HTML, which is required to run custom Javascript code in the dashboard. To enable unsafe Javascript execution in text panels enable the settings disable_sanitize_html under the section [panels] in your Grafana ini file, or set env variable GF_PANELS_DISABLE_SANITIZE_HTML=true.

Author

Devops Monitoring Expert, who loves monitoring systems and cutting/bleeding edge technologies: Docker, Kubernetes, ECS, AWS, Google GCP, Terraform, Lambda, Zabbix, Grafana, Elasticsearch, Kibana, Prometheus, Sysdig,...

Summary:

Professional devops / monitoring / consulting services:

Monitoring Artist

grafana-utils's People

Contributors

ankon avatar daemondude23 avatar jangaraj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

grafana-utils's Issues

Automatisierung

Wie kann ich das Json Script automatisiert ablaufen lassen auf dem Server?

Create dashboard and import datasource

Hi~I want to know how to write the command about create a new dashboard using (uid) after I have created a datasource using api/datasources.
I want to configure grafana using api because I have some spot instances on alicloud, it may be deleted for price reason, and when i created a new instance, i using ansible to deploy prometheus docker, google cadvisor, node exporter on it. In my opinion if there is some automation work, it will much better. Thanks!

Ability to batch-import an exported file

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.