devenv: add influxQL-compatible influxDB2 data-source (#31818)

* datasource: add influxQL-compatible influxDB2 data-source

* improved wording

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
This commit is contained in:
Gábor Farkas 2021-03-09 16:56:42 +01:00 committed by GitHub
parent 1490cd7154
commit 5e38d4538d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 1 deletions

View File

@ -46,6 +46,16 @@ datasources:
organization: myorg
defaultBucket: mybucket
- name: gdev-influxdb2-influxql
type: influxdb
access: proxy
database: site
url: http://localhost:8087
jsonData:
httpHeaderName1: "Authorization"
secureJsonData:
httpHeaderValue1: "Token mytoken"
- name: gdev-influxdb-telegraf
type: influxdb
access: proxy

View File

@ -45,6 +45,16 @@ datasources:
organization: myorg
defaultBucket: mybucket
- name: gdev-influxdb2-influxql
type: influxdb
access: proxy
database: site
url: http://influxdb2:8086
jsonData:
httpHeaderName1: "Authorization"
secureJsonData:
httpHeaderValue1: "Token mytoken"
- name: gdev-influxdb-telegraf
type: influxdb
access: proxy

View File

@ -13,8 +13,11 @@
links:
- influxdb2
image: quay.io/influxdb/influxdb:v2.0.3
# The following long command does 2 things:
# 1. It initializes the bucket
# 2. Maps bucket to database to enable backward-compatible access (influxql queries)
# Use these same configurations parameters in your telegraf configuration, mytelegraf.conf.
entrypoint: influx setup --bucket mybucket -t mytoken -o myorg --username=grafana --password=grafana12345 --host=http://influxdb2:8086 -f
entrypoint: bash -c "influx setup --bucket mybucket -t mytoken -o myorg --username=grafana --password=grafana12345 --host=http://influxdb2:8086 -f && influx -t mytoken -o myorg --host=http://influxdb2:8086 bucket list -n mybucket --hide-headers | cut -f 1 | xargs influx -t mytoken -o myorg --host=http://influxdb2:8086 v1 dbrp create --db site --rp default --default --bucket-id"
# Wait for the influxd service in the influxdb container has fully bootstrapped before trying to setup an influxdb instance with the influxdb_cli service.
restart: on-failure:10
depends_on: