I am running telegran 1.20.4 in docker (with grafana, influxdb) in a system with OpenMediaVault 6 (Debian).
I have installed hd-idle to manage when my disks should spin down when they are not in use.
I had one disk that was unable to spin down and after a lot of try and failure I found out that was telegraf container who prevented to spin down. As soon I as I stop the container, the disk goes to sleep.
This is my telegraf docker-compose:
telegraf:
container_name: telegraf
restart: unless-stopped
volumes:
- /docker/telegraf:/etc/telegraf:ro
- /proc:/host/proc:ro
- /:/hostfs:ro
- /var/run/docker.sock:/var/run/docker.sock
environment:
- TZ=Europe/Madrid
- HOST_MOUNT_PREFIX=/hostfs
- HOST_PROC=/host/proc
network_mode: host
image:
telegraf:1.20.4
I tried to remove HOST_MOUNT_PREFIX and HOST_PROC with no success.
This is my telegraf config file:
[global_tags]
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = false
[[outputs.influxdb_v2]]
urls =
token =
bucket =
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs"]
[[inputs.io]]
[[inputs.mem]]
[[inputs.net]]
[[inputs.system]]
[[inputs.swap]]
[[inputs.netstat]]
[[inputs.processes]]
[[inputs.kernel]]
[[inputs.hddtemp]]
[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"
gather_services = false
container_name_include = []
container_name_exclude = []
timeout = "30s"
docker_label_include = []
docker_label_exclude = []
perdevice = true
total = false
I tried to remove [[inputs.disk]] and [[inputs.io]] with no success.
If the disk is sleeping and I start the container, nothing happens. But, if the disk start spinning when the container is running, then it won’t stop spinning again.
I have four disks and only happens in one of them. No idea what to try more. Any help?