I can’t get telegraf to include disk_used_percent for iscsi disks. The metrics for the mount point “/” are properly delivered. But the metrics for “/var/lib/docker/volumes” and “/usr/local/backup” are missing. The docker image used is the most recent available. The filesystem used on the disks is ext4. Any ideas what I forgot?
compose.yml
telegraf:
container_name: grafana-telegraf
image: telegraf:alpine
user: telegraf:989
pid: host
network_mode: host
restart: unless-stopped
depends_on:
- prometheus
volumes:
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
# - /var/run/docker.sock:/var/run/docker.sock:ro
- /var/run:/var/run:ro
- /proc/net:/hostfs/proc/net:ro
- /dev:/dev:ro
telegraf.conf
[agent]
interval = "15s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "15s"
flush_jitter = "0s"
precision = "0s"
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
core_tags = false
[[inputs.mem]]
[[inputs.swap]]
[[inputs.system]]
fieldexclude = ["uptime_format"]
[[inputs.net]]
interfaces = ["enp*"]
[[inputs.disk]]
mount_points = ["/","/var/lib/docker/volumes","/usr/local/backup"]
[[inputs.diskio]]
skip_serial_number = true
[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"
gather_services = false
source_tag = false
container_name_include = []
container_name_exclude = []
storage_objects = ["container", "image", "volume"]
timeout = "5s"
perdevice_include = ["cpu"]
total_include = ["cpu", "blkio", "network"]
docker_label_include = ["com_docker_compose_project", "container_name"]
docker_label_exclude = ["container_id", "container_image", "container_status", "container_version", "server_version", "host"]
namedrop = ["container_id", "container_image", "container_status", "container_version", "server_version", "host"]
fieldexclude = ["container_id","health_status"]
[[outputs.http]]
url = "http://10.4.0.3:9090/api/v1/write"
data_format = "prometheusremotewrite"
use_batch_format = true
[outputs.http.headers]
Content-Type = "application/x-protobuf"
Content-Encoding = "snappy"
X-Prometheus-Remote-Write-Version = "0.1.0"
Greetings!
