Manage Grafana v2.0 Dashboards
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.
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.