Welcome to the Pandora FMS Module Library

This is a library with modules, documentation and tools for Pandora FMS users, both public Open Source and Enterprise. Please use your support credentials (same as used to enter support/ticketing system) in the menu to your right. You will be granted access to a resourceful module library, such as Oracle, VMware, JBoss and others, ready to be used in production enviroments, with official professional support from Artica. If you do not own an enterprise account, you still can browse and download lots of modules, you can even register a free account and contribute with your own modules/tools for other public users.

Home > Miscelaneous

Software RAID status

Author: Create in: 03/27/2014 Update in: 03/27/2014
Module type : Agent plugin

Check any problem on a Software RAID.

To use it, save it with name "check_raid" on plugins folder on pandora agent, and add the following line on the configuration file:

module_plugin check_raid

Author: Manuel Angel Fernandez
His blog: http://rastreador.com.es/

Module data

for i in $(mdadm --detail --scan | cut -d" " -f2)
RAIDSTATUS=$(mdadm --query --detail $i | grep "State :" | tr -d " ")

CHECK=$(echo $RAIDSTATUS | egrep -c "State:clean,checking|State:active|State:clean")

if [ $CHECK -eq 0 ]
# DESC="Array $i status"
DESC="Check OK of Raid $i errors with mdadm"
echo "<module>";
echo "<name>< ![CDATA[Check_raid $i]]></name>";
echo "<type>< ![CDATA[generic_data]]></type>";
echo "<data>< ![CDATA[$OUT]]></data>";
echo "<description>< ![CDATA[$DESC]]></description>";
echo "<min_critical>1</min_critical>";
echo "</module>";