# salt.states.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

salt.states.grafana_datasource.absent(name, profile='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='proxy', user='', password='', database='', basic_auth=False, basic_auth_user='', basic_auth_password='', is_default=False, json_data=None, profile='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