How to get influxdb docker image to initialize graphite and telegraf - docker

Using the official InfluxDB docker image, I am trying to have multiple databases one that uses Graphite and the other uses the normal InfluxDB.
I am using docker-compose to build and start the images. I am initializing the InfluxDB with a slightly modified version of what is in the docs because I also want Graphite enabled. This all seems to work fine but when I try and run with docker-compose up, I can see it is not opening up 2003 graphite port. My end goal is to get data from netdata and pi-hole and use grafana to graph all that data.
the script to initialize influx:
docker run --rm \
-e INFLUXDB_DB=db0 -e INFLUXDB_ADMIN_ENABLED=true \
-e INFLUXDB_ADMIN_USER=admin -e INFLUXDB_ADMIN_PASSWORD=password \
-e INFLUXDB_USER=telegraf -e INFLUXDB_USER_PASSWORD=password \
-e INFLUXDB_GRAPHITE_ENABLED=true \
-v $PWD:/var/lib/influxdb \
influxdb /init-influxdb.sh
the docker-compose yaml file:
version: "2"
services:
grafana:
image: grafana/grafana
container_name: grafana
restart: always
ports:
- 3000:3000
networks:
- monitoring
volumes:
- grafana-volume:/var/lib/grafana
influxdb:
image: influxdb
container_name: influxdb
restart: always
ports:
- 8086:8086
- 2003:2003
networks:
- monitoring
volumes:
- influxdb-volume:/var/lib/influxdb
networks:
monitoring:
volumes:
grafana-volume:
external: true
influxdb-volume:
external: true
This is the output I get when starting the image.
influxdb | ts=2019-02-04T20:50:53.957730Z lvl=info msg="InfluxDB starting" log_id=0DQ_IJXG000 version=1.7.3 branch=1.7 commit=698dbc789aff13c2678357a6b93ff73dd7136571
influxdb | ts=2019-02-04T20:50:53.957829Z lvl=info msg="Go runtime" log_id=0DQ_IJXG000 version=go1.11 maxprocs=4
influxdb | ts=2019-02-04T20:50:54.059549Z lvl=info msg="Using data dir" log_id=0DQ_IJXG000 service=store path=/var/lib/influxdb/data
influxdb | ts=2019-02-04T20:50:54.059704Z lvl=info msg="Compaction settings" log_id=0DQ_IJXG000 service=store max_concurrent_compactions=2 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648
influxdb | ts=2019-02-04T20:50:54.059763Z lvl=info msg="Open store (start)" log_id=0DQ_IJXG000 service=store trace_id=0DQ_IJvl000 op_name=tsdb_open op_event=start
influxdb | ts=2019-02-04T20:50:54.068293Z lvl=info msg="Reading file" log_id=0DQ_IJXG000 engine=tsm1 service=cacheloader path=/var/lib/influxdb/wal/_internal/monitor/1/_00001.wal size=10564283
influxdb | ts=2019-02-04T20:51:00.401835Z lvl=info msg="Reading file" log_id=0DQ_IJXG000 engine=tsm1 service=cacheloader path=/var/lib/influxdb/wal/_internal/monitor/1/_00002.wal size=6833556
influxdb | ts=2019-02-04T20:51:09.724641Z lvl=info msg="Opened shard" log_id=0DQ_IJXG000 service=store trace_id=0DQ_IJvl000 op_name=tsdb_open index_version=inmem path=/var/lib/influxdb/data/_internal/monitor/1 duration=15659.985ms
influxdb | ts=2019-02-04T20:51:09.725095Z lvl=info msg="Open store (end)" log_id=0DQ_IJXG000 service=store trace_id=0DQ_IJvl000 op_name=tsdb_open op_event=end op_elapsed=15665.323ms
influxdb | ts=2019-02-04T20:51:09.728132Z lvl=info msg="Opened service" log_id=0DQ_IJXG000 service=subscriber
influxdb | ts=2019-02-04T20:51:09.728283Z lvl=info msg="Starting monitor service" log_id=0DQ_IJXG000 service=monitor
influxdb | ts=2019-02-04T20:51:09.728352Z lvl=info msg="Registered diagnostics client" log_id=0DQ_IJXG000 service=monitor name=build
influxdb | ts=2019-02-04T20:51:09.728416Z lvl=info msg="Registered diagnostics client" log_id=0DQ_IJXG000 service=monitor name=runtime
influxdb | ts=2019-02-04T20:51:09.728471Z lvl=info msg="Registered diagnostics client" log_id=0DQ_IJXG000 service=monitor name=network
influxdb | ts=2019-02-04T20:51:09.728562Z lvl=info msg="Registered diagnostics client" log_id=0DQ_IJXG000 service=monitor name=system
influxdb | ts=2019-02-04T20:51:09.728787Z lvl=info msg="Starting precreation service" log_id=0DQ_IJXG000 service=shard-precreation check_interval=10m advance_period=30m
influxdb | ts=2019-02-04T20:51:09.729479Z lvl=info msg="Starting snapshot service" log_id=0DQ_IJXG000 service=snapshot
influxdb | ts=2019-02-04T20:51:09.729555Z lvl=info msg="Starting continuous query service" log_id=0DQ_IJXG000 service=continuous_querier
influxdb | ts=2019-02-04T20:51:09.729043Z lvl=info msg="Storing statistics" log_id=0DQ_IJXG000 service=monitor db_instance=_internal db_rp=monitor interval=10s
influxdb | ts=2019-02-04T20:51:09.729642Z lvl=info msg="Starting HTTP service" log_id=0DQ_IJXG000 service=httpd authentication=false
influxdb | ts=2019-02-04T20:51:09.729699Z lvl=info msg="opened HTTP access log" log_id=0DQ_IJXG000 service=httpd path=stderr
influxdb | ts=2019-02-04T20:51:09.731377Z lvl=info msg="Listening on HTTP" log_id=0DQ_IJXG000 service=httpd addr=[::]:8086 https=false
influxdb | ts=2019-02-04T20:51:09.732022Z lvl=info msg="Starting retention policy enforcement service" log_id=0DQ_IJXG000 service=retention check_interval=30m
influxdb | ts=2019-02-04T20:51:09.732881Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0DQ_IJXG000
influxdb | ts=2019-02-04T20:51:09.733412Z lvl=info msg="Listening for signals" log_id=0DQ_IJXG000

