Manage Grafana v4.0 Dashboards
New in version 2017.7.0.
This state requires a configuration profile to be configured in the minion config, minion pillar, or master config. The module will use the 'grafana' key by default, if defined.
Example configuration using basic authentication:
grafana:
grafana_url: http://grafana.localhost
grafana_user: admin
grafana_password: admin
grafana_timeout: 3
Example configuration using token based authentication:
grafana:
grafana_url: http://grafana.localhost
grafana_token: token
grafana_timeout: 3
The behavior of this module is to create dashboards if they do not exist, to add rows if they do not exist in existing dashboards, and to update rows if they exist in dashboards. The module will not manage rows that are not defined, allowing users to manage their own custom rows.
Ensure minimum dashboard is managed:
grafana4_dashboard.present:
- name: insightful-dashboard
- base_dashboards_from_pillar:
- default_dashboard
- base_rows_from_pillar:
- default_row
- base_panels_from_pillar:
- default_panel
- dashboard:
rows:
- title: Usage
panels:
- targets:
- target: alias(constantLine(50), 'max')
title: Imaginary
type: graph
Ensure the named grafana dashboard is absent.
Name of the grafana dashboard.
Name of the organization in which the dashboard should be present.
Configuration profile used to connect to the Grafana instance. Default is 'grafana'.
Ensure the grafana dashboard exists and is managed.
Name of the grafana dashboard.
A pillar key that contains a list of dashboards to inherit from
A pillar key that contains a list of panels to inherit from
A pillar key that contains a list of rows to inherit from
A dict that defines a dashboard that should be managed.
Name of the organization in which the dashboard should be present.
Configuration profile used to connect to the Grafana instance. Default is 'grafana'.