Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Disk integration system.disk.read_time write_time system.io.await missing mount name #18026

Open
CrashLaker opened this issue Jun 30, 2024 · 2 comments
Assignees
Labels

Comments

@CrashLaker
Copy link

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

I have many mounts like
image

the way i setup the panels are like this
image

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 sd* scrambles to another mount. since they're bounded by their UUIDs everything works fine but the dashboard gets out of sync.
image

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 in system.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.

@CrashLaker
Copy link
Author

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))

image

maybe a feature request.

regards,c

@FlorentClarret
Copy link
Member

Hi @CrashLaker, thanks for reporting this! I'm moving this issue to the integrations-core repo where the integration lives so the team in charge of it can have a look.

@FlorentClarret FlorentClarret transferred this issue from DataDog/datadog-agent Jul 11, 2024
@iliakur iliakur self-assigned this Jul 25, 2024
@iliakur iliakur added the triage label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants