Ages ago I added scripts to our zabbix i ... / 2011-04-15

2011-04-15 Ages ago I added scripts to our zabbix i ...
Ages ago I added scripts to our zabbix install to monitor a 3ware raid controller for raid failures. But at the moment we have a raid with a disk in error state but the raid unit is still listed as 'optimal'. Change of measuring script:
#!/bin/sh

sudo /usr/local/sbin/tw_cli '/c0 show drivestatus' | grep '^p' | awk ' $2 != "OK" { print } ' | wc -l
This now counts the number of disks not reporting 'OK' as state. Which is for the unit currently:
# /usr/local/sbin/tw_cli '/c0 show drivestatus'

Port   Status           Unit   Size        Blocks        Serial
---------------------------------------------------------------
p0     OK               u0     931.51 GB   1953525168    xxxxxxxx            
p1     OK               u0     931.51 GB   1953525168    xxxxxxxx            
p2     OK               u0     931.51 GB   1953525168    xxxxxxxx            
p3     OK               u0     931.51 GB   1953525168    xxxxxxxx            
p4     OK               u0     931.51 GB   1953525168    xxxxxxxx            
p5     OK               u0     931.51 GB   1953525168    xxxxxxxx            
p6     OK               u0     931.51 GB   1953525168    xxxxxxxx            
p7     OK               u0     931.51 GB   1953525168    xxxxxxxx            
p8     OK               u0     931.51 GB   1953525168    xxxxxxxx            
p9     OK               u0     931.51 GB   1953525168    xxxxxxxx            
p10    OK               u0     931.51 GB   1953525168    xxxxxxxx            
p11    OK               u0     931.51 GB   1953525168    xxxxxxxx            
p12    OK               u0     931.51 GB   1953525168    xxxxxxxx            
p13    DEVICE-ERROR     u0     931.51 GB   1953525168    xxxxxxxx            
p14    OK               u0     931.51 GB   1953525168    xxxxxxxx            
p15    OK               u0     931.51 GB   1953525168    xxxxxxxx            
But the entire state is stil 'Opt' :
# /usr/local/sbin/tw_cli 'show'

Ctl   Model        (V)Ports  Drives   Units   NotOpt  RRate   VRate  BBU
------------------------------------------------------------------------
c0    9650SE-16ML  16        16       1       0       1       1      OK
So the test had to change.

Tags: , ,

IPv6 check

Running test...
, reachable as koos+website@idefix.net. PGP encrypted e-mail preferred. PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers

RSS
Meningen zijn die van mezelf, wat ik schrijf is beschermd door auteursrecht. Sommige publicaties bevatten een expliciete vermelding dat ze ongevraagd gedeeld mogen worden.
My opinions are my own, what I write is protected by copyrights. Some publications contain an explicit license statement which allows sharing without asking permission.
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews
This page generated by $Id: newsitem.cgi,v 1.58 2022/12/12 15:34:31 koos Exp $ in 0.009941 seconds.