Git Product home page Git Product logo

grafana-wtf's Introduction


grafana-wtf

About

grafana-wtf - grep through all Grafana entities in the spirit of git-wtf.

Attention!

This program can put significant load on your Grafana instance and the underlying database machinery. Handle with care!

Synopsis

Search Grafana API for string "weatherbase".

grafana-wtf find weatherbase

Display 50 most recent changes across all dashboards.

grafana-wtf log --number=50

Screenshots

grafana-wtf find

https://user-images.githubusercontent.com/453543/51694547-5c78fd80-2001-11e9-96ea-3fcc2e0fb016.png

grafana-wtf log

https://user-images.githubusercontent.com/453543/56455736-87ee5880-6362-11e9-8cd2-c356393d09c4.png

Setup

Install grafana-wtf

pip install grafana-wtf

Configure Grafana

Please take these steps to create an API key with your Grafana instance:

  • Go to https://daq.example.org/grafana/org/apikeys.
  • Choose "New API Key".
    • Key name: grafana-wtf
    • Role: Admin
  • From the output curl -H "Authorization: Bearer eyJrIjoiWHg...dGJpZCI6MX0=" ..., please take note of the Bearer token. This is your Grafana API key.

Running

Before running grafana-wtf, define URL and access token of your Grafana instance:

export GRAFANA_URL=https://daq.example.org/grafana/
export GRAFANA_TOKEN=eyJrIjoiWHg...dGJpZCI6MX0=

Then:

grafana-wtf find weatherbase

Note

grafana-wtf will cache HTTP responses for 300 seconds by default. When running it with the --drop-cache option, it will drop its cache upfront.

Examples

See grafana-wtf examples.

grafana-wtf's People

Contributors

amotl avatar

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.