Ian P. Christian's Personal Blog Random witterings from pookey

16Apr/083

Monitoring Dell SAS 5/iR RAID with nagios

The Dell PERC/5 shows like this under 'lspci'

07:08.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068 PCI-X Fusion-MPT SAS (rev 01)
        Subsystem: Dell SAS 5/iR Adapter RAID Controller

The status of this RAID card can be read using mpt-status, in Gentoo this package is available as sys-block/mpt-status. Here's an example of the output:

# mpt-status
ioc0 vol_id 0 type IM, 2 phy, 148 GB, state OPTIMAL, flags ENABLED
ioc0 phy 1 scsi_id 32 ATA      WDC WD1600JS-75N 2E04, 149 GB, state ONLINE, flags NONE
ioc0 phy 0 scsi_id 1 ATA      WDC WD1600JS-75N 2E04, 149 GB, state ONLINE, flags NONE

The latest 'check_mpt' script can be found on Nagios Exchange. Download it and put it in your libexec folder, for me on gentoo its '/usr/nagios/libexec/'. Open the file, and make sure the 'use lib' line points to the correct place.

The script uses sudo to run mpt-status, so you'll need to modify your /etc/sudoers - adding a line like this:

%nagios ALL=(ALL) NOPASSWD:/usr/sbin/mpt-status

Next, you need to configure nagios, your filenames might be different from the names I use below.

/etc/nagios/commands.cfg : Note, the -c param refers to the number of disks you expect to be active.


define command{
  command_name  check_mpt
  command_line  $USER1$/check_mpt -c 2
}

/etc/nagios/localhost.cfg

define service{
  use                  local-service
  host_name            localhost
  service_description  mpt - Dell Raid
  check_command        check_mpt
}

Reload nagios, on gentoo, it's /etc/init.d/nagios reload

See also: Monitoring PERC 4e over SNMP with nagios

Filed under: Uncategorized 3 Comments
15Apr/081

skinning nagios – nagios doesn’t have to be ugly!

Nagios can be pretty, and several people I've told this too seemed surprised, so I thought I'd put a quick note here. Here is a nice theme for nagios....

http://new.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F1723.html;d=1

Unfortunately, the underlying UI is still the same horrible interface, but.... this does make a big difference to the aesthetics :)

Filed under: Uncategorized 1 Comment