Re: [Nagios-db-devel] retention.dat
Status: Beta
Brought to you by:
bench23
From: Matthew K. <mk...@ma...> - 2005-01-04 16:22:02
|
On Tue, 2005-01-04 at 15:34, Ben wrote: > Before I can speak to the solutions, I don't understand the problem. > > 1. Why would retention.dat be missing? On a new install, server move or after wiping cached data in var/. > 2. Hostgroup membership is determined by walking the hostgroup config > object in memory. > 3. It's true that if nagios is told to re-read its config, it might not > re-initialize the NEB, which might be a problem for us. On the other > hand, it might not, because we re-read the config stuff after > initialization but before steady state. Sorry for the confusion here, I mean if you add a new host or service to the config and restart nagios the corresponding hostgroup_membership insert will fail for this new host or service as it will not be registered in the host/service tables until the first check is made. Of course you could wait x minutes until the retention file is saved and restart nagios again so the config data will be right, but that's not much of a solution. > 4. Every time I restart Nagios, I get an imperial boatload of updates. > Then again, I probably have a retention.dat file. > Yeah wipe the retention file and try it to see what I mean :) - Matt > On Jan 3, 2005, at 9:40 PM, Matthew Kent wrote: > > > I've been working on the last bits of my MySQL neb module have just > > noticed a rather basic issue for both modules that hasn't cropped up > > till now. > > > > It seems that without the retention.dat file nagios doesn't feed the > > big > > lump of host/service data into the module on startup. Now logically > > this > > makes sense but causes a bit of a problem when there's hostgroup > > memberships to insert into the db that depend on those entries getting > > loaded at startup. This also messes up adding a host to nagios and > > restarting it as again the host won't be in the db until its first > > checks are finished breaking the hostgroup data. > > > > As for possible solutions, looping through the lists of hosts and > > services in processStart and registering them in the db is a > > possibility. But if the retention file already exists your doing twice > > the work since nagios will still send all the broker calls, and I'm not > > sure of a way to detect this in processStatus to skip those entries. > > > > Another (and I think better) option would be to submit a patch request > > to Ethan to have Nagios stop sending event broker updates when reading > > retention.dat and simply have it loop through both host and service > > lists after reading it (whether it exists or not) and send all the data > > at every startup. > > > > Thoughts? Am I missing something obvious... > > -- > > Matthew Kent <mk...@ma...> > > http://magoazul.com > > > > > > > > ------------------------------------------------------- > > The SF.Net email is sponsored by: Beat the post-holiday blues > > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > > _______________________________________________ > > Nagios-db-devel mailing list > > Nag...@li... > > https://lists.sourceforge.net/lists/listinfo/nagios-db-devel > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Nagios-db-devel mailing list > Nag...@li... > https://lists.sourceforge.net/lists/listinfo/nagios-db-devel |