Thread: [Nagios-db-devel] Retain State
Status: Beta
Brought to you by:
bench23
From: jl <jla...@em...> - 2005-03-24 15:57:10
|
I've noticed that when nagios resetarts, nagios-db does not retain the current state. I have set nagios to retain state, and verified that it does. This creates some holes of 'unknown' for services that don't report very often. Is there a way to make nagios-db retain state or is that a limitation of nagios? jl |
From: Ben <be...@si...> - 2005-03-24 17:43:42
|
Well, a couple things. First, nagios-db does retain the last state. (In fact, there's really no way not to retain state.) However, it doesn't use it for hosts and doesn't trust it for services. This was intentional. If nagios has to restart, there's no way to know what happened when it was down. Second, there is a big difference between pending and unknown, at least when it comes to services. So.... unlike the nagios CGIs, the nagios-db UI does the most accurate thing it can: it a service had been up before restart, nagios-db marks the host as "up and pending". It still sort counts as up, but it's untrusted, because nagios may well have missed it going down. If this doesn't work for you, why not? On Thu, 24 Mar 2005, jl wrote: > I've noticed that when nagios resetarts, nagios-db does not retain the > current state. I have set nagios to retain state, and verified that it > does. This creates some holes of 'unknown' for services that don't > report very often. Is there a way to make nagios-db retain state or is > that a limitation of nagios? > > jl > > > > ------------------------------------------------------- > This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 > Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows > Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register > by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click > _______________________________________________ > Nagios-db-devel mailing list > Nag...@li... > https://lists.sourceforge.net/lists/listinfo/nagios-db-devel > |
From: jl <jla...@em...> - 2005-03-24 18:01:50
|
I guess I was more looking at services being marked as pending upon a nagios restart. I have a bunch of services that only report back hourly (raid status and freespace as examples) that get marked as pending after a nagios restart. We end up having to restart nagios a fair amount right now because of changes to our network and 'loose' the last state of those services until they report again. Is there a way around this? Sorry if I'm missing something obvious. jl On Mar 24, 2005, at 11:43 AM, Ben wrote: > Well, a couple things. > > First, nagios-db does retain the last state. (In fact, there's really > no > way not to retain state.) However, it doesn't use it for hosts and > doesn't > trust it for services. This was intentional. If nagios has to restart, > there's no way to know what happened when it was down. > > Second, there is a big difference between pending and unknown, at least > when it comes to services. > > So.... unlike the nagios CGIs, the nagios-db UI does the most accurate > thing it can: it a service had been up before restart, nagios-db marks > the > host as "up and pending". It still sort counts as up, but it's > untrusted, > because nagios may well have missed it going down. > > If this doesn't work for you, why not? > > On Thu, 24 Mar 2005, jl wrote: > >> I've noticed that when nagios resetarts, nagios-db does not retain the >> current state. I have set nagios to retain state, and verified that >> it >> does. This creates some holes of 'unknown' for services that don't >> report very often. Is there a way to make nagios-db retain state or >> is >> that a limitation of nagios? >> >> jl >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon >> 2005 >> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest >> Windows >> Embedded(r) & Windows Mobile(tm) platforms, applications & content. >> Register >> by 3/29 & save $300 >> http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click >> _______________________________________________ >> Nagios-db-devel mailing list >> Nag...@li... >> https://lists.sourceforge.net/lists/listinfo/nagios-db-devel >> > > |
From: Ben <be...@si...> - 2005-03-24 18:22:07
|
Hm, actually, come to think of it, I realized that everything I said in my first reply was kinda wrong. So ignore that. :) Here's what nagios-db does. On a restart, all hosts and services are marked as pending. Services will be checked as quickly as specified by max_service_check_spread, and host checks will happen whenever nagios thinks it needs them. Because Nagios doesn't do host checks that often, it most hosts stay pending for quite some time. Nagios-DB strives to be "correct", and so it says a check is pending if it really doesn't know what the status is. So, the short answer is, yes, nagios-db sees the previous state, but at the same time it ignores it. I had imagined that, in most environments, nagios will be run for long periods of time uninterrupted, and balanced the tradeoffs accordingly. If you can't increase max_service_check_spread to something smaller, and if you can't just live with things being pending until they're checked :), then the data is in the database, but you'll have to hack some of the stored procs and the php to mimic the CGI's implementation of state retention. On Thu, 24 Mar 2005, jl wrote: > I guess I was more looking at services being marked as pending upon a > nagios restart. I have a bunch of services that only report back > hourly (raid status and freespace as examples) that get marked as > pending after a nagios restart. We end up having to restart nagios a > fair amount right now because of changes to our network and 'loose' the > last state of those services until they report again. Is there a way > around this? > > Sorry if I'm missing something obvious. > > jl > > > On Mar 24, 2005, at 11:43 AM, Ben wrote: > > > Well, a couple things. > > > > First, nagios-db does retain the last state. (In fact, there's really > > no > > way not to retain state.) However, it doesn't use it for hosts and > > doesn't > > trust it for services. This was intentional. If nagios has to restart, > > there's no way to know what happened when it was down. > > > > Second, there is a big difference between pending and unknown, at least > > when it comes to services. > > > > So.... unlike the nagios CGIs, the nagios-db UI does the most accurate > > thing it can: it a service had been up before restart, nagios-db marks > > the > > host as "up and pending". It still sort counts as up, but it's > > untrusted, > > because nagios may well have missed it going down. > > > > If this doesn't work for you, why not? > > > > On Thu, 24 Mar 2005, jl wrote: > > > >> I've noticed that when nagios resetarts, nagios-db does not retain the > >> current state. I have set nagios to retain state, and verified that > >> it > >> does. This creates some holes of 'unknown' for services that don't > >> report very often. Is there a way to make nagios-db retain state or > >> is > >> that a limitation of nagios? > >> > >> jl > >> > >> > >> > >> ------------------------------------------------------- > >> This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon > >> 2005 > >> Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest > >> Windows > >> Embedded(r) & Windows Mobile(tm) platforms, applications & content. > >> Register > >> by 3/29 & save $300 > >> http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click > >> _______________________________________________ > >> Nagios-db-devel mailing list > >> Nag...@li... > >> https://lists.sourceforge.net/lists/listinfo/nagios-db-devel > >> > > > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Nagios-db-devel mailing list > Nag...@li... > https://lists.sourceforge.net/lists/listinfo/nagios-db-devel > |