Tools to make Grafana dashboards from templates
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Go to file
Clark Boylan ddd1845d00
Update Docker images to python 3.10
5 months ago
doc/source Add import of json files 3 years ago
etc Replace oslo_config dependency with argparse 8 years ago
grafana_dashboards Fix default handling with newer voluptious 5 months ago
tests Strip id/uid from .json input 1 year ago
.coveragerc Change ignore-errors to ignore_errors 8 years ago
.gitignore Update .gitignore to vim temporary files 8 years ago
.gitreview OpenDev Migration Patch 4 years ago
.mailmap Initial Cookiecutter Commit. 8 years ago
.testr.conf Initial Cookiecutter Commit. 8 years ago
.zuul.yaml Update Docker images to python 3.10 5 months ago
CONTRIBUTING.rst Initial Cookiecutter Commit. 8 years ago
Dockerfile Update Docker images to python 3.10 5 months ago
HACKING.rst Initial Cookiecutter Commit. 8 years ago
LICENSE Initial Cookiecutter Commit. 8 years ago
MANIFEST.in Initial Cookiecutter Commit. 8 years ago
README.rst Add import of json files 3 years ago
openstack-common.conf Initial Cookiecutter Commit. 8 years ago
requirements.txt Update Docker images to python 3.10 5 months ago
setup.cfg Update Docker images to python 3.10 5 months ago
setup.py Drop Python 2 support 3 years ago
test-requirements.txt Drop Python 2 support 3 years ago
tox.ini Drop Python 2 support 3 years ago

README.rst

grafyaml

At a glance

Overview

grafyaml takes descriptions of Grafana dashboards in YAML format, and uses them to produce JSON formatted output suitable for direct import into Grafana.

The tool uses the Voluptuous data validation library to ensure the input produces a valid dashboard. Along with validation, users receive the benefits of YAML markup such as comments and clearer type support.

For example, here is a minimal dashboard specification

dashboard:
  time:
    from: "2018-02-07T08:42:27.000Z"
    to: "2018-02-07T13:48:32.000Z"
  templating:
    - name: hostname
      type: query
      datasource: graphite
      query: node*
      refresh: true
  title: My great dashboard
  rows:
    - title: CPU Usage
      height: 250px
      panels:
          - title: CPU Usage for $hostname
            type: graph
            datasource: graphite
            targets:
              - target: $hostname.Cpu.cpu_prct_used

grafyaml can be very useful in continuous-integration environments. Users can specify their dashboards via a normal review process and tests can validate their correctness.

The tool can also take JSON manually exported from the Grafana interface and load it as a dashboard. This allows keeping dashboards that have been edited with the inbuilt editor externally version controlled.

A large number of examples are available in the OpenStack project-config repository, which are used to create dashboards on http://grafana.openstack.org.