Skip to content

m-d-johnson/grafana-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grafanalib Examples

I'm starting to compile a collection of grafanalib examples.

Grafanalib does have some examples, they're listed in this directory

In terms of compiling: Install grafanalib using 'pip3 install --user grafanalib'

Then, in the same directory as example.py:

generate-dashboard -o dash.json example.py && cat dash.json

This compiles the dashboard to JSON that Grafana understands. You can then Add a New Dashboard and import from JSON.

Tip: I use pbcopy to put the resulting JSON straight to my Mac's clipboard, ready to paste straight into the text field.

generate-dashboard -o dash.json example.py && cat dash.json | pbcopy

I have no connection with WeaveWorks. This is not an official grafanalib/weaveworks project.