check_http with multiple outcomes?

Terry Carmen terry at cnysupport.com
Tue Aug 9 18:42:46 CEST 2011


Quoting "Dr. Ed Morbius" <dredmorbius at gmail.com>:

> Terry:
>
> on 23:37 Mon 08 Aug, Terry Carmen (terry at cnysupport.com) wrote:
>> Quoting Edward Morbius <dredmorbius at gmail.com>:
>> >
>> > When some things are going well and others aren't fully up to speed (slow
>> > database), we'll get a "DATABASE_TEST_RAN_LONG", which isn't ideal, but at
>> > least for a few occurances (n <= 5) we can live with.  In particular, we
>> > DON'T want a single result sounding off pagers in the middle of the night.
>>
>> You can specify -e "OK,DATABASE_TEST_RAN_LONG", then let the plugin
>> decide if it's slow or not, with the -w,  -c and -t  parameters.
>>
>> Terry
>
> Thanks.
>
> I'd considered that. It doesn't quite match what we want to test.  I'm
> thinking we may need to have a few different tests, possibly related to
> one another.
>
> If there's a 4xx/5xx error, it's a hard fail.
>
> If there's no 4xx/5xx error, but we get the "DATABASE_TEST_RAN_LONG"
> result, it's a soft fail, turning hard on 6 repeats.  That string
> appears in our application, it's not a nagios-determined slowness.
> Alternately, we might want to have a separate test for DB performance
> (there may well be, I'm still digging through rules and tests).
>
> If there's an "OK" result, there's no error.
>
>
> The 4xx/5xx errors are exclusive of the other two possible results. If
> there's no 4xx/5xx error, we've got the option of either of the other
> two conditions.
>
> So: is this a three-check test?  How would I set precedence among them?

You can actually completely ignore the DATABASE_TEST_RAN_LONG result and let the plugin decide if it ran long or not. That's part of it's design. The plugin also handles the 4xx and 5xx errors. 

However if you insist on using the DATABASE_TEST_RAN_LONG result to determine if the server is happy, then you'll need to modify the plugin to catch the string and interpret it as a WARNING OR CRITICAL as appropriate. Nagios won't notify on it until it happens several times in a row, depending on your specific settings.

Unless I'm misunderstanding something, The only result that matters is "OK" because everything else is "Not OK", regardless of whether it's a performance issue, an access issue or a server failure. I believe you're unnecessarily complicating the test.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110809/cd9429ea/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
-------------- 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