<div dir="ltr">On 28 August 2013 09:37, Cure4All <span dir="ltr"><<a href="mailto:cure4all@gmail.com" target="_blank">cure4all@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr">Is there a way to monitor 3PAR SAN using it's own CLI or SSH?  Thank you.  </div></blockquote><div><br></div><div>Yes, to get all of the parameters you're searching for, run the Nagios script here:</div>

<div><br></div><div><a href="http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/SAN-and-NAS/3PAR-check-script/details">http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/SAN-and-NAS/3PAR-check-script/details</a></div>

<div><br></div><div>Parse the output, and feed into Xymon.  Perhaps like so:</div><div><br></div><div>#!/bin/sh</div><div>[ "$XYMON" ] || { echo "Run from xymonlaunch or xymoncmd">&2; exit 1; }</div>

<div>TARGET=<a href="http://san.example.com">san.example.com</a></div><div>USERNAME=admin</div><div>for CMD in pd node ld vv port_fc cap_fc cap_nl ps; do</div><div>    MSG=`/path/to/<span style="color:rgb(0,0,0);white-space:pre-wrap">check_3par $TARGET $USERNAME $CMD`</span></div>

<div><span style="color:rgb(0,0,0);white-space:pre-wrap">    if echo "$MSG" | grep "CRITICAL"; then</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">      COL=red</span></div><div>
<span style="color:rgb(0,0,0);white-space:pre-wrap">    elif echo "$MSG" | grep "WARNING"; then</span></div>
<div><span style="color:rgb(0,0,0);white-space:pre-wrap">      COL=yellow</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">    else</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">      COL=green</span></div>

<div><span style="color:rgb(0,0,0);white-space:pre-wrap">    fi</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">    $XYMON $XYMSRV "</span><span style="color:rgb(0,0,0);white-space:pre-wrap">status $TARGET.$CMD $COL `date`</span></div>

<div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">$MSG</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">"</span></div>

<div><span style="color:rgb(0,0,0);white-space:pre-wrap">done</span><br></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div>This is based on the sample in the Xymon tips and tricks page:<span style="color:rgb(0,0,0);white-space:pre-wrap"><br>

</span></div><div><br></div><div><a href="https://lxdns101.in.telstra.com.au/xymon/help/xymon-tips.html#scripts">https://lxdns101.in.telstra.com.au/xymon/help/xymon-tips.html#scripts</a><br></div><div><br></div><div>J</div>

<div><br></div></div></div></div>