Linuxfabrik / monitoring-plugins

220+ check plugins for Icinga and other Nagios-compatible monitoring applications. Each plugin is a standalone command line tool (written in Python) that provides a specific type of check.
https://linuxfabrik.ch
The Unlicense
214 stars 49 forks source link

disk-io: Filter Disks which are really mounted #709

Closed xeiss closed 6 months ago

xeiss commented 1 year ago

Describe the solution you'd like

Additional to #708, I would be perfect that the plugin would find "important" disks by itself and do not waste influx disk space with unnecessary disk information. (I have 15GB of data only for this measurement for 14 Hosts with some months of data in it) I have some servers with 122 disks/partitions are found from this plugin, but only 10 are really mounted. This could happen to many Linux features for example multipath or Linux raid. multipath has many sd disks with nothing needed from them, because they will be merged in dm- virtual disk and only this disk will be mounted and is interesting for disk I/O Same thing for Linux raid you have 12 physical disks with sda, sda1, sdb, sdb1, .... but they are useless in disk I/O info’s because that is only raid magic which happens there, interesting is only md0 which is the virtual disk for the Linux array and that is very my data flows.

I think the best way to figure out if a disk is important is, when it is mounted to a folder. Maybe that is only 99% and may someone will find a disk which is not mounted but it is important. So, you can implement a switch for filter_disks_mounted=yes|no or you make force_include_disk=xyz parameter, for special use.

Additional context

No response

markuslf commented 1 year ago

Very interesting, thank you.

markuslf commented 6 months ago

Fixed by https://github.com/Linuxfabrik/monitoring-plugins/commit/173edda33cfe511c9a7dd232434664bf71bf59c1