Ability to warn when number goes bellow warning level

Hendrix, Austin ahendrix at createspace.com
Thu Jul 29 19:08:12 CEST 2010


This should be doable with the check_snmp plugin.
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)

-w, --warning=INTEGER_RANGE(s)
    Range(s) which will not result in a WARNING status
 -c, --critical=INTEGER_RANGE(s)
    Range(s) which will not result in a CRITICAL status

Notes:
- Ranges are inclusive and are indicated with colons. When specified as
   'min:max' a STATE_OK will be returned if the result is within the indicated
   range or is equal to the upper or lower bound. A non-OK state will be
   returned if the result is outside the specified range.
 - If specified in the order 'max:min' a non-OK state will be returned if the
   result is within the (inclusive) range.
 - Upper or lower bounds may be omitted to skip checking the respective limit.
 - Bare integers are interpreted as upper limits.


So you might try:

define command{
     command_name    snmp_ups_capa
     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 '%'
  }

(note the added colons after 80 and 90, to indicate that they are the lower bounds for their ranges)

Regards,
-Austin

(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)

From: Jeremy Gibbs [mailto:jlgibbs at utica.edu]
Sent: Wednesday, July 28, 2010 6:05 PM
To: Nagios Users List
Subject: Re: [Nagios-users] Ability to warn when number goes bellow warning level

This is the code I am using to check it.


define command{
     command_name    snmp_ups_capa
     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 '%'
  }


So what I would like to do is this


define command{
     command_name    snmp_ups_capa
     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 '%'
  }

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.

Thanks

On Wed, Jul 28, 2010 at 10:15 AM, John Antram <rewt at dvdmenus.net<mailto:rewt at dvdmenus.net>> wrote:
Jeremy, if you already have apcupsd ( www.apcupsd.com<http://www.apcupsd.com> ) installed on the target "ups hosts" you can use check_apcupsd ( http://exchange.nagios.org/directory/Plugins/Hardware/UPS/APC/check_apcupsd/details )

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.

John Antram
Subatomic Digital
Essex Junction Vermont, 05452
rewt at dvdmenus.net<mailto:rewt at dvdmenus.net>



On 7/28/2010 8:51 AM, Jeremy Gibbs wrote:
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?

Thanks

--
Jeremy L. Gibbs
Systems Administrator
Utica College
Integrated Information Technology Services
(315) 223-2383



------------------------------------------------------------------------------

The Palm PDK Hot Apps Program offers developers who use the

Plug-In Development Kit to bring their C/C++ apps to Palm for a share

of $1 Million in cash or HP Products. Visit us here for more details:

http://ad.doubleclick.net/clk;226879339;13503038;l?

http://clk.atdmt.com/CRS/go/247765532/direct/01/



_______________________________________________

Nagios-users mailing list

Nagios-users at lists.sourceforge.net<mailto:Nagios-users at lists.sourceforge.net>

https://lists.sourceforge.net/lists/listinfo/nagios-users

::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.

::: Messages without supporting info will risk being sent to /dev/null


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm

_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net<mailto:Nagios-users at lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null



--
Jeremy L. Gibbs
Systems Administrator
Utica College
Integrated Information Technology Services
(315) 223-2383
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100729/004285a1/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list