nagios
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
nagios [2012/03/29 13:12] – created ikahugu | nagios [2012/03/29 13:18] – ikahugu | ||
---|---|---|---|
Line 2: | Line 2: | ||
1. Make sure you have Megacli installed. In HPC it's installed in / | 1. Make sure you have Megacli installed. In HPC it's installed in / | ||
+ | |||
2. Download check_megaraid_sas script from Nagios Exchange to the plugins folder of the host. | 2. Download check_megaraid_sas script from Nagios Exchange to the plugins folder of the host. | ||
In most systems this is in / | In most systems this is in / | ||
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: | 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: | ||
+ | < | ||
nrpe ALL=(ALL) NOPASSWD: / | nrpe ALL=(ALL) NOPASSWD: / | ||
+ | </ | ||
OPTION 2 TODO: (check hpc's / | OPTION 2 TODO: (check hpc's / | ||
+ | |||
+ | < | ||
+ | |||
+ | nrpe ALL = NOPASSWD: RAIDSTATUSNRPE | ||
+ | |||
+ | </ | ||
+ | |||
4. Add a new command definition to nrpe config : / | 4. Add a new command definition to nrpe config : / | ||
Line 15: | Line 24: | ||
command[check_raid]=/ | command[check_raid]=/ | ||
</ | </ | ||
+ | |||
+ | 5. On the monitoring server, add a service definition as follows: | ||
+ | |||
+ | < | ||
+ | define service{ | ||
+ | use generic-service | ||
+ | host_name HPC | ||
+ | service_description Check RAID Status | ||
+ | check_command check_nrpe_1arg!check_raid | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | 6. Restart Nagios | ||
+ | |||
+ | |||
nagios.txt · Last modified: 2012/07/19 06:56 by ikahugu