[Nagios-db-devel] retention.dat
Status: Beta
Brought to you by:
bench23
From: Matthew K. <mk...@ma...> - 2005-01-04 07:40:34
|
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 |