snmp
Aaron M. Segura
aaron.segura at cabelas.com
Tue Jan 15 23:27:55 CET 2008
On Tue, 2008-01-15 at 16:13 -0600, Rich Sasko wrote:
> I am using the following service to check the power supply on my dell
> power edge system.
>
>
>
> define service{
>
> use generic-service
>
> host_name DHCP server
>
> service_description Power Supply
>
> check_command check_snmp!-C public
> -o .1.3.6.1.4.1.674.10892.1.200.10.1.9.1
>
> }
>
>
>
> The problem is it reports as ok no matter what snmp returns as the
> value. When it is normal it returns 3 and Nagios says the system is
> OK. I pull the power cord on one of the redundant power supplies and
> it returns 4 and Nagios still says it’s OK
>
> Anyone have any ideas?
You have to specify some sort of boundaries, as specified in the '--help' for check_snmp. Nagios can't read your mind...yet.
check_snmp (nagios-plugins 1.4.2) 1.57
Copyright (c) 1999-2004 Nagios Plugin Development Team
<nagiosplug-devel at lists.sourceforge.net>
Check status of remote machines and obtain sustem information via SNMP
Usage: check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c
crit_range]
[-C community] [-s string] [-r regex] [-R regexi]
[-t timeout] [-e retries]
[-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]
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-H, --hostname=ADDRESS
Host name or IP Address
-p, --port=INTEGER
Port number (default: 161)
-n, --next
Use SNMP GETNEXT instead of SNMP GET
-P, --protocol=[1|2c|3]
SNMP protocol version
-L, --seclevel=[noAuthNoPriv|authNoPriv|authPriv]
SNMPv3 securityLevel
-a, --authproto=[MD5|SHA]
SNMPv3 auth proto
-C, --community=STRING
Optional community string for SNMP communication
(default is "public")
-U, --secname=USERNAME
SNMPv3 username
-A, --authpassword=PASSWORD
SNMPv3 authentication password
-X, --privpasswd=PASSWORD
SNMPv3 crypt passwd (DES)
-o, --oid=OID(s)
Object identifier(s) or SNMP variables whose value you wish to query
-m, --miblist=STRING
List of MIBS to be loaded (default = none if using numeric oids or
'ALL'
for symbolic oids.)
-d, --delimiter=STRING
Delimiter to use when parsing returned data. Default is "="
Any data on the right hand side of the delimiter is considered
to be the data that should be used in the evaluation.
-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
-s, --string=STRING
Return OK state (for that OID) if STRING is an exact match
-r, --ereg=REGEX
Return OK state (for that OID) if extended regular expression REGEX
matches
-R, --eregi=REGEX
Return OK state (for that OID) if case-insensitive extended REGEX
matches
-l, --label=STRING
Prefix label for output from plugin (default -s 'SNMP')
-u, --units=STRING
Units label(s) for output data (e.g., 'sec.').
-D, --output-delimiter=STRING
Separates output on multiple OID requests
-t, --timeout=INTEGER
Seconds before connection times out (default: 10)
-v, --verbose
Show details for command-line debugging (Nagios may truncate output)
- This plugin uses the 'snmpget' command included with the NET-SNMP
package.
If you don't have the package installed, you will need to download it
from
http://net-snmp.sourceforge.net before you can use this plugin.
- Multiple OIDs may be indicated by a comma- or space-delimited list
(lists with
internal spaces must be quoted) [max 8 OIDs]
- 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.
- When checking multiple OIDs, separate ranges by commas like '-w
1:10,1:,:20'
- Note that only one string and one regex may be checked at present
- All evaluation methods other than PR, STR, and SUBSTR expect that the
value
returned from the SNMP query is an unsigned integer.
Send email to nagios-users at lists.sourceforge.net if you have questions
regarding use of this software. To submit patches or suggest
improvements,
send email to nagiosplug-devel at lists.sourceforge.net
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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