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

Possibly wrong path of udevadm #83

Open
leo-pempera opened this issue Jun 13, 2024 · 0 comments
Open

Possibly wrong path of udevadm #83

leo-pempera opened this issue Jun 13, 2024 · 0 comments
Assignees

Comments

@leo-pempera
Copy link

leo-pempera commented Jun 13, 2024

In the disk.py library there is a direct shell call to /sbin/udevadm.
I have found on some systems e.g. ubuntu server 20.04 the binary is located at /bin/udevadm, which results in no DEVNAME returned by the udevadm function.

This is the corresponsing snipped from the code:
success, result = shell.shell_exec('/sbin/udevadm info --query=property --name={}'.format( device, ))

Would it be possible to first find out the correct path via e.g. which udevadm or call it directly via just udevadm?

In my usecase thr newly released disk-io plugin from the linuxfabrik-monitoring-plugins collection is missing the most important disks due to this bug.

root@XXXXXX:/usr/lib64/nagios/plugins# ./disk-io
No I/O.

Name ! MntPnts ! DvMppr ! RWmax/s ! R1/s ! W1/s ! R5/s ! W5/s ! RW5/s
-----+---------+--------+---------+------+------+------+------+-------
md0  ! /boot   !        ! 10.0MiB ! 0.0B ! 0.0B ! 0.0B ! 0.0B ! 0.0B
root@XXXXXX:/usr/lib64/nagios/plugins# cat /proc/mounts | grep ^/dev
/dev/mapper/ubuntu-root / ext4 rw,relatime,errors=remount-ro 0 0
/dev/mapper/ubuntu-var /var ext4 rw,relatime 0 0
/dev/mapper/ubuntu-home /home ext4 rw,relatime 0 0
/dev/md0 /boot ext4 rw,relatime 0 0
@markuslf markuslf self-assigned this Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants