grafana/docs/sources/datasources/influxdb/provision-influxdb.md
Diana Payton c986aaa0a8
Docs: InfluxDB doc improvements (#32815)
* Create getting-started-influxdb.md

* Update getting-started-prometheus.md

* Update getting-started-sql.md

* data source edits

* single source intro

* Create first-step.md

* Update influxdb.md

* Update getting-started-influxdb.md

* Update influxdb.md

* break up long file

* Update influxdb-templates.md

* more updates

* Update _index.md

* Update _index.md

* Update getting-started-sql.md

* Update _index.md

* edits

* Update docs/sources/datasources/influxdb/_index.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Delete influxdb.md

* Update getting-started-influxdb.md

* Update influx-flux.md

* Update _index.md

* Update getting-started-influxdb.md

* Update getting-started-influxdb.md

* content

* content changes

* Update _index.md

* link fixes

* Update getting-started-influxdb.md

* Update getting-started-influxdb.md

* Merge branch 'master' into docs-influxdb

* updated port

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-04-20 09:33:44 -07:00

1.4 KiB

+++ title = "Provision InfluxDB" description = "Guide for provisioning InfluxDB" weight = 400 +++

Provision InfluxDB

You can configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}}).

Here are some provisioning examples for this data source.

InfluxDB 1.x example

apiVersion: 1

datasources:
  - name: InfluxDB_v1
    type: influxdb
    access: proxy
    database: site
    user: grafana
    password: grafana
    url: http://localhost:8086
    jsonData:
      httpMode: GET

InfluxDB 2.x for Flux example

apiVersion: 1

datasources:
  - name: InfluxDB_v2_Flux
    type: influxdb
    access: proxy
    url: http://localhost:8086
    secureJsonData:
      token: token
    jsonData:
      version: Flux
      organization: organization
      defaultBucket: bucket
      tlsSkipVerify: true

InfluxDB 2.x for InfluxQl example

apiVersion: 1

datasources:
  - name: InfluxDB_v2_InfluxQL
    type: influxdb
    access: proxy
    url: http://localhost:8086
    # This database should be mapped to a bucket
    database: site
    jsonData:
      httpMode: GET
      httpHeaderName1: 'Authorization'
    secureJsonData:
      httpHeaderValue1: 'Token <token>'