<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>This should be doable with the check_snmp plugin.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I have nagios-plugins-snmp-1.4.13-9.fc8 on one of my EC2
instances, and the snmp plugin seems to operate as follows (quoted from check_snmp
--help)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-w, --warning=INTEGER_RANGE(s)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    Range(s) which will not result in a WARNING
status<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> -c, --critical=INTEGER_RANGE(s)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    Range(s) which will not result in a CRITICAL
status<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Notes:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>- Ranges are inclusive and are indicated with colons. When specified
as<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>   'min:max' a STATE_OK will be returned if the result
is within the indicated<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>   range or is equal to the upper or lower bound. A
non-OK state will be<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>   returned if the result is outside the specified
range.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> - If specified in the order 'max:min' a non-OK state will
be returned if the<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>   result is within the (inclusive) range.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> - Upper or lower bounds may be omitted to skip checking
the respective limit.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> - Bare integers are interpreted as upper limits.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>So you might try:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal>define command{<br>
     command_name    snmp_ups_capa<br>
     command_line    $USER1$/check_snmp -H
$HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.1.0 -w 90: -c 80: -l
'Adv. Battery Capacity' -u '%'<br>
  }<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>(note the added colons after 80 and 90, to indicate that
they are the lower bounds for their ranges)<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Regards,<o:p></o:p></p>

<p class=MsoNormal>-Austin<span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>(sorry if this shows up at html-email; I’m still kicking
outlook in the shins to try to get it to do what I want)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Jeremy Gibbs [mailto:jlgibbs@utica.edu] <br>
<b>Sent:</b> Wednesday, July 28, 2010 6:05 PM<br>
<b>To:</b> Nagios Users List<br>
<b>Subject:</b> Re: [Nagios-users] Ability to warn when number goes bellow warning
level<o:p></o:p></span></p>

</div>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:
12.0pt;margin-left:.5in'>This is the code I am using to check it.<br>
<br>
<br>
define command{<br>
     command_name    snmp_ups_capa<br>
     command_line    $USER1$/check_snmp -H
$HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.1.0 -l 'Adv. Battery
Capacity' -u '%'<br>
  }<br>
<br>
<br>
So what I would like to do is this<br>
<br>
<br>
define command{<br>
     command_name    snmp_ups_capa<br>
     command_line    $USER1$/check_snmp -H
$HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.1.0 -w 90 -c 80 -l 'Adv.
Battery Capacity' -u '%'<br>
  }<br>
<br>
Except when it's below 90 and 80.  I would like to try to get this to work
first.  Then I can think about install apcupsd.<br>
<br>
Thanks<br>
<br>
<o:p></o:p></p>

<div>

<p class=MsoNormal style='margin-left:.5in'>On Wed, Jul 28, 2010 at 10:15 AM,
John Antram <<a href="mailto:rewt@dvdmenus.net">rewt@dvdmenus.net</a>>
wrote:<o:p></o:p></p>

<div>

<p class=MsoNormal style='margin-left:.5in'>Jeremy, if you already have apcupsd
( <a href="http://www.apcupsd.com" target="_blank">www.apcupsd.com</a> )
installed on the target "ups hosts" you can use check_apcupsd ( <a
href="http://exchange.nagios.org/directory/Plugins/Hardware/UPS/APC/check_apcupsd/details"
target="_blank">http://exchange.nagios.org/directory/Plugins/Hardware/UPS/APC/check_apcupsd/details</a>
)<br>
<br>
I have a good many ups units deployed to workstations and keep an eye on them
with nagios through this plugin. It is a bash script however, so it won't work
if your nagios system is windows. I have extended the code to report several
other variables as well, it is easy to do.<br>
<br>
John Antram<br>
Subatomic Digital<br>
Essex Junction Vermont, 05452<br>
<a href="mailto:rewt@dvdmenus.net" target="_blank">rewt@dvdmenus.net</a><o:p></o:p></p>

<div>

<div>

<p class=MsoNormal style='margin-left:.5in'><br>
<br>
<br>
On 7/28/2010 8:51 AM, Jeremy Gibbs wrote: <o:p></o:p></p>

</div>

</div>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>

<div>

<div>

<div>

<p class=MsoNormal style='margin-left:.5in'>I have many UPS systems.  I
would like to warn when the battery gets below 90% and go critical when it goes
below 80%.  Is there a way to do this? <o:p></o:p></p>

<div>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'>Thanks<o:p></o:p></p>

<div>

<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:
12.0pt;margin-left:.5in'><o:p> </o:p></p>

</div>

</div>

</div>

<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:
12.0pt;margin-left:.5in'>-- <br>
Jeremy L. Gibbs<br>
Systems Administrator<br>
Utica College<br>
Integrated Information Technology Services<br>
(315) 223-2383<o:p></o:p></p>

</div>

</div>

<pre style='margin-left:.5in'><o:p> </o:p></pre><pre style='margin-left:
.5in'>------------------------------------------------------------------------------<o:p></o:p></pre><pre
style='margin-left:.5in'>The Palm PDK Hot Apps Program offers developers who use the<o:p></o:p></pre><pre
style='margin-left:.5in'>Plug-In Development Kit to bring their C/C++ apps to Palm for a share <o:p></o:p></pre><pre
style='margin-left:.5in'>of $1 Million in cash or HP Products. Visit us here for more details:<o:p></o:p></pre>

<div><pre style='margin-left:.5in'><a
href="http://ad.doubleclick.net/clk;226879339;13503038;l" target="_blank">http://ad.doubleclick.net/clk;226879339;13503038;l</a>?<o:p></o:p></pre><pre
style='margin-left:.5in'><a
href="http://clk.atdmt.com/CRS/go/247765532/direct/01/" target="_blank">http://clk.atdmt.com/CRS/go/247765532/direct/01/</a><o:p></o:p></pre></div>

<div><pre style='margin-left:.5in'><o:p> </o:p></pre><pre
style='margin-left:.5in'>_______________________________________________<o:p></o:p></pre><pre
style='margin-left:.5in'>Nagios-users mailing list<o:p></o:p></pre><pre
style='margin-left:.5in'><a href="mailto:Nagios-users@lists.sourceforge.net"
target="_blank">Nagios-users@lists.sourceforge.net</a><o:p></o:p></pre><pre
style='margin-left:.5in'><a
href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><o:p></o:p></pre><pre
style='margin-left:.5in'>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. <o:p></o:p></pre><pre
style='margin-left:.5in'>::: Messages without supporting info will risk being sent to /dev/null<o:p></o:p></pre></div>

</blockquote>

<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>

</div>

<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:
12.0pt;margin-left:.5in'><br>
------------------------------------------------------------------------------<br>
The Palm PDK Hot Apps Program offers developers who use the<br>
Plug-In Development Kit to bring their C/C++ apps to Palm for a share<br>
of $1 Million in cash or HP Products. Visit us here for more details:<br>
<a href="http://p.sf.net/sfu/dev2dev-palm" target="_blank">http://p.sf.net/sfu/dev2dev-palm</a><br>
<br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users"
target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<o:p></o:p></p>

</div>

<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:
12.0pt;margin-left:.5in'><br>
<br clear=all>
<br>
-- <br>
Jeremy L. Gibbs<br>
Systems Administrator<br>
Utica College<br>
Integrated Information Technology Services<br>
(315) 223-2383<o:p></o:p></p>

</div>

</body>

</html>