salt.states.grafana_dashboard module

Manage Grafana v2.0 Dashboards

New in version 2016.3.0.

grafana:
  grafana_timeout: 3
  grafana_token: qwertyuiop
  grafana_url: 'https://url.com'
Ensure minimum dashboard is managed:
  grafana_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

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.

salt.states.grafana_dashboard.absent(name, profile='grafana')

Ensure the named grafana dashboard is absent.

name

Name of the grafana dashboard.

profile

A pillar key or dict that contains grafana information

salt.states.grafana_dashboard.present(name, base_dashboards_from_pillar=None, base_panels_from_pillar=None, base_rows_from_pillar=None, dashboard=None, profile='grafana')

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.

profile

A pillar key or dict that contains grafana information