Xymon Mailing List Archive search

3Par reports, check status

list Jeremy Laidman
Wed, 28 Aug 2013 10:14:08 +1000
Message-Id: <CAAnki7B1ca2-SumSdK9kJcS047pg=user-a5ceb54c620a@xymon.invalid>

On 28 August 2013 09:37, Cure4All <user-0ccd3c844281@xymon.invalid> wrote:
Is there a way to monitor 3PAR SAN using it's own CLI or SSH?  Thank you.
Yes, to get all of the parameters you're searching for, run the Nagios
script here:

http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/SAN-and-NAS/3PAR-check-script/details

Parse the output, and feed into Xymon.  Perhaps like so:

#!/bin/sh
[ "$XYMON" ] || { echo "Run from xymonlaunch or xymoncmd">&2; exit 1; }
TARGET=san.example.com
USERNAME=admin
for CMD in pd node ld vv port_fc cap_fc cap_nl ps; do
    MSG=`/path/to/check_3par $TARGET $USERNAME $CMD`
 if echo "$MSG" | grep "CRITICAL"; then
COL=red
elif echo "$MSG" | grep "WARNING"; then
 COL=yellow
else
COL=green
 fi
$XYMON $XYMSRV "status $TARGET.$CMD $COL `date`

$MSG
"
done

This is based on the sample in the Xymon tips and tricks page:

https://lxdns101.in.telstra.com.au/xymon/help/xymon-tips.html#scripts

J