User Tools

Site Tools


how_to_setup_check_megaraid_sas

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

how_to_setup_check_megaraid_sas [2012/04/04 12:07] (current)
ikahugu created
Line 1: Line 1:
 +**How to setup check_megaraid_sas**
 +
 +1. Make sure you have Megacli installed. In HPC it's installed in /​opt/​MegaRAID/​MegaCli/​
 +
 +2. Download check_megaraid_sas script from Nagios Exchange to the plugins folder of the host.
 +In most systems this is in /​usr/​lib64/​nagios/​plugins or /​usr/​lib/​nagios/​plugins
 +
 +3. The MegaCli script has to be run as root, usually nrpe runs as user nrpe. The nagios check script is fully aware of that and uses sudo to call the raid check script. So nrpe needs to be allowed to call this script as root. Use visudo and add this line:
 +<​code>​
 +nrpe ALL=(ALL) NOPASSWD: /​opt/​MegaRAID/​MegaCli
 +</​code>​
 +
 +OPTION 2 TODO: (check hpc's /​etc/​sudoers)
 +
 +<​code>​
 +
 +nrpe    ALL = NOPASSWD: RAIDSTATUSNRPE
 +
 +</​code>​
 +
 +
 +4. Add a new command definition to nrpe config : /​etc/​nagios/​nrpe.cfg
 +<​code>​
 +command[check_raid]=/​usr/​lib64/​nagios/​plugins/​check_megaraid_sas
 +</​code>​
 +
 +5. On the monitoring server, add a service definition as follows:
 +
 +<​code>​
 +define service{
 + use generic-service
 + host_name HPC
 + service_description Check RAID Status
 + check_command check_nrpe_1arg!check_raid
 +}
 +</​code>​
 +
 +6. Restart Nagios
  
how_to_setup_check_megaraid_sas.txt · Last modified: 2012/04/04 12:07 by ikahugu