grafana_datasource

Manage Grafana v2.0 data sources

Added in version 2016.3.0.

grafana:
  grafana_timeout: 3
  grafana_token: qwertyuiop
  grafana_url: 'https://url.com'
Ensure influxdb data source is present:
  grafana_datasource.present:
    - name: influxdb
    - type: influxdb
    - url: http://localhost:8086
    - access: proxy
    - basic_auth: true
    - basic_auth_user: myuser
    - basic_auth_password: mypass
    - is_default: true
saltext.grafana.states.grafana_datasource.__virtual__()[source]

Only load if grafana v2.0 is configured.

saltext.grafana.states.grafana_datasource.present(name, type, url, access='proxy', user='', password='', database='', basic_auth=False, basic_auth_user='', basic_auth_password='', is_default=False, json_data=None, profile='grafana')[source]

Ensure that a data source is present.

name

Name of the data source.

type

Which type of data source it is (‘graphite’, ‘influxdb’ etc.).

url

The URL to the data source API.

user

Optional - user to authenticate with the data source

password

Optional - password to authenticate with the data source

basic_auth

Optional - set to True to use HTTP basic auth to authenticate with the data source.

basic_auth_user

Optional - HTTP basic auth username.

basic_auth_password

Optional - HTTP basic auth password.

is_default

Default: False

saltext.grafana.states.grafana_datasource.absent(name, profile='grafana')[source]

Ensure that a data source is present.

name

Name of the data source to remove.