salt.states.grafana_datasource module

Manage Grafana v2.0 data sources

New 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
salt.states.grafana_datasource.absent(name, profile=u'grafana')

Ensure that a data source is present.

name
Name of the data source to remove.
salt.states.grafana_datasource.present(name, type, url, access=u'proxy', user=u'', password=u'', database=u'', basic_auth=False, basic_auth_user=u'', basic_auth_password=u'', is_default=False, json_data=None, profile=u'grafana')

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