This is a tool for monitoring the status of an XServe RAID. It can monitor every individual drive of a 14-drive XServe RAID system.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@929 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
guruevi 2008-07-02 20:42:31 +00:00
parent f0eeaa688c
commit d922676835
6 changed files with 251 additions and 0 deletions

View File

@ -0,0 +1,9 @@
Pandora XServe RAID agent configuration
This only contains the files and tools required to monitor the status of an XServe RAID. It uses a package I found on alienRAID for this purpose.
The monitoring packages (xserve-raid-tools-1.2.*) also include Nagios plugins.
The pandora_agent.conf has all the configuration modules for each part of an XServe RAID (every single drive module can be monitored).
For the agent itself, you'll have to use or clone a Mac, Unix or Linux client and overwrite the configuration with this one. I tested this and it's running on Mac OS X 10.4 and 10.5 in my environment.

View File

@ -0,0 +1,3 @@
#!/bin/sh
/usr/local/bin/check_xserve_raid --address 0.0.0.0 --debug --debug > /private/var/root/xserve-status
cat /private/var/root/xserve-status | grep "lhs.array1 optimal, rhs.array1 optimal" | wc -l

View File

@ -0,0 +1,239 @@
# Base config file for Pandora FMS agents
# Version 1.2
# Licensed under GPL license v2,
# (c) 2003-2007 Sancho Lerena and others.
# please visit http://pandora.sourceforge.net
# General Parameters
# ==================
server_ip skull
server_path /var/spool/pandora/data_in
temporal /var/spool/pandora-xserve/data_out
logfile /var/log/pandora/pandora_agent-xserve.log
# Interval in seconds, 300 by default
interval 300
# Debug mode only generate XML, and stop after first execution,
# and does not copy XML to server.
debug 0
# By default is activated
checksum 0
# By default, agent takes machine name
agent_name XServe-RAID-1
# By default agent try to take default encoding defined in host.
# encoding iso-8859-15
# By default is 22 (for ssh)
#server_port 22
# ftp, ssh or local
transfer_mode ssh
# delayed_startup defines number of MINUTES before start execution
# for first time when startup Pandora Agent
#delayed_startup 90
#Pandora nice defines priority of execution. Less priority means more intensive execution
#A recommended value is 10. 0 priority means no Pandora CPU protection enabled
#pandora_nice 0
# Module Definition
# =================
# System information
module_begin
module_name XServe Health
module_type generic_proc
module_exec /rcbiUsers/pandora/check_xserve
module_end
module_begin
module_name Left Array RAID Status
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "lhs.array1 raid-status is" | awk '{ if ($8=="online"){ print 1 }; if ($8!="online") {print 0};}'
module_descripcion Left hand (Top) Array RAID Status
module_end
module_begin
module_name Right Array RAID Status
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "rhs.array1 raid-status is" | awk '{ if ($8=="online"){ print 1 }; if ($8!="online") {print 0};}'
module_descripcion Right hand (Bottom) Array RAID Status
module_end
module_begin
module_name Left Array Sector Capacity
module_type generic_data_inc
module_exec cat /private/var/root/xserve-status | grep "lhs.array1 sector-capacity is" | awk '{ print $8}'
module_descripcion Left hand (Top) Array Sector Capacity
module_end
module_begin
module_name Right Array Sector Capacity
module_type generic_data_inc
module_exec cat /private/var/root/xserve-status | grep "rhs.array1 sector-capacity is" | awk '{ print $8}'
module_descripcion Right hand (Bottom) Array Sector Capacity
module_end
module_begin
module_name Left Array UPS Warning
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep -A 1 --max-count=1 "ups-warning" | grep "<false/>" | wc -l
module_descripcion Left hand (Top) Array UPS Warning
module_end
module_begin
module_name Right Array UPS Warning
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep -A 1 "ups-warning" | grep -A 2 "\-\-" | grep "<false/>" | wc -l
module_descripcion Right hand (Bottom) Array UPS Warning
module_end
module_begin
module_name Left Array Battery Status
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep -A 1 --max-count=1 "battery-status" | grep "present" | wc -l
module_descripcion Left hand (Top) Array Battery Status
module_end
module_begin
module_name Right Array Battery Status
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep -A 1 "battery-status" | grep -A 2 "\-\-" | grep "present" | wc -l
module_descripcion Right hand (Bottom) Array Battery Status
module_end
module_begin
module_name Left Array Fan Warning
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep -A 1 --max-count=1 "fan-warning" | grep "<false/>" | wc -l
module_descripcion Left hand (Top) Array Fan Warning
module_end
module_begin
module_name Right Array Fan Warning
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep -A 1 "fan-warning" | grep -A 2 "\-\-" | grep "<false/>" | wc -l
module_descripcion Right hand (Bottom) Array Fan Warning
module_end
module_begin
module_name Left Array Power Warning
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep -A 1 --max-count=1 "power-warning" | grep "<false/>" | wc -l
module_descripcion Left hand (Top) Array Power Warning
module_end
module_begin
module_name Right Array Power Warning
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep -A 1 "power-warning" | grep -A 2 "\-\-" | grep "<false/>" | wc -l
module_descripcion Right hand (Bottom) Array Power Warning
module_end
module_begin
module_name Left Array Slot 1
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "lhs.slot1 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Left hand (Top) Array Slot 1 Status
module_end
module_begin
module_name Left Array Slot 2
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "lhs.slot2 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Left hand (Top) Array Slot 2 Status
module_end
module_begin
module_name Left Array Slot 3
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "lhs.slot3 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Left hand (Top) Array Slot 3 Status
module_end
module_begin
module_name Left Array Slot 4
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "lhs.slot4 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Left hand (Top) Array Slot 4 Status
module_end
module_begin
module_name Left Array Slot 5
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "lhs.slot5 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Left hand (Top) Array Slot 5 Status
module_end
module_begin
module_name Left Array Slot 6
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "lhs.slot6 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Left hand (Top) Array Slot 6 Status
module_end
module_begin
module_name Left Array Slot 7
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "lhs.slot7 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Left hand (Top) Array Slot 7 Status
module_end
module_begin
module_name Right Array Slot 1
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "rhs.slot1 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Right hand (Bottom) Array Slot 1 Status
module_end
module_begin
module_name Right Array Slot 2
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "rhs.slot2 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Right hand (Bottom) Array Slot 2 Status
module_end
module_begin
module_name Right Array Slot 3
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "rhs.slot3 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Right hand (Bottom) Array Slot 3 Status
module_end
module_begin
module_name Right Array Slot 4
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "rhs.slot4 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Right hand (Bottom) Array Slot 4 Status
module_end
module_begin
module_name Right Array Slot 5
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "rhs.slot5 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Right hand (Bottom) Array Slot 5 Status
module_end
module_begin
module_name Right Array Slot 6
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "rhs.slot6 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Right hand (Bottom) Array Slot 6 Status
module_end
module_begin
module_name Right Array Slot 7
module_type generic_proc
module_exec cat /private/var/root/xserve-status | grep "rhs.slot7 is" | awk '{ if ($7$8=="notrebuilding"){ print 1 }; if ($7$8!="notrebuilding") {print 0};}'
module_descripcion Right hand (Bottom) Array Slot 7 Status
module_end