Does someone know why my telegraf container doesn’t start or doesn’t send anything?
This is my telegraf.conf:
[agent]
debug = true
[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"
gather_services = false
container_names = []
source_tag = false
container_name_include = []
container_name_exclude = []
# container_state_include = []
# container_state_exclude = []
timeout = "5s"
perdevice = true
# perdevice_include = ["cpu"]
total = false
total_include = ["cpu", "blkio", "network"]
docker_label_include = []
docker_label_exclude = []
tag_env = ["JAVA_HOME", "HEAP_SIZE"]
[[outputs.influxdb_v2]]
urls = ["https://influxdb.domain.com"]
token = "influxdb token"
organization = "home"
bucket = "docker"
this is my docker compose```yaml
telegraf:
image: telegraf:latest
container_name: telegraf
restart: unless-stopped
user: “0:0”
volumes:
- /mnt/data/grafana/telegraf/config/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /:/hostfs:ro # to monitor docker-vm
- /var/run/docker.sock:/var/run/docker.sock # to monitor docker containers
- /mnt/data/grafana/telegraf/mibs:/usr/share/snmp/mibs # mibs files [e.g., sophos]
environment:
HOST_ETC: /hostfs/etc
HOST_PROC: /hostfs/proc
HOST_SYS: /hostfs/sys
HOST_VAR: /hostfs/var
HOST_RUN: /hostfs/run
HOST_MOUNT_PREFIX: /hostfs
dns:
- 1.1.1.1
- 1.0.0.1
networks:
- internal
These are my logs:
2024-08-15T16:10:24Z I! Loading config: /etc/telegraf/telegraf.conf
2024-08-15T16:10:24Z W! DeprecationWarning: Option "container_names" of plugin "inputs.docker" deprecated since version 1.4.0 and will be removed in 1.35.0: use 'container_name_include' instead
2024-08-15T16:10:24Z W! DeprecationWarning: Option "perdevice" of plugin "inputs.docker" deprecated since version 1.18.0 and will be removed in 1.35.0: use 'perdevice_include' instead
I get no telegraf is starting log or anything else even if I wait.