Quoting "Dr. Ed Morbius" <dredmorb...@gmail.com>: > Terry: > > on 23:37 Mon 08 Aug, Terry Carmen (te...@cnysupport.com) wrote: >> Quoting Edward Morbius <dredmorb...@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.
------------------------------------------------------------------------------ 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
_______________________________________________ Nagios-users mailing list Nagios-users@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