Many thanks to all who replied.
The general view is that a script to parse the output of the metastat
command on a regular basis is the easiest route forward.
Unfortunately, due to the format of the metastat output, you either end up
with a very simple script which checks for a status line without "Okay"
included on it or you end up with a really heavy case of (n)awk-ing the
output to understand which is being reported as not being Okay and
presenting some useful information to the user.
In my case, I need to know exactly what has failed so just knowing that
something is wrong on a given machine isn't too helpful.
I'm attaching a script which I hope others might find useful and it is
capable of checking ODS and Vertias statuses.
My thanks to all who replied:
Rachel Polanskis [r.polanskis@nepean.uws.edu.au] for the script!
Seth Rothenberg [SROTHENB@montefiore.org] for pointing out that problems do
get syslogd'd
Mark Baldwin [mark.baldwin@makesys.com]
Michael Miller [Michael.Miller@oyster.co.uk]
<<vdisk.healthchecks>>
begin 600 vdisk.healthchecks
M(R$O8FEN+W-H#0HC#0HC"4`H(RD@=F1I<VLN:&5A;'1H8VAE8VL@=C$N,3,@
M+2!#:&5C:R!H96%L=&@@;V8@=FER='5A;"!D:7-K<R!O;B!T:&4@<WES=&5M
M#0HC#0HC"4%U=&AO<CH)"4UI:V4@07)N;W1T("A-:6ME+D%R;F]T=$!!=7,N
M4W5N+D-/32D-"B,-"B,)0W)E871E9#H)5V5D($%P<B`@.2`Q-3HS,CHT-"!%
M4U0@,3DY-PT*(PT*(PE-;V1I9FEE9#H).3@O,#8O,34@,#<Z-3`Z,30-"B,-
M"B,)1V5N97)A=&5D.@DY."\P-B\Q-2`P-SHU,#HQ-0T*(PT*(W-E="`M>'8-
M"@T*(R!S970@9&5F875L=`T*4$%42#TO<V)I;CHO971C.B]B:6XZ+W5S<B]S
M8FEN.B]U<W(O8FEN.B]U<W(O=6-B(#L@97AP;W)T(%!!5$@-"E!23T<]8&)A
M<V5N86UE("0P8"`[(&5X<&]R="!04D]'#0I435`]+W1M<"\D>U!23T=]+B0D
M(#L@97AP;W)T(%1-4`T*2$]35#U@=6YA;64@+6Y@(#L@97AP;W)T($A/4U0-
M"D%$5DE313TB<F]O="(@.R!E>'!O<G0@041625-%#0I-151!4U1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4U1].B!6:7)T=6%L($1I<VL@2&5A;'1H($%L97)T
M(2(@)'M!1%9)4T5]#0H-"@DC(&QO9R!I="!T;R!S>7-L;V<@87,@=V5L;`T*
M"6QO9V=E<B`M="`B)'M04D]'?2(@+7`@9&%E;6]N+F-R:70@+68@)'M435!]
M#0H-"@DC(&EF('1H:7,@:7,@86X@:6YT97)A8W1I=F4@='1Y('-E<W-I;VXL
M(&-A="!T:&4@9FEL92!T;V\-"@E;("UT(%T@)B8@8V%T("1[5$U0?0T*9FD-
G"@T*(R!R96UO=F4@=&5M<"!F:6QE<PT*(')M("UF("1[5$U0?0T*
`
end
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:09 CDT