X7ROOT File Manager
Current Path:
/usr/local/nagios/plugins
usr
/
local
/
nagios
/
plugins
/
📁
..
📄
check-vps-cxs-log.ini
(214 B)
📄
check-vps-cxs-log.sh
(4.22 KB)
📄
check_3ware-raid.pl
(10.93 KB)
📄
check_aacraid.py
(4.62 KB)
📄
check_cl_license
(943 B)
📄
check_cplicense
(268 B)
📄
check_csf
(3.78 KB)
📄
check_eximq
(3.16 KB)
📄
check_if_ips.py
(3.88 KB)
📄
check_mdadm
(771 B)
📄
check_megaraid_sas
(6.98 KB)
📄
check_mem.pl
(12.85 KB)
📄
check_newbackup
(7.08 KB)
📄
check_puppet
(4.35 KB)
📄
check_ro_fs.sh
(530 B)
📄
check_spamd
(6.74 KB)
📁
nc-smart-data-exporter
Editing: check_mdadm
#!/bin/bash # Get count of raid arrays RAID_DEVICES=`grep ^md -c /proc/mdstat` # Get count of degraded arrays RAID_STATUS=`grep "\[.*_.*\]" /proc/mdstat -c` # Is an array currently recovering, get percentage of recovery RAID_RECOVER=`grep recovery /proc/mdstat | awk '{print $4}'` # Check raid status # RAID recovers --> Warning if [[ $RAID_RECOVER ]]; then STATUS="WARNING - Checked $RAID_DEVICES arrays, recovering : $RAID_RECOVER" EXIT=1 # RAID ok elif [[ $RAID_STATUS == "0" ]]; then STATUS="OK - Checked $RAID_DEVICES arrays." EXIT=0 # All else critical, better save than sorry else STATUS="CRITICAL - Checked $RAID_DEVICES arrays, $RAID_STATUS have FAILED" EXIT=2 fi # Status and quit echo $STATUS exit $EXIT
Upload File
Create Folder