Related

Influxdb 100% CPU Load and keeps restarting

My influxdb instance causes 100% CPU Load und keeps on restarting...
InfluxDB v2.4.0 (git: de247bab08) build_date: 2022-08-18T19:41:15Z
I migrated from 1.x to 2.x before, but it was running fine for a few weeks.
I had 100% cpu load before and rebooting fixed the problem.
But now it doesn't.
This is what the Log says
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.045061Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/423/000000002-000000002.tsm id=0 duration=1.226ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.045945Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/423 duration=147.782ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: InfluxDB API at http://localhost:8086/ready unavailable after 53 attempts...
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.112610Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.157515Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3979/000000001-000000001.tsm id=0 duration=3.233ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.160292Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3979 duration=193.720ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.228938Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.238679Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.239940Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.245667Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4230/000000002-000000002.tsm id=0 duration=1.871ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.246436Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4230 duration=217.347ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.267353Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3981/000000002-000000002.tsm id=0 duration=0.406ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.268150Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3981 duration=225.899ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.276942Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4232/000000001-000000001.tsm id=0 duration=2.305ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.278232Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4232 duration=232.152ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.293604Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.300673Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3983/000000002-000000002.tsm id=0 duration=0.658ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.303627Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3983 duration=142.882ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.362917Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.380454Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4234/000000001-000000001.tsm id=0 duration=0.990ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.381306Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4234 duration=134.630ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.443019Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.461259Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3987/000000002-000000002.tsm id=0 duration=1.076ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.462142Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3987 duration=155.574ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.476794Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.481707Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.506325Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3985/000000001-000000001.tsm id=0 duration=1.228ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.507162Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3985 duration=238.842ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.518333Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4236/000000002-000000002.tsm id=0 duration=7.912ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.519170Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4236 duration=240.810ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.622377Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.636355Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.658833Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4238/000000002-000000002.tsm id=0 duration=1.797ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.661254Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4238 duration=279.787ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.670331Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3989/000000001-000000001.tsm id=0 duration=0.592ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.674528Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3989 duration=212.245ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.682649Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.727290Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4240/000000002-000000002.tsm id=0 duration=1.604ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.728159Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4240 duration=208.846ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.852231Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.885201Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/399/000000003-000000002.tsm id=0 duration=14.223ms
Aug 22 15:00:04 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:04.887978Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/399 duration=380.574ms
Aug 22 15:00:05 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:05.005108Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:05 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:05.011388Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Aug 22 15:00:05 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:05.025174Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4242/000000001-000000001.tsm id=0 duration=2.749ms
Aug 22 15:00:05 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:05.026069Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/4242 duration=349.790ms
Aug 22 15:00:05 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:05.028960Z lvl=info msg="Opened file" log_id=0cTQ00ll000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3991/000000001-000000001.tsm id=0 duration=5.543ms
Aug 22 15:00:05 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:05.044621Z lvl=info msg="Opened shard" log_id=0cTQ00ll000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb/engine/data/bdba728d0330eeac/autogen/3991 duration=381.629ms
Aug 22 15:00:05 APU influxd-systemd-start.sh[31144]: ts=2022-08-22T13:00:05.102276Z lvl=info msg="index opened with 8 partitions" log_id=0cTQ00ll000 service=storage-engine index=tsi
Found a Solution here:
Try this:
Edit the file /etc/systemd/system/influxd.service
Find the line "Type=forking" and comment it out by putting a '#" in front:
Restart=on-failure
#Type=forking
PIDFile=/var/lib/influxdb/influxd.pid
sudo systemctl daemon-reload
Now you should be able to "sudo systemctl start influxdb"

Telegraf and Inlfuxdb with docker-compose connection refused

I am trying to set up a Telegraf and Influxdb on macOS 11.3.1 using docker compose.
But unfortunately, I am getting the following error:
telegraf | 2021-07-12T19:18:14Z E! [outputs.influxdb_v2] When writing to [http://localhost:8086]: Post "http://localhost:8086/api/v2/write?bucket=telegraf&org=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
telegraf | 2021-07-12T19:18:14Z E! [agent] Error writing to outputs.influxdb_v2: Post "http://localhost:8086/api/v2/write?bucket=telegraf&org=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
Here are my config files:
docker-compose.yml
version: "3.5"
services:
influxdb2:
image: influxdb:latest
network_mode: "bridge"
container_name: influxdb2
ports:
- "8086:8086"
volumes:
- type: bind
source: /Users/endryha/Docker/influxdb2/data
target: /var/lib/influxdb2
- type: bind
source: /Users/endryha/Docker/influxdb2/config
target: /etc/influxdb2
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=telegraf
- DOCKER_INFLUXDB_INIT_PASSWORD=P#ssw0rd
- DOCKER_INFLUXDB_INIT_ORG=telegraf
- DOCKER_INFLUXDB_INIT_BUCKET=telegraf
- DOCKER_INFLUXDB_INIT_RETENTION=1w
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=9859DAA6-3B3F-48FE-A981-AE9D31FBB334
restart: always
telegraf:
image: telegraf:latest
network_mode: "bridge"
pid: "host"
container_name: telegraf
ports:
- "8092:8092"
- "8094:8094"
- "8125:8125"
volumes:
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /sys:/host/sys:ro
- /proc:/host/proc:ro
- /etc:/host/etc:ro
environment:
- HOST_PROC=/host/proc
- HOST_SYS=/host/sys
- HOST_ETC=/host/etc
restart: always
telegraf.conf
# # Configuration for sending metrics to InfluxDB
[[outputs.influxdb_v2]]
# ## The URLs of the InfluxDB cluster nodes.
# ##
# ## Multiple URLs can be specified for a single cluster, only ONE of the
# ## urls will be written to each interval.
# ## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
urls = ["http://localhost:8086"]
#
# ## Token for authentication.
token = "9859DAA6-3B3F-48FE-A981-AE9D31FBB334"
# token = "sYbrP0VZ--MgCd0EpOpz9OctJN2e4kUbsfbPPUGcY9GYW8Ts27W2cI_d7YwlSf9nvHq4l-K6mJLqJiTT0Hh7Xw=="
#
# ## Organization is the name of the organization you wish to write to; must exist.
organization = "telegraf"
#
# ## Destination bucket to write into.
bucket = "telegraf"
#
# ## The value of this tag will be used to determine the bucket. If this
# ## tag is not set the 'bucket' option is used as the default.
# # bucket_tag = ""
#
# ## If true, the bucket tag will not be added to the metric.
# # exclude_bucket_tag = false
#
# ## Timeout for HTTP messages.
# # timeout = "5s"
#
# ## Additional HTTP headers
# # http_headers = {"X-Special-Header" = "Special-Value"}
#
# ## HTTP Proxy override, if unset values the standard proxy environment
# ## variables are consulted to determine which proxy, if any, should be used.
# # http_proxy = "http://corporate.proxy:3128"
#
# ## HTTP User-Agent
user_agent = "telegraf"
#
# ## Content-Encoding for write request body, can be set to "gzip" to
# ## compress body or "identity" to apply no encoding.
# # content_encoding = "gzip"
#
# ## Enable or disable uint support for writing uints influxdb 2.0.
# # influx_uint_support = false
#
# ## Optional TLS Config for use on HTTP connections.
# # tls_ca = "/etc/telegraf/ca.pem"
# # tls_cert = "/etc/telegraf/cert.pem"
# # tls_key = "/etc/telegraf/key.pem"
# ## Use TLS but skip chain & host verification
# # insecure_skip_verify = false
Full log output
docker-compose up
Starting telegraf ... done
Starting influxdb2 ... done
Attaching to influxdb2, telegraf
telegraf | 2021-07-12T19:18:04Z I! Starting Telegraf 1.19.1
telegraf | 2021-07-12T19:18:04Z I! Using config file: /etc/telegraf/telegraf.conf
telegraf | 2021-07-12T19:18:04Z I! Loaded inputs: cpu disk diskio docker kernel mem processes swap system
telegraf | 2021-07-12T19:18:04Z I! Loaded aggregators:
telegraf | 2021-07-12T19:18:04Z I! Loaded processors:
telegraf | 2021-07-12T19:18:04Z I! Loaded outputs: influxdb_v2
telegraf | 2021-07-12T19:18:04Z I! Tags enabled: host=d52a95d7ec9d
telegraf | 2021-07-12T19:18:04Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"d52a95d7ec9d", Flush Interval:10s
telegraf | 2021-07-12T19:18:04Z W! [inputs.docker] 'perdevice' setting is set to 'true' so 'blkio' and 'network' metrics will be collected. Please set it to 'false' and use 'perdevice_include' instead to control this behaviour as 'perdevice' will be deprecated
telegraf | 2021-07-12T19:18:04Z W! [inputs.docker] 'total' setting is set to 'false' so 'blkio' and 'network' metrics will not be collected. Please set it to 'true' and use 'total_include' instead to control this behaviour as 'total' will be deprecated
influxdb2 | 2021-07-12T19:18:04.687801589Z info found existing boltdb file, skipping setup wrapper {"system": "docker", "bolt_path": "/var/lib/influxdb2/influxd.bolt"}
influxdb2 | ts=2021-07-12T19:18:11.025589Z lvl=info msg="Welcome to InfluxDB" log_id=0VJ2KiKG000 version=2.0.7 commit=2a45f0c037 build_date=2021-06-04T19:17:40Z
influxdb2 | ts=2021-07-12T19:18:11.029935Z lvl=info msg="Resources opened" log_id=0VJ2KiKG000 service=bolt path=/var/lib/influxdb2/influxd.bolt
influxdb2 | ts=2021-07-12T19:18:11.036551Z lvl=info msg="Checking InfluxDB metadata for prior version." log_id=0VJ2KiKG000 bolt_path=/var/lib/influxdb2/influxd.bolt
influxdb2 | ts=2021-07-12T19:18:11.037662Z lvl=info msg="Using data dir" log_id=0VJ2KiKG000 service=storage-engine service=store path=/var/lib/influxdb2/engine/data
influxdb2 | ts=2021-07-12T19:18:11.037699Z lvl=info msg="Compaction settings" log_id=0VJ2KiKG000 service=storage-engine service=store max_concurrent_compactions=4 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648
influxdb2 | ts=2021-07-12T19:18:11.037705Z lvl=info msg="Open store (start)" log_id=0VJ2KiKG000 service=storage-engine service=store op_name=tsdb_open op_event=start
influxdb2 | ts=2021-07-12T19:18:11.037820Z lvl=info msg="Open store (end)" log_id=0VJ2KiKG000 service=storage-engine service=store op_name=tsdb_open op_event=end op_elapsed=0.116ms
influxdb2 | ts=2021-07-12T19:18:11.037863Z lvl=info msg="Starting retention policy enforcement service" log_id=0VJ2KiKG000 service=retention check_interval=30m
influxdb2 | ts=2021-07-12T19:18:11.037873Z lvl=info msg="Starting precreation service" log_id=0VJ2KiKG000 service=shard-precreation check_interval=10m advance_period=30m
influxdb2 | ts=2021-07-12T19:18:11.037900Z lvl=info msg="Starting query controller" log_id=0VJ2KiKG000 service=storage-reads concurrency_quota=1024 initial_memory_bytes_quota_per_query=9223372036854775807 memory_bytes_quota_per_query=9223372036854775807 max_memory_bytes=0 queue_size=1024
influxdb2 | ts=2021-07-12T19:18:11.038758Z lvl=info msg="Configuring InfluxQL statement executor (zeros indicate unlimited)." log_id=0VJ2KiKG000 max_select_point=0 max_select_series=0 max_select_buckets=0
influxdb2 | ts=2021-07-12T19:18:11.331457Z lvl=info msg=Listening log_id=0VJ2KiKG000 service=tcp-listener transport=http addr=:8086 port=8086
influxdb2 | ts=2021-07-12T19:18:11.331525Z lvl=info msg=Starting log_id=0VJ2KiKG000 service=telemetry interval=8h
telegraf | 2021-07-12T19:18:14Z E! [outputs.influxdb_v2] When writing to [http://localhost:8086]: Post "http://localhost:8086/api/v2/write?bucket=telegraf&org=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
telegraf | 2021-07-12T19:18:14Z E! [agent] Error writing to outputs.influxdb_v2: Post "http://localhost:8086/api/v2/write?bucket=telegraf&org=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
telegraf | 2021-07-12T19:18:24Z E! [outputs.influxdb_v2] When writing to [http://localhost:8086]: Post "http://localhost:8086/api/v2/write?bucket=telegraf&org=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
telegraf | 2021-07-12T19:18:24Z E! [agent] Error writing to outputs.influxdb_v2: Post "http://localhost:8086/api/v2/write?bucket=telegraf&org=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
telegraf | 2021-07-12T19:18:34Z E! [outputs.influxdb_v2] When writing to [http://localhost:8086]: Post "http://localhost:8086/api/v2/write?bucket=telegraf&org=telegraf": dial tcp 127.0.0.1:8086: connect: connection refused
As I can see there is an issue with the authorization, however, I think that I correctly provided the token and it suppose to work just fine. Also, I've tried to create a token manually using InfluxDB admin UI, but, it doesn't work as well.
Please advice.

InfluxDB - ERR_EMPTY_RESPONSE - Used to come up in browser, now doesn't

Running influxdb from a Docker container.
The YML includes Telegraf and Grafana, too.
I should point out that Grafana also is not loading in my browser.
When I run netstat -n -q, and I look for "8086", I find these entries:
0.0.0.0:8086
[::]:8086
[::1]:8086
But I don't see 127.0.0.1:8086 as I would expect.
Here is the YAML.
$ cat docker-compose.yml
influxdb:
image: influxdb:latest
container_name: influxdb
ports:
- "8083:8083"
- "8086:8086"
- "8090:8090"
env_file:
- 'env.influxdb'
volumes:
# Data persistency
# sudo mkdir -p /srv/docker/influxdb/data
- /srv/docker/influxdb/data:/var/lib/influxdb2
telegraf:
image: telegraf:latest
container_name: telegraf
links:
- influxdb
volumes:
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
env_file:
- 'env.grafana'
user: "0"
links:
- influxdb
volumes:
# Data persistency
# sudo mkdir -p /srv/docker/grafana/data; chown 472:472 /srv/docker/grafana/data
# - /srv/docker/grafana/data:/var/lib/grafana
- grafana-storage:/var/lib/grafana
When I first ran this, I used:
docker-compose up -d
Until today, it was running fine on http://localhost:8086.
Today, running from Docker as last time, when I go to the above URL, I get:
Here is log output in Docker Desktop:
ts=2021-05-30T08:24:46.820359Z lvl=info msg="Terminating precreation service" log_id=0UR5So2l000 service=shard-precreation
ts=2021-05-30T08:24:46.820369Z lvl=info msg=Stopping log_id=0UR5So2l000 service=scraper
ts=2021-05-30T08:24:46.820362Z lvl=info msg=Stopping log_id=0UR5So2l000 service=telemetry interval=8h
ts=2021-05-30T08:24:46.820545Z lvl=info msg=Stopping log_id=0UR5So2l000 service=tcp-listener
ts=2021-05-30T08:24:47.320800Z lvl=info msg=Stopping log_id=0UR5So2l000 service=task
ts=2021-05-30T08:24:47.321127Z lvl=info msg=Stopping log_id=0UR5So2l000 service=nats
ts=2021-05-30T08:24:47.321618Z lvl=info msg=Stopping log_id=0UR5So2l000 service=bolt
ts=2021-05-30T08:24:47.321727Z lvl=info msg=Stopping log_id=0UR5So2l000 service=query
ts=2021-05-30T08:24:47.322865Z lvl=info msg=Stopping log_id=0UR5So2l000 service=storage-engine
ts=2021-05-30T08:24:47.322923Z lvl=info msg="Closing retention policy enforcement service" log_id=0UR5So2l000 service=retention
2021-05-30T08:24:48.156974500Z info found existing boltdb file, skipping setup wrapper {"system": "docker", "bolt_path": "/var/lib/influxdb2/influxd.bolt"}
ts=2021-05-30T08:24:55.290693Z lvl=info msg="Welcome to InfluxDB" log_id=0UR5r_zW000 version=2.0.6 commit=4db98b4c9a build_date=2021-04-29T16:48:12Z
ts=2021-05-30T08:24:55.295514Z lvl=info msg="Resources opened" log_id=0UR5r_zW000 service=bolt path=/var/lib/influxdb2/influxd.bolt
ts=2021-05-30T08:24:55.310335Z lvl=info msg="Checking InfluxDB metadata for prior version." log_id=0UR5r_zW000 bolt_path=/var/lib/influxdb2/influxd.bolt
ts=2021-05-30T08:24:55.310424Z lvl=info msg="Using data dir" log_id=0UR5r_zW000 service=storage-engine service=store path=/var/lib/influxdb2/engine/data
ts=2021-05-30T08:24:55.310463Z lvl=info msg="Compaction settings" log_id=0UR5r_zW000 service=storage-engine service=store max_concurrent_compactions=4 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648
ts=2021-05-30T08:24:55.310473Z lvl=info msg="Open store (start)" log_id=0UR5r_zW000 service=storage-engine service=store op_name=tsdb_open op_event=start
ts=2021-05-30T08:24:55.312517Z lvl=info msg="Skipping database dir" log_id=0UR5r_zW000 service=storage-engine service=store op_name=tsdb_open name=20210513T163414Z.bolt reason="not a directory"
ts=2021-05-30T08:24:55.312542Z lvl=info msg="Skipping database dir" log_id=0UR5r_zW000 service=storage-engine service=store op_name=tsdb_open name=20210513T163414Z.manifest reason="not a directory"
ts=2021-05-30T08:24:55.312547Z lvl=info msg="Skipping database dir" log_id=0UR5r_zW000 service=storage-engine service=store op_name=tsdb_open name=20210513T163414Z.s1.tar.gz reason="not a directory"
ts=2021-05-30T08:24:55.312550Z lvl=info msg="Skipping database dir" log_id=0UR5r_zW000 service=storage-engine service=store op_name=tsdb_open name=20210513T163414Z.s2.tar.gz reason="not a directory"
ts=2021-05-30T08:24:55.321805Z lvl=info msg="index opened with 8 partitions" log_id=0UR5r_zW000 service=storage-engine index=tsi
ts=2021-05-30T08:24:55.322485Z lvl=info msg="index opened with 8 partitions" log_id=0UR5r_zW000 service=storage-engine index=tsi
ts=2021-05-30T08:24:55.322798Z lvl=info msg="Opened file" log_id=0UR5r_zW000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/0955e2d35090f6ad/autogen/3/000000006-000000002.tsm id=0 duration=0.152ms
ts=2021-05-30T08:24:55.322945Z lvl=info msg="Opened shard" log_id=0UR5r_zW000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb2/engine/data/0955e2d35090f6ad/autogen/3 duration=10.298ms
ts=2021-05-30T08:24:55.323162Z lvl=info msg="Opened file" log_id=0UR5r_zW000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/0955e2d35090f6ad/autogen/2/000000011-000000002.tsm id=0 duration=0.091ms
ts=2021-05-30T08:24:55.323284Z lvl=info msg="Opened shard" log_id=0UR5r_zW000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb2/engine/data/0955e2d35090f6ad/autogen/2 duration=10.738ms
ts=2021-05-30T08:24:55.323515Z lvl=info msg="index opened with 8 partitions" log_id=0UR5r_zW000 service=storage-engine index=tsi
ts=2021-05-30T08:24:55.324371Z lvl=info msg="Opened file" log_id=0UR5r_zW000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/0955e2d35090f6ad/autogen/1/000000005-000000002.tsm id=0 duration=0.469ms
ts=2021-05-30T08:24:55.324496Z lvl=info msg="Opened shard" log_id=0UR5r_zW000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb2/engine/data/0955e2d35090f6ad/autogen/1 duration=11.925ms
ts=2021-05-30T08:24:55.325086Z lvl=info msg="index opened with 8 partitions" log_id=0UR5r_zW000 service=storage-engine index=tsi
ts=2021-05-30T08:24:55.325935Z lvl=info msg="Opened file" log_id=0UR5r_zW000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/0955e2d35090f6ad/autogen/5/000000014-000000001.tsm id=2 duration=0.081ms
ts=2021-05-30T08:24:55.326047Z lvl=info msg="Opened file" log_id=0UR5r_zW000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/0955e2d35090f6ad/autogen/5/000000012-000000001.tsm id=1 duration=0.058ms
ts=2021-05-30T08:24:55.326145Z lvl=info msg="Opened file" log_id=0UR5r_zW000 service=storage-engine engine=tsm1 service=filestore path=/var/lib/influxdb2/engine/data/0955e2d35090f6ad/autogen/5/000000011-000000002.tsm id=0 duration=0.223ms
ts=2021-05-30T08:24:55.326235Z lvl=info msg="Reading file" log_id=0UR5r_zW000 service=storage-engine engine=tsm1 service=cacheloader path=/var/lib/influxdb2/engine/wal/0955e2d35090f6ad/autogen/5/_00027.wal size=1081786
ts=2021-05-30T08:24:55.391805Z lvl=info msg="Opened shard" log_id=0UR5r_zW000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb2/engine/data/0955e2d35090f6ad/autogen/5 duration=79.067ms
ts=2021-05-30T08:24:55.392033Z lvl=info msg="Open store (end)" log_id=0UR5r_zW000 service=storage-engine service=store op_name=tsdb_open op_event=end op_elapsed=81.559ms
ts=2021-05-30T08:24:55.392062Z lvl=info msg="Starting retention policy enforcement service" log_id=0UR5r_zW000 service=retention check_interval=30m
ts=2021-05-30T08:24:55.392070Z lvl=info msg="Starting precreation service" log_id=0UR5r_zW000 service=shard-precreation check_interval=10m advance_period=30m
ts=2021-05-30T08:24:55.392109Z lvl=info msg="Starting query controller" log_id=0UR5r_zW000 service=storage-reads concurrency_quota=1024 initial_memory_bytes_quota_per_query=9223372036854775807 memory_bytes_quota_per_query=9223372036854775807 max_memory_bytes=0 queue_size=1024
ts=2021-05-30T08:24:55.393194Z lvl=info msg="Configuring InfluxQL statement executor (zeros indicate unlimited)." log_id=0UR5r_zW000 max_select_point=0 max_select_series=0 max_select_buckets=0
ts=2021-05-30T08:24:55.703897Z lvl=info msg=Listening log_id=0UR5r_zW000 service=tcp-listener transport=http addr=:8086 port=8086
ts=2021-05-30T08:24:55.704009Z lvl=info msg=Starting log_id=0UR5r_zW000 service=telemetry interval=8h
I do not see errors in this output. Is there something I am missing?
Restarting the container did not help.
Seeking trouble-shooting ideas & possible causes.
Well, this is a little embarrassing... I restarted Docker Desktop.
Successfully logged into InfluxDB. Dashboards appear.

After InfluxDB docker container restarted it's not restoring to the last point and it have mount volume as well

I have one container as Influxdb 2.0 and I have mounted the volume as well incase of when we have to bring down the container. Below I have shown you my docker-comopose.yml file. You can see there I have mounted the volume but recently I have brought down all the container and then brought up but I am not getting old data in Influxdb and I am getting data for other containers like telegraf, and grafana
version: "3"
services:
grafana:
image: grafana/grafana:7.4.0-ubuntu
container_name: grafana
restart: always
ports:
- 3000:3000
networks:
- analytics
volumes:
- grafana-storage:/var/lib/grafana
- ./usr/share/grafana/conf/defaults.ini:/usr/share/grafana/conf/defaults.ini
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
influxdb:
image: quay.io/influxdb/influxdb:2.0.0-rc
container_name: influxdb
restart: always
ports:
- 8086:8086
networks:
- analytics
volumes:
- /mnt/db/:/mnt/db/
- /mnt/influx/:/mnt/influx/
- ./etc/influxdb/:/etc/influxdb/
telegraf:
image: telegraf:1.17.2
container_name: telegraf
restart: always
depends_on:
- influxdb
networks:
- analytics
volumes:
- telegraf-storage:/var/lib/telegraf
- ./etc/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf
environment:
INFLUXDB_URL: http://influxdb:8086
# - username=admin
# - password=admin
links:
- influxdb
networks:
analytics:
volumes:
grafana-storage:
external: true
telegraf-storage:
external: true
I am getting errors when I check using docker logs influxdb
ts=2021-02-09T06:42:52.057665Z lvl=info msg="Welcome to InfluxDB" log_id=0SDOIj6G000 version=2.0.0-rc.3 commit=f46a3bd91e build_date=2020-10-29T22:17:55Z
ts=2021-02-09T06:42:52.069082Z lvl=info msg="Resources opened" log_id=0SDOIj6G000 service=bolt path=/root/.influxdbv2/influxd.bolt
ts=2021-02-09T06:42:52.070666Z lvl=info msg="Migration \"initial migration\" started (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.120805Z lvl=info msg="Migration \"initial migration\" completed (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.120898Z lvl=info msg="Migration \"add index \\\"userresourcemappingsbyuserindexv1\\\"\" started (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.124361Z lvl=info msg="Migration \"add index \\\"userresourcemappingsbyuserindexv1\\\"\" completed (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.124384Z lvl=info msg="Migration \"migrate task owner id\" started (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.126757Z lvl=info msg="Migration \"migrate task owner id\" completed (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.126781Z lvl=info msg="Migration \"create DBRP buckets\" started (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.132487Z lvl=info msg="Migration \"create DBRP buckets\" completed (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.132511Z lvl=info msg="Migration \"create pkger stacks buckets\" started (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.136981Z lvl=info msg="Migration \"create pkger stacks buckets\" completed (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.137006Z lvl=info msg="Migration \"delete sessionsv1 bucket\" started (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.144227Z lvl=info msg="Migration \"delete sessionsv1 bucket\" completed (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.144256Z lvl=info msg="Migration \"Create TSM metadata buckets\" started (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.147799Z lvl=info msg="Migration \"Create TSM metadata buckets\" completed (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.147821Z lvl=info msg="Migration \"Create Legacy authorization buckets\" started (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.152508Z lvl=info msg="Migration \"Create Legacy authorization buckets\" completed (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.152530Z lvl=info msg="Migration \"Create legacy auth password bucket\" started (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.156355Z lvl=info msg="Migration \"Create legacy auth password bucket\" completed (up)" log_id=0SDOIj6G000 service=migrations
ts=2021-02-09T06:42:52.170260Z lvl=info msg="Using data dir" log_id=0SDOIj6G000 service=storage-engine path=/root/.influxdbv2/engine/data
ts=2021-02-09T06:42:52.170414Z lvl=info msg="Compaction settings" log_id=0SDOIj6G000 service=storage-engine max_concurrent_compactions=1 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648
ts=2021-02-09T06:42:52.170438Z lvl=info msg="Open store (start)" log_id=0SDOIj6G000 service=storage-engine op_name=tsdb_open op_event=start
ts=2021-02-09T06:42:52.170516Z lvl=info msg="Open store (end)" log_id=0SDOIj6G000 service=storage-engine op_name=tsdb_open op_event=end op_elapsed=0.063ms
ts=2021-02-09T06:42:52.170576Z lvl=info msg="Starting retention policy enforcement service" log_id=0SDOIj6G000 service=retention check_interval=30m
ts=2021-02-09T06:42:52.170627Z lvl=info msg="Starting precreation service" log_id=0SDOIj6G000 service=shard-precreation check_interval=10m advance_period=30m
ts=2021-02-09T06:42:52.170674Z lvl=info msg="Starting query controller" log_id=0SDOIj6G000 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=2021-02-09T06:42:52.172525Z lvl=info msg="Configuring InfluxQL statement executor (zeros indicate unlimited)." log_id=0SDOIj6G000 max_select_point=0 max_select_series=0 max_select_buckets=0
ts=2021-02-09T06:42:52.480549Z lvl=info msg=Starting log_id=0SDOIj6G000 service=telemetry interval=8h
ts=2021-02-09T06:42:52.480732Z lvl=info msg=Listening log_id=0SDOIj6G000 transport=http addr=:8086 port=8086
ts=2021-02-09T06:42:52.508188Z lvl=info msg=Unauthorized log_id=0SDOIj6G000 error="authorization not found"
ts=2021-02-09T06:42:52.661033Z lvl=info msg=Unauthorized log_id=0SDOIj6G000 error="authorization not found"
ts=2021-02-09T06:42:52.951156Z lvl=info msg=Unauthorized log_id=0SDOIj6G000 error="authorization not found"
ts=2021-02-09T06:42:53.240232Z lvl=info msg=Unauthorized log_id=0SDOIj6G000 error="authorization not found"
Actually, Influxdbv2 has all their default configs at the location /root/.influxdbv2. So we need to mount this volume but there are two ways to achieve this.
Set the environment variables INFLUXD_BOLT_PATH and INFLUXD_ENGINE_PATH in your influxdb container to point into one of your volume-mounted directories
Change your volume mounts to mount into /root/.influxdbv2
I opted for the second option and after that my data is persisting it doesn't matter how many times I bring down and bring up Influxdb Container.
Thanks

How can I connect to a remote InfluxDB

I can't connect to my remote InfluxDB. I pushed my InfluxDB docker image (the latest one from Docker Hub) to cloud foundry and started the app. If I use the ping command
$ curl -sl -I http://address:8086/ping
*address is just a placeholder for the real IP
I get this response:
HTTP/1.1 503 Service Unavailable
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Proxy-Connection: close
Connection: close
Content-Length: 1440
Do I have to add something to the Docker Image? Does someone know how to connect to it?
Thank you for your help.
Here are the logs:
2020-02-18T13:26:26.43+0100 [API/0] OUT Updated app with guid ff79fa42-b225-4c66-aebc-cfc754c04b0e ({"state"=>"STARTED"})
2020-02-18T13:26:26.65+0100 [CELL/0] OUT Cell 8078bac2-fb7e-47f3-a85d-f79d2bd1a115 creating container for instance be12bd72-8e35-452c-49de-e1bf
2020-02-18T13:26:37.65+0100 [CELL/0] OUT Cell 8078bac2-fb7e-47f3-a85d-f79d2bd1a115 successfully created container for instance be12bd72-8e35-452c-49de-e1bf
2020-02-18T13:26:37.77+0100 [CELL/0] OUT Starting health monitoring of container
2020-02-18T13:26:38.20+0100 [APP/PROC/WEB/0] OUT INFLUXDB_ADMIN_PASSWORD:IP5p9-dfvfRJG1jZOClwZ_ry5liL1lDE
2020-02-18T13:26:42.82+0100 [APP/PROC/WEB/0] OUT influxdb init process in progress...
2020-02-18T13:26:42.93+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:42.935499Z lvl=info msg="InfluxDB starting" log_id=0L244kTl000 version=1.7.9 branch=1.7 commit=23bc63d43a8dc05f53afa46e3526ebb5578f3d88
2020-02-18T13:26:42.93+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:42.935537Z lvl=info msg="Go runtime" log_id=0L244kTl000 version=go1.12.6 maxprocs=8
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041205Z lvl=info msg="Using data dir" log_id=0L244kTl000 service=store path=/var/lib/influxdb/data
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041288Z lvl=info msg="Compaction settings" log_id=0L244kTl000 service=store max_concurrent_compactions=4 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041305Z lvl=info msg="Open store (start)" log_id=0L244kTl000 service=store trace_id=0L244ktG000 op_name=tsdb_open op_event=start
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041348Z lvl=info msg="Open store (end)" log_id=0L244kTl000 service=store trace_id=0L244ktG000 op_name=tsdb_open op_event=end op_elapsed=0.045ms
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041387Z lvl=info msg="Opened service" log_id=0L244kTl000 service=subscriber
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041400Z lvl=info msg="Starting monitor service" log_id=0L244kTl000 service=monitor
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041411Z lvl=info msg="Registered diagnostics client" log_id=0L244kTl000 service=monitor name=build
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041421Z lvl=info msg="Registered diagnostics client" log_id=0L244kTl000 service=monitor name=runtime
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041430Z lvl=info msg="Registered diagnostics client" log_id=0L244kTl000 service=monitor name=network
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041457Z lvl=info msg="Registered diagnostics client" log_id=0L244kTl000 service=monitor name=system
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041521Z lvl=info msg="Starting precreation service" log_id=0L244kTl000 service=shard-precreation check_interval=10m advance_period=30m
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041545Z lvl=info msg="Starting snapshot service" log_id=0L244kTl000 service=snapshot
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041555Z lvl=info msg="Starting continuous query service" log_id=0L244kTl000 service=continuous_querier
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041568Z lvl=info msg="Starting HTTP service" log_id=0L244kTl000 service=httpd authentication=true
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041574Z lvl=info msg="opened HTTP access log" log_id=0L244kTl000 service=httpd path=stderr
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041584Z lvl=info msg="Auth is enabled but shared-secret is blank. BearerAuthentication is disabled." log_id=0L244kTl000 service=httpd
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041578Z lvl=info msg="Storing statistics" log_id=0L244kTl000 service=monitor db_instance=_internal db_rp=monitor interval=10s
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041628Z lvl=info msg="Listening on HTTP" log_id=0L244kTl000 service=httpd addr=127.0.0.1:8086 https=false
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041648Z lvl=info msg="Starting retention policy enforcement service" log_id=0L244kTl000 service=retention check_interval=30m
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041723Z lvl=info msg="Listening for signals" log_id=0L244kTl000
2020-02-18T13:26:43.04+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:43.041789Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0L244kTl000
2020-02-18T13:26:47.87+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:47.870136Z lvl=info msg="Executing query" log_id=0L244kTl000 service=query query="CREATE USER ifadmin WITH PASSWORD [REDACTED] WITH ALL PRIVILEGES"
2020-02-18T13:26:47.95+0100 [APP/PROC/WEB/0] ERR [httpd] 127.0.0.1 - - [18/Feb/2020:12:26:47 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+USER+%22ifadmin%22+WITH+PASSWORD+%5BREDACTED%5D+WITH+ALL+PRIVILEGES HTTP/1.1" 200 57 "-" "InfluxDBShell/1.7.9" eeae1cbc-5249-11ea-8002-eeee0affece2 80271
2020-02-18T13:26:51.79+0100 [APP/PROC/WEB/0] ERR [httpd] 127.0.0.1 - ifadmin [18/Feb/2020:12:26:51 +0000] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.7.9" f1052d30-5249-11ea-8003-eeee0affece2 38
2020-02-18T13:26:51.86+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:51.869567Z lvl=info msg="Executing query" log_id=0L244kTl000 service=query query="CREATE DATABASE jmeter"
2020-02-18T13:26:51.87+0100 [APP/PROC/WEB/0] ERR [httpd] 127.0.0.1 - ifadmin [18/Feb/2020:12:26:51 +0000] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+jmeter HTTP/1.1" 200 57 "-" "InfluxDBShell/1.7.9" f10539f2-5249-11ea-8004-eeee0affece2 81291
2020-02-18T13:26:51.88+0100 [APP/PROC/WEB/0] OUT /init-influxdb.sh: ignoring /docker-entrypoint-initdb.d/*
2020-02-18T13:26:51.88+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:51.882254Z lvl=info msg="Signal received, initializing clean shutdown..." log_id=0L244kTl000
2020-02-18T13:26:51.88+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:51.882284Z lvl=info msg="Waiting for clean shutdown..." log_id=0L244kTl000
2020-02-18T13:26:51.88+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:51.882375Z lvl=info msg="Listener closed" log_id=0L244kTl000 service=snapshot
2020-02-18T13:26:51.88+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:51.882395Z lvl=info msg="Shutting down monitor service" log_id=0L244kTl000 service=monitor
2020-02-18T13:26:51.88+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:51.882417Z lvl=info msg="Terminating storage of statistics" log_id=0L244kTl000 service=monitor
2020-02-18T13:26:51.88+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:51.882444Z lvl=info msg="Terminating precreation service" log_id=0L244kTl000 service=shard-precreation
2020-02-18T13:26:51.88+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:51.882471Z lvl=info msg="Terminating continuous query service" log_id=0L244kTl000 service=continuous_querier
2020-02-18T13:26:51.88+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:51.882528Z lvl=info msg="Closing retention policy enforcement service" log_id=0L244kTl000 service=retention
2020-02-18T13:26:51.88+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:51.882580Z lvl=info msg="Closed service" log_id=0L244kTl000 service=subscriber
2020-02-18T13:26:51.88+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:51.882618Z lvl=info msg="Server shutdown completed" log_id=0L244kTl000
2020-02-18T13:26:55.54+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.545168Z lvl=info msg="InfluxDB starting" log_id=0L245WjG000 version=1.7.9 branch=1.7 commit=23bc63d43a8dc05f53afa46e3526ebb5578f3d88
2020-02-18T13:26:55.54+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.545197Z lvl=info msg="Go runtime" log_id=0L245WjG000 version=go1.12.6 maxprocs=8
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645680Z lvl=info msg="Using data dir" log_id=0L245WjG000 service=store path=/var/lib/influxdb/data
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645721Z lvl=info msg="Compaction settings" log_id=0L245WjG000 service=store max_concurrent_compactions=4 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645735Z lvl=info msg="Open store (start)" log_id=0L245WjG000 service=store trace_id=0L245X7G001 op_name=tsdb_open op_event=start
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645786Z lvl=info msg="Open store (end)" log_id=0L245WjG000 service=store trace_id=0L245X7G001 op_name=tsdb_open op_event=end op_elapsed=0.053ms
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645828Z lvl=info msg="Opened service" log_id=0L245WjG000 service=subscriber
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645838Z lvl=info msg="Starting monitor service" log_id=0L245WjG000 service=monitor
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645843Z lvl=info msg="Registered diagnostics client" log_id=0L245WjG000 service=monitor name=build
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645850Z lvl=info msg="Registered diagnostics client" log_id=0L245WjG000 service=monitor name=runtime
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645854Z lvl=info msg="Registered diagnostics client" log_id=0L245WjG000 service=monitor name=network
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645864Z lvl=info msg="Registered diagnostics client" log_id=0L245WjG000 service=monitor name=system
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645883Z lvl=info msg="Starting precreation service" log_id=0L245WjG000 service=shard-precreation check_interval=10m advance_period=30m
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645889Z lvl=info msg="Starting snapshot service" log_id=0L245WjG000 service=snapshot
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645895Z lvl=info msg="Starting continuous query service" log_id=0L245WjG000 service=continuous_querier
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645910Z lvl=info msg="Starting HTTP service" log_id=0L245WjG000 service=httpd authentication=true
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645915Z lvl=info msg="opened HTTP access log" log_id=0L245WjG000 service=httpd path=stderr
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.645919Z lvl=info msg="Auth is enabled but shared-secret is blank. BearerAuthentication is disabled." log_id=0L245WjG000 service=httpd
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.646003Z lvl=info msg="Storing statistics" log_id=0L245WjG000 service=monitor db_instance=_internal db_rp=monitor interval=10s
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.648680Z lvl=info msg="Listening on HTTP" log_id=0L245WjG000 service=httpd addr=0.0.0.0:8086 https=false
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.648714Z lvl=info msg="Starting retention policy enforcement service" log_id=0L245WjG000 service=retention check_interval=30m
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.648790Z lvl=info msg="Listening for signals" log_id=0L245WjG000
2020-02-18T13:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:26:55.648821Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0L245WjG000
2020-02-18T13:26:56.59+0100 [CELL/0] OUT Container became healthy
2020-02-18T13:28:31.54+0100 [RTR/14] OUT ccp-influxdb-ci.apps.emea.vwapps.io - [2020-02-18T12:28:31.537112792Z] "GET / HTTP/1.1" 404 0 19 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0" "10.11.8.226:39928" "10.11.34.95:61133" x_forwarded_for:"-" x_forwarded_proto:"https" vcap_request_id:"a3766d33-48e1-4e26-7f2f-f6125ce7b01f" response_time:0.007266 gorouter_time:0.000114 app_id:"ff79fa42-b225-4c66-aebc-cfc754c04b0e" app_index:"0" x_b3_traceid:"8a8c75b4bb5af422" x_b3_spanid:"8a8c75b4bb5af422" x_b3_parentspanid:"-" b3:"8a8c75b4bb5af422-8a8c75b4bb5af422"
2020-02-18T13:28:31.54+0100 [RTR/14] OUT
2020-02-18T13:28:31.64+0100 [RTR/18] OUT ccp-influxdb-ci.apps.emea.vwapps.io - [2020-02-18T12:28:31.640897474Z] "GET /favicon.ico HTTP/1.1" 404 0 19 "-" "Mozilla/5.0 (Windows NT
10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0" "10.11.8.226:31322" "10.11.34.95:61133" x_forwarded_for:"-" x_forwarded_proto:"https" vcap_request_id:"0c985087-0372-4a48-46d1-8204e656b395" response_time:0.006984 gorouter_time:0.000086 app_id:"ff79fa42-b225-4c66-aebc-cfc754c04b0e" app_index:"0" x_b3_traceid:"ae3db301fc8f45b5" x_b3_spanid:"ae3db301fc8f45b5" x_b3_parentspanid:"-" b3:"ae3db301fc8f45b5-ae3db301fc8f45b5"
2020-02-18T13:28:31.64+0100 [RTR/18] OUT
2020-02-18T13:56:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:56:55.648914Z lvl=info msg="Retention policy deletion check (start)" log_id=0L245WjG000 service=retention trace_id=0L25oOO0000 op_name=retention_delete_check op_event=start
2020-02-18T13:56:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T12:56:55.648977Z lvl=info msg="Retention policy deletion check (end)" log_id=0L245WjG000 service=retention trace_id=0L25oOO0000 op_name=retention_delete_check op_event=end op_elapsed=0.079ms
2020-02-18T14:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T13:26:55.648885Z lvl=info msg="Retention policy deletion check (start)" log_id=0L245WjG000 service=retention trace_id=0L27XFd0000 op_name=retention_delete_check op_event=start
2020-02-18T14:26:55.64+0100 [APP/PROC/WEB/0] ERR ts=2020-02-18T13:26:55.648930Z lvl=info msg="Retention policy deletion check (end)" log_id=0L245WjG000 service=retention trace_id=0L27XFd0000 op_name=retention_delete_check op_event=end op_elapsed=0.058ms

Resources