Welcome to It-Slav.Net blog
Peter Andersson
peter@it-slav.net

I've already got a female to worry about. Her name is the Enterprise.
-- Kirk, "The Corbomite Maneuver", stardate 1514.0

Background

As a monitoring fanatic, I think that have mirrored disk without monitor the mirror is worse then not have a redundant disk system at all. If you think that you are safe and you are not, is worse then be aware of a risk and calculate with it.

This article will describe how I did monitoring my FreeNAS system mirrored disks status using Nagios or op5 Monitoring. I assume basic knowledge of Nagios or op5 Monitor and that a Nagios agent is installed.

 

Demarcation

This article will focus on GEOM raid monitoring. Of cource all important services should be monitored, like HTTP, CIFS, SMB, disk space, CPU Load, memory usage and so on. However that is basic monitoring knowledge and there is alot of documentation on the net howto achive that.

 

  

Monitor the GEOM mirror

The most interesting part is to monitor the GEOM mirror to make sure that that the raid1 is working. 

After some googleing I found check_geom, downloaded it and put it in /usr/local/libexec/nagios/ where the other plugins are located.

Add a line to /etc/nrpe.cfg

command[check_geom_mirror]=/usr/local/libexec/nagios/check_geom mirror

and test from Nagios/op5 Monitor host:

# ./check_nrpe -H fnas -c check_geom_mirror
OK mirror  - mirror/2TBmirror0 COMPLETE { ad6 , ad4 }

It works!
 

Configure Nagios or op5 Monitor

In /opt/monitor/etc/services.cfg at the op5 Monitor host

# service 'Disk Raid Mirrors'
define service{
    use                            default-service
    host_name                      fnas
    service_description            Disk Raid Mirrors
    check_command                  check_nrpe!check_geom_mirror
    contact_groups                 it-slav_mail,it-slav_jabber
    }

 

The result

I tested unplugging the SATA cabel to one of the mirrored disk and after a couple of minutes I got an Critical notification that my disk mirror is broken, I plugged SATA cabel and got a Warning:

 

After a couple of hours the mirror was OK.

 

 

Useful links:

  • Previous article describing howto install nagios or op5 Monitor agent on FreeNAS
  • op5, an Enterprise Monitor product company
  • op5 Monitor, Enterprise Monitoring based on opensource
  • Nagios, an excellent opensource monitor tool
  • FreeNAS, very capable NAS based on FreeBSD

Leave a Reply





Book reviews
FreePBX 2.5
Powerful Telephony Solutions






Asterisk 1.6
Build a feature rich telephony system with Asterisk






Learning NAGIOS 3.0





Cacti 0.8 Network Monitoring,
Monitor your network with ease!