Open CrashLaker opened 2 days ago
well not ideal but i've edited /opt/datadog-agent/embedded/lib/python3.11/site-packages/datadog_checks/disk/disk.py
def collect_latency_metrics(self):
output = os.popen("mount").read().strip()
# /dev/sdi1 on /mnt/data-3RJT type ext4 (rw,relatime)
mapmount = {}
for line in output.split("\n"):
try:
l = line.split(" ")
if len(l) >= 3 and l[1] == "on":
mapmount[l[0]] = l[2]
except:
pass
...
dev_disk_name = f"/dev/{disk_name}"
if dev_disk_name in mapmount:
metric_tags.append('device:{}'.format(mapmount[dev_disk_name]))
else:
metric_tags.append('device:{}'.format(disk_name))
maybe a feature request.
regards,c
Hi all, idk if this is a bug or a FR. if not. apologies
Agent Environment version 7.52.1
Describe what happened: I've a dashboard where I monitor my disk pools.![image](https://github.com/DataDog/datadog-agent/assets/4432491/7cff0f51-9abe-4089-96d4-3ca02c0a5e20)
I have many mounts like![image](https://github.com/DataDog/datadog-agent/assets/4432491/ed90f35e-802f-4a15-aa13-155ac2db4a7f)
the way i setup the panels are like this![image](https://github.com/DataDog/datadog-agent/assets/4432491/83c76694-61bc-44be-9b2d-1b8863238382)
so I use the mount name
/mnt/data-YRLB
for disk size and/dev/sdd1
for io latency.and every time the host reboots the device![image](https://github.com/DataDog/datadog-agent/assets/4432491/b068e5ea-b6e0-4f7d-96e7-fc8071a4f8b3)
sd*
scrambles to another mount. since they're bounded by their UUIDs everything works fine but the dashboard gets out of sync.Describe what you expected: I'd expect to use the mount name in metrics like
system.disk.read_time
,system.disk.write_time
,system.io.await
like insystem.disk.used
Steps to reproduce the issue: start agent and enable disk monitoring
Additional environment details (Operating System, Cloud provider, etc): centos 8 on bare metal mac mini
thanks
regards,c.