I use a Docker compose file with both InfluxDB 2 and Telegraf and generated certificates as mentioned in the documentation but I do not get it to work with HTTPS.
Also pinging as stated in the documentation on https does not work. It does work on https, but I need to supply a token (which is not mentioned) in the documentation:
curl -vk http://127.0.0.1:9999/api/v2/ping -H “Authorization: Token xxxxx”
docker-compose.yaml:
version: “3.1”
services:
influxdb:
container_name: influxdb
ports:
- ‘9999:9999’
image: ‘Quay’
restart: always
environment:
- INFLUX_TOKEN=“xxxx”
volumes:
- influxdb:/var/lib/influxdb2
- /etc/ssl:/etc/ssl
command: influxd run --bolt-path /var/lib/influxdb2/influxd.bolt --engine-path /var/lib/influxdb2/engine --store bolt
–reporting-disabled influxd
–tls-cert “/etc/ssl/influxdb-selfsigned.crt”
–tls-key “/etc/ssl/influxdb-selfsigned.key”
telegraf:
container_name: telegraf
image: 'telegraf'
restart: always
environment:
- INFLUX_TOKEN="xxxxx
volumes:
- telegraf:/etc/telegraf
volumes:
influxdb:
telegraf:
Any suggestions what I am doing wrong?
Can I see if the certifcates are used or not? docker logs influxdb does not show anything.
Some log lines:
ts=2020-01-03T09:13:58.364552Z lvl=info msg=“Welcome to InfluxDB” log_id=0K6flmN0000 version=2.0.0-alpha.21 commit=8e8cfc729 build_date=2019-12-13T21:51:29Z
ts=2020-01-03T09:13:58.367569Z lvl=info msg=“Resources opened” log_id=0K6flmN0000 service=bolt path=/var/lib/influxdb2/influxd.bolt
ts=2020-01-03T09:13:58.377723Z lvl=info msg=“Opening Series File (start)” log_id=0K6flmN0000 service=storage-engine service=series-file op_name=series_file_open path=/var/lib/influxdb2/engine/_series op_event=start
ts=2020-01-03T09:13:58.384609Z lvl=info msg=“Opening Series File (end)” log_id=0K6flmN0000 service=storage-engine service=series-file op_name=series_file_open path=/var/lib/influxdb2/engine/_series op_event=end op_elapsed=6.888ms
ts=2020-01-03T09:13:58.398496Z lvl=info msg=“Index opened” log_id=0K6flmN0000 service=storage-engine index=tsi partitions=8
ts=2020-01-03T09:13:58.399538Z lvl=info msg=“Opened file” log_id=0K6flmN0000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/000000000000019-000000001.tsm id=4 duration=0.176ms
ts=2020-01-03T09:13:58.399566Z lvl=info msg=“Opened file” log_id=0K6flmN0000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/000000000000016-000000002.tsm id=1 duration=0.175ms
ts=2020-01-03T09:13:58.400087Z lvl=info msg=“Opened file” log_id=0K6flmN0000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/000000000000017-000000001.tsm id=2 duration=0.460ms
ts=2020-01-03T09:13:58.400494Z lvl=info msg=“Opened file” log_id=0K6flmN0000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/000000000000008-000000002.tsm id=0 duration=0.759ms
ts=2020-01-03T09:13:58.400509Z lvl=info msg=“Opened file” log_id=0K6flmN0000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/000000000000018-000000001.tsm id=3 duration=0.275ms
ts=2020-01-03T09:13:58.400932Z lvl=info msg=“Reading file” log_id=0K6flmN0000 service=storage-engine path=/var/lib/influxdb2/engine/wal/_00038.wal size=8818304
ts=2020-01-03T09:14:00.566844Z lvl=info msg=“Reloaded WAL” log_id=0K6flmN0000 service=storage-engine path=/var/lib/influxdb2/engine/wal duration=2166.134ms
ts=2020-01-03T09:14:00.566896Z lvl=info msg=Starting log_id=0K6flmN0000 service=storage-engine component=retention_enforcer check_interval=1h
ts=2020-01-03T09:14:00.567090Z lvl=info msg=“Starting query controller” log_id=0K6flmN0000 service=storage-reads concurrency_quota=10 initial_memory_bytes_quota_per_query=9223372036854775807 memory_bytes_quota_per_query=9223372036854775807 max_memory_bytes=0 queue_size=10
ts=2020-01-03T09:14:00.855699Z lvl=info msg=Listening log_id=0K6flmN0000 service=http transport=https addr=:9999 port=9999
ts=2020-01-03T09:14:00.855702Z lvl=info msg=Starting log_id=0K6flmN0000 service=telemetry interval=8h
ts=2020-01-03T09:14:10.014189Z lvl=info msg=Unauthorized log_id=0K6flmN0000 error=“authorization not found”
ts=2020-01-03T09:14:10.858056Z lvl=error msg=“Unable to gather” log_id=0K6flmN0000 error=“mime: no media type”
ts=2020-01-03T09:14:20.003077Z lvl=info msg=Unauthorized log_id=0K6flmN0000 error=“authorization not found”
ts=2020-01-03T09:14:20.857939Z lvl=error msg=“Unable to gather” log_id=0K6flmN0000 error=“mime: no media type”
ts=2020-01-03T09:14:30.001857Z lvl=info msg=Unauthorized log_id=0K6flmN0000 error=“authorization not found”
ts=2020-01-03T09:14:30.859690Z lvl=error msg=“Unable to gather” log_id=0K6flmN0000 error=“mime: no media type”
ts=2020-01-03T09:14:40.001616Z lvl=info msg=Unauthorized log_id=0K6flmN0000 error=“authorization not found”
ts=2020-01-03T09:14:40.858221Z lvl=error msg=“Unable to gather” log_id=0K6flmN0000 error=“mime: no media type”