check_snmp ?

Marc Powell marc at ena.com
Mon Dec 15 23:30:43 CET 2003



> -----Original Message-----
> From: Spyou [mailto:spyou at club-internet.fr]
> Sent: Monday, December 15, 2003 4:17 PM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] check_snmp ?
> 
> At 23:10 15/12/2003, you wrote:
> >Hi!
> >
> >  I was wondering - is it possibel to use check_snmp to check e.g.
the
> >voltage of +12V on the mainboard - or maybe the input voltage on an
UPS
> ??
> 
> You'll have to find this information in your snmp daemon. Once you've
got
> the OID of thoses information, you can use check_snmp since it seems
that
> you can specifie ranges for critical & warning
> 
> Usage:
>   check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]
>            [-C community] [-s string] [-r regex] [-R regexi] [-t
timeout]
>            [-l label] [-u units] [-p port-number] [-d delimiter]
>            [-D output-delimiter] [-m miblist] [-P snmp version]
>            [-L seclevel] [-U secname] [-a authproto] [-A authpasswd]
>            [-X privpasswd]
> 
> (but i can't figure out how to write the range .. maybee lowvalue-
> highvalue

You'll get a lot more informative output from --help:

- 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 spcified 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.
- When checking multiple OIDs, separate ranges by commas like '-w
1:10,1:,:20'

The problem for the original poster will lie in the fact that he wants 2
ranges for WARNING and 2 ranges for CRITICAL. I don't think that can be
done. --
	0-199 == critical
	200-214 == warning
	240-250 == warning
	251 - infinity == critical

--
Marc



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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