salt.states.grafana4_dashboard module

Manage Grafana v4.0 Dashboards

New in version 2017.7.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.grafana4_dashboard.absent(name, orgname=None, profile='grafana')

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'.
salt.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')

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'.