Skip to content

first path segment in URL cannot contain colon #3794

Closed
@rdxmb

Description

Bug report

Relevant telegraf.conf:

[[outputs.influxdb]]
  urls = ["$INFLUXDB_HOST_FULL_ADDRESS"] # required
  ## The target database for metrics (telegraf will create it if not exists).
  database = "$INFLUXDB_DB"
  username = "$INFLUXDB_WRITE_USER"
  password = "$INFLUXDB_WRITE_USER_PASSWORD"

System info:

telegraf 1.5.2

Steps to reproduce:

  1. define telegraf in docker with
services:
  telegraf-servicechecker:
    image: telegraf
    hostname: telegraf-servicechecker
    env_file: 
      - .monitoring-env
  1. .monitoring-env is
INFLUXDB_HOST_FULL_ADDRESS="http://yoururl.com:8086"
INFLUXDB_DB=monitoring
INFLUXDB_WRITE_USER=writetoinflux
INFLUXDB_WRITE_USER_PASSWORD=veeeeerysecret

Expected behavior:

  • works ;)

If not works, the error output should be something like:
"do not use double quotes ..."

Actual behavior:

E! Failed to connect to output influxdb, retrying in 15s, error was 'Error creating HTTP Client ["http://yoururl.com:8086"]: error parsing config.URL: parse "http://yoururl.com:8086": first path segment in URL cannot contain colon'

Aditional info

edit the line to
INFLUXDB_HOST_FULL_ADDRESS=http://yoururl.com:8086
fixes the problem

Metadata

Assignees

Labels

area/influxdbbugunexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions