You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
version: '3'
services:
influxdb:
image: influxdb:2.0.6
volumes:
# Mount for influxdb data directory and configuration
- influxdbv2:/.influxdbv2
ports:
- "8086:8086"
# Use the influx cli to set up an influxdb instance.
influxdb_cli:
links:
- influxdb
image: influxdb:2.0.6
# Use these same configurations parameters in your telegraf configuration, mytelegraf.conf.
entrypoint: influx setup --bucket telegraf -t mytoken -o InfluxData --username=russ --password=something --host=http://influxdb: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
telegraf:
image: telegraf:latest
links:
- influxdb
volumes:
# Mount for telegraf config
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
depends_on:
- influxdb_cli
volumes:
influxdbv2:
and here is my telegraf config:
[[inputs.internal]]
# Read metrics from one or many prometheus clients
[[inputs.prometheus]]
name_override = "influxdb_oss"
## An array of urls to scrape metrics from.
urls = ["http://influxdb:8086/metrics"]
## Metric version controls the mapping from Prometheus metrics into
## Telegraf metrics. When using the prometheus_client output, use the same
## value in both plugins to ensure metrics are round-tripped without
## modification.
##
## example: metric_version = 1;
## metric_version = 2; recommended version
metric_version = 2
## HTTP Basic Authentication username and password. ('bearer_token' and
## 'bearer_token_string' take priority)
# username = ""
# password = ""
## Specify timeout duration for slower prometheus clients (default is 3s)
# response_timeout = "3s"
## Optional TLS Config
# tls_ca = /path/to/cafile
# tls_cert = /path/to/certfile
# tls_key = /path/to/keyfile
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
# Output Configuration for telegraf agent
[[outputs.influxdb_v2]]
## Point to your influxdb container
urls = ["http://influxdb:8086"]
## Token for authentication; created with the influxdb_cli service.
token = "mytoken"
## Organization is the name of the organization you wish to write to; created with the influxdb_cli service.
organization = "InfluxData"
## Destination bucket to write into; created with the influxdb_cli service.
bucket = "telegraf"
The text was updated successfully, but these errors were encountered:
The following query works just fine in cloud, but when trying this in a 2.0.6 instance running in docker, i get the following error:
failed to initialize execute state: influxdb provider requires a host to be specified
When i try to add the host information, it fails with the same error:
here is my docker compose file:
and here is my telegraf config:
The text was updated successfully, but these errors were encountered: