credentials between telegraf and influxdb OK

master
greglebreton 2 years ago
parent f12e071381
commit 7ec03410cd
  1. 8
      docker-compose.yml
  2. 4
      influxdb/config/influxdb.conf
  3. 3
      telegraf/telegraf.conf

@ -7,6 +7,13 @@ services:
container_name: influxdb container_name: influxdb
restart: unless-stopped restart: unless-stopped
env_file: .env env_file: .env
# environment:
# - INFLUXDB_DB=
# - INFLUXDB_USER=
# - INFLUXDB_ADMIN_ENABLED=
# - INFLUXDB_ADMIN_USER=
# - INFLUXDB_ADMIN_PASSWORD=
ports: ports:
- '8086:8086' - '8086:8086'
volumes: volumes:
@ -37,6 +44,7 @@ services:
# image: telegraf:latest #(for amd64) # image: telegraf:latest #(for amd64)
container_name: telegraf container_name: telegraf
restart: unless-stopped restart: unless-stopped
env_file: .env
# for docker # for docker
hostname: ${HOSTNAME} hostname: ${HOSTNAME}
user: "telegraf:${DOCKER_GID}" user: "telegraf:${DOCKER_GID}"

@ -11,5 +11,5 @@
bind-address = ":8086" bind-address = ":8086"
auth-enabled = true # Set to true auth-enabled = true # Set to true
log-enabled = true log-enabled = true
username = "" password = "gregandev"
password = "" username = "password"

@ -47,7 +47,7 @@
## Run telegraf in quiet mode ## Run telegraf in quiet mode
quiet = false quiet = false
## Override default hostname, if empty use os.Hostname() ## Override default hostname, if empty use os.Hostname()
hostname = "lenovo" hostname = ""
############################################################################### ###############################################################################
@ -70,6 +70,7 @@
## Write timeout (for the InfluxDB client), formatted as a string. ## Write timeout (for the InfluxDB client), formatted as a string.
## If not provided, will default to 5s. 0s means no timeout (not recommended). ## If not provided, will default to 5s. 0s means no timeout (not recommended).
timeout = "5s" timeout = "5s"
username = "" username = ""
password = "" password = ""
# Set the user agent for HTTP POSTs (can be useful for log differentiation) # Set the user agent for HTTP POSTs (can be useful for log differentiation)

Loading…
Cancel
Save