icinga2/nagios script for checking the status of a mdadm RAID using /proc/mdstat
Go to file
Gitea 78d9357c02 Rewritten to use /sys/block/$md/md/ 2020-11-29 11:31:21 +01:00
test Rewritten to use /sys/block/$md/md/ 2020-11-29 11:31:21 +01:00
README.md Rewritten to use /sys/block/$md/md/ 2020-11-29 11:31:21 +01:00
check_mdstat.sh Rewritten to use /sys/block/$md/md/ 2020-11-29 11:31:21 +01:00
command_mdstat.conf Added command_mdstat.conf 2020-02-09 21:03:54 +01:00
service_mdstat.conf Added service_mdstat.conf 2020-02-09 21:04:37 +01:00

README.md

check_mdstat.sh

This script reads from /sys/block/$md/md/ to get the status of a RAID devices.

Other than check_md_raid and [check_md_raid updated](https://exchange.icinga.com/jasem/check_md_raid updated/) the data is not taken from /proc/mdstat which is less machine readable. Also not all RAIDs are checked simulataneously but only one specific. This gives the possibility to query some "performance" data and later add more granular checks.

Arguments

  • --raid | -r: Name of the RAID, e.g. md0
  • --input | -i: Input base directory. Defaults to /sys/block/
  • --debug | -d: More debugging output, cannot be used with icinga2

Results

  • CRITICAL: if any device failed
  • CRITICAL: if the state of the RAID is not active/started
  • CRITICAL: if the number of active devices is smaller than the number of configured devices.
  • WARNING: when recoverying/resyncing

Known issues