Many important servers use RAID arrays to improve the redundancy of hardware and protect the absolute security of data, especially the wider use of databases. However, sometimes some disks in the disk array group may be dropped due to some reasons, which may cause system exceptions. Therefore, it is necessary to monitor these disks. This article describes how to monitor them.
In fact, it is very simple :)
Installation script: You need to download and use a web server as the software. If you have multiple machines, simply execute it.
++ ++
Wget http: // 192.168.1.100/Lib_Utils-1.00-08.noarch.rpm
Wget http: // 192.168.1.100/MegaCli-8.00.40-1.i386.rpm
Wget http: // 192.168.1.100/check_raid_info.sh
/Bin/rpm-ivh MegaCli-8.00.40-1.i386.rpm Lib_Utils-1.00-08.noarch.rpm
/Usr/bin/killall nrpe
/Bin/cp-av check_raid_info.sh/usr/local/nagios/libexec/
Echo "command [check_raid_info] =/usr/local/nagios/libexec/check_raid_info.sh">/usr/local/nagios/etc/nrpe. cfg
/Usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe. cfg-d
/Bin/chmod a + rx/usr/local/nagios/libexec /*
/Bin/sed-I's/require /! Require/'/etc/sudoers
/Bin/echo "nagios ALL = (ALL) NOPASSWD:/opt/MegaRAID/MegaCli/MegaCli64">/etc/sudoers
++ ++
Then you need to add the corresponding monitoring configuration fragment to the nagios Server:
Define service {
Use generic-service; Name of service template to use
Host_name DB_service
Service_description Raid Array Info
Check_command check_nrpe! Check_raid_info
Check_interval 30
}
This configuration sets the check interval to 30 minutes.
Check that the nangios configuration is correct and restart the service.
The web interface displays the following results:
It is obvious that the array type is raid 10, with four disks in capacity and status.
Recommended reading:
Debian soft RAID Installation notes-use mdadm to install RAID1
Common RAID technology introduction and demo (Multi-chart)
The most common disk array in Linux-RAID 5
RAID0 + 1 and RAID5 Performance Test Results
Install and configure Nagios and Cacti services in RHEL
Nagios details: click here
Nagios: click here