glensc/nagios-plugin-check_raid — pull request #77 by JiriHorky (2014-07-29 06:56:30+00:00)
Title: mdstat: do not trigger WARN when checking (even multiple) arrays by default

This fixes behavior when one or multiple devices are beining checked and the plugin triggers WARN. It is based on pull request https://github.com/glensc/nagios-plugin-check_raid/pull/69 but fixes also the case where there is more then one array scheduled to be checked. In such case, the mdstat output marks the scheduled arrays as "resync=DELAYED", which would previously trigger warning. We handle this case specially by checking if there is more than one array and if at least one of the other arrays are being checked. If so, we assume that resync=DELAYED state is because of scheduled check and do not trigger WARN.