check_openmanage: timeout vs. SNMP timeout
Trond Hasle Amundsen
t.h.amundsen at usit.uio.no
Tue Dec 11 20:54:17 CET 2012
Andrew Daugherity <adaugherity at tamu.edu> writes:
>> Please try this version (named 3.7.8-beta2) and let me know if it works
>> around your problem. Usage:
>>
>> check_openmange --snmp-timeout <integer>
>
> I think I fixed my problem (for the time being at least) by restarting
> OMSA on that server. Restarting snmpd didn't solve anything, nor did
> my timeout hack (which just gave me an UNKNOWN status - plugin timeout
> instead of SNMP CRITICAL when it randomly failed). Whenever the check
> failed, it would hang indefinitely, so it was not a case of slow SNMP.
> Thanks for the added option, though; I think someone may find it
> useful.
Yes, I agree. I'll keep it.
> Regarding your fix:
> The timeout option does appear to get passed to SNMP, however the
> actual timeout is twice what is specified. E.g. --snmp=timeout=1, get
> SNMP critical message after 2 seconds; --snmp-timeout=14, SNMP
> critical at 28 seconds; --snmp-timeout=15 or higher, get UNKNOWN:
> PLUGIN TIMEOUT message at 30 seconds. (I used a host without snmpd
> running for the timeout tests.) I can't see anything obviously wrong
> with your code, but it behaves this way both on both SLES 11 SP1 (Perl
> 5.10, net-snmp 5.4.2.1, Net::SNMP 6.0.1) and OS X 10.8 (Perl 5.12.4,
> net-snmp 5.6, Net::SNMP 6.1 [from CPAN]).
Hmm.. kind of confusing. It is due to the fact that Net::SNMP does one
retry (with the same timeout) before it bails out. This is adjustable
with the '-retries' parameter to the SNMP object. The default is 1. If I
set it to 0, the plugin times out in the SNMP object at the specified
time as you would expect. Thanks for pointing this out, I should make a
note of it in the manual page.
> You probably also want to add this option to the help/usage message.
I won't make the help output, as that only covers the most popular
options, but I'll add it to the manual page.
Cheers,
--
Trond H. Amundsen <t.h.amundsen at usit.uio.no>
Center for Information Technology Services, University of Oslo
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
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