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

disk-io - add iops and improve match condition #772

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

leo-pempera
Copy link
Contributor

The following two features were added:

  • inclusion of iops per disk
  • ability to monitor disks not automatically found via get_real_disks()

The iops part was added via the psutil.disk_io_counters, which is already used for all the other metrics.
I renamed some variables to make it clear what iops and bandwidth is.
Also the naming of some variables with xxx15 was misleading, as the default count is 5.

As for the ability to monitor disks not automatically found via the match argument.
I found myself in the situation that on numerous servers, e.g. ones with zfs, the get_real_disks() would not pick up on them as they are not mounted in the typical way. Instead monitorig the raw devices was necessary.
In my patch i included the option when the match argument is given, all disks from psutil.disk_io_counters will be taken into account including the found real disks. After that the regex match will be applied to the list.
This behaviour is there to make the check exactly as it was working before, as with the default there is no match argument.
Only if someone wants to specifiy exactly what disks to monitor, the match argument will include all the disks.

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

Successfully merging this pull request may close these issues.

1 participant