On Tue, 21 Mar 2006 11:36:55 +1100, "Matthew Joyce" <[EMAIL PROTECTED]> wrote: > Hi all, > > This is driving me nuts, I really needs some help. > I'm trying to monitor some hardware statuses via SNMP. > Ok, I use SNMP to query about 95% of the "things" I monitor under Nagios. It works like a champ, and is one of the best ways to monitor things, IMHO.
> As a reference I'm using this FAQ entry > http://www.nagios.org/faqs/viewfaq.php?faq_id=208 Ok. Have you actually DONE what this FAQ suggests? It says: "check_snmp returns a WARNING if the local net-snmp or ucd-snmp installation has MIB files with incorrect syntax." "Solutions: 1. Prevent check_snmp from loading the MIBs (default behaviour) by using numeric oids AND using the "-m :" option" Yet, none of your examples show you using "-m :" as an option. Have you tried actually adding "-m :" as an option like the FAQ says to do to see if the WARNING goes away, or if you get any different results? Show us. and "2. run the snmpget command on the command line, check which MIB files is the problem, and correct it" Here again, I don't see anywhere that you've actually tried to just directly run snmpget like the FAQ suggests, you're just running different variations of check_snmp. Show us what snmpget says. If you're going to read an FAQ, try actually using the information it presents. Now, if you've actually TRIED solutions 1 and 2, and neither has solved the problem (it's not clear that you have tried them, let alone that they haven't succeeded), there's a couple of other possibilities. > And this WIKI entry > http://www.nagiosexchange.org/Wiki_Home.wiki.0.html?&tx_drwiki_pi1[keywo > rd]=Dell%20OpenManage%20status%20OIDs > > I can query the server in a number of ways... > > command : ./check_snmp -H server -C foo -o > .1.3.6.1.4.1.674.10892.1.200.10.1.9.1 -w 4:4 -c 5:6 > Result : SNMP WARNING - ok(3) > From this, it looks like you're trying to treat return values of 0-3 as "ok", 4 as "warning" and 5-6 as critical. Pay close attention to the output of "./check_snmp --help", especially this part: -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 The "not" in these instructions is very important. With the above parameters, a 3 would fall outside both the Warning and Critical ranges, so you won't get an OK. You should, however, be getting a CRITICAL, since a CRITICAL overrides a WARNING. The fact that you're getting WARNING, suggests that you really DO have the problem mentioned in the FAQ and that you haven't actually corrected it through one of the two provided solutions. Anyway, the CORRECT syntax to accomplish what you want to accomplish is: ./check_snmp -H server -C foo -o .1.3.6.1.4.1.674.10892.1.200.10.1.9.1 -w 0:3 -c 0:4 Or, you could do it as: ./check_snmp -H server -C foo -o .1.3.6.1.4.1.674.10892.1.200.10.1.9.1 -w 6:4 -c 6:5 The second version will work because of how ranges work. Also from ./check_snmp --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 specified in the order 'max:min' a non-OK state will be returned if the result is within the (inclusive) range. > How do I get this command to work, it really very fraustrating ? FIRST and FOREMOST, make sure your snmpget isn't throwing a MIB error. Actually DO what the FAQ says, SHOW that you've done it, and SHOW what the results were. > Am I missing something fundamental about this command ? > It appears that you missed the 'min:max' vs. 'max:min' thing on the ranges, but 1) that's a common oversight, and 2) it doesn't appear to be the real reason you're getting nothing but warnings. Hopefully that helps get you on the right track. -- James Noyes ([EMAIL PROTECTED]) ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Nagios-users mailing list [email protected] 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
