grafana4_dashboard
¶
Manage Grafana v4.0 Dashboards
Added in version 2017.7.0.
- configuration:
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
- saltext.grafana.states.grafana4_dashboard.__virtual__()[source]¶
Only load if grafana4 module is available
- saltext.grafana.states.grafana4_dashboard.present(name, base_dashboards_from_pillar=None, base_panels_from_pillar=None, base_rows_from_pillar=None, dashboard=None, orgname=None, profile='grafana')[source]¶
Ensure the grafana dashboard exists and is managed.
- name
Name of the grafana dashboard.
- base_dashboards_from_pillar
A pillar key that contains a list of dashboards to inherit from
- base_panels_from_pillar
A pillar key that contains a list of panels to inherit from
- base_rows_from_pillar
A pillar key that contains a list of rows to inherit from
- dashboard
A dict that defines a dashboard that should be managed.
- orgname
Name of the organization in which the dashboard should be present.
- profile
Configuration profile used to connect to the Grafana instance. Default is ‘grafana’.
- saltext.grafana.states.grafana4_dashboard.absent(name, orgname=None, profile='grafana')[source]¶
Ensure the named grafana dashboard is absent.
- name
Name of the grafana dashboard.
- orgname
Name of the organization in which the dashboard should be present.
- profile
Configuration profile used to connect to the Grafana instance. Default is ‘grafana’.