Devenv: Add gdev-influxdb2 data source (#31250)

* Add gdev-influxdb2 data source

* Change influxdb2 docker block to use 8087 port

* Update telegraf url
This commit is contained in:
Ivana Huckova 2021-02-23 16:30:35 +01:00 committed by GitHub
parent 19ab83d6ed
commit 6d1076fca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 13 deletions

View File

@ -32,6 +32,19 @@ datasources:
timeInterval: "15s"
secureJsonData:
password: grafana
- name: gdev-influxdb2
type: influxdb
access: proxy
url: http://localhost:8087
user: grafana
secureJsonData:
token: mytoken
password: grafana12345
jsonData:
version: Flux
organization: myorg
defaultBucket: mybucket
- name: gdev-influxdb-telegraf
type: influxdb
@ -43,7 +56,7 @@ datasources:
timeInterval: "10s"
secureJsonData:
password: grafana
- name: gdev-opentsdb
type: opentsdb
access: proxy

View File

@ -34,6 +34,17 @@ datasources:
secureJsonData:
password: grafana
- name: gdev-influxdb2
type: influxdb
access: proxy
url: http://influxdb2:8086
secureJsonData:
token: mytoken
jsonData:
version: Flux
organization: myorg
defaultBucket: mybucket
- name: gdev-influxdb-telegraf
type: influxdb
access: proxy

View File

@ -1,39 +1,40 @@
influxdb:
influxdb2:
image: quay.io/influxdb/influxdb:v2.0.3
container_name: influxdb2
ports:
- '8086:8086'
- '8087:8086'
environment:
INFLUXDB_REPORTING_DISABLED: 'true'
volumes:
- ./docker/blocks/influxdb2/influxdb.conf:/etc/influxdb/influxdb.conf
# Use the influx cli to set up an influxdb instance.
influxdb_cli:
influxdb2_cli:
links:
- influxdb
- influxdb2
image: quay.io/influxdb/influxdb:v2.0.3
# 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://influxdb:8086 -f
entrypoint: influx setup --bucket mybucket -t mytoken -o myorg --username=grafana --password=grafana12345 --host=http://influxdb2:8086 -f
# 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:
- influxdb
- influxdb2
fake-influxdb-data:
fake-influxdb2-data:
image: grafana/fake-data-gen
links:
- influxdb
- influxdb2
environment:
FD_SERVER: influxdb2
FD_DATASOURCE: influxdb
FD_PORT: 8086
telegraf:
telegraf2:
image: telegraf
links:
- influxdb
- influxdb2
depends_on:
- influxdb_cli
- influxdb2_cli
volumes:
- ./docker/blocks/influxdb2/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/log:/var/log

View File

@ -90,7 +90,7 @@
## urls will be written to each interval.
# urls = ["unix:///var/run/influxdb.sock"]
# urls = ["udp://127.0.0.1:8089"]
urls = ["http://influxdb:8086"]
urls = ["http://influxdb2:8086"]
token = "mytoken"
organization = "myorg"
bucket = "mybucket"