nagios-db-devel Mailing List for Nagios-DB (Page 7)
Status: Beta
Brought to you by:
bench23
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(62) |
Feb
(9) |
Mar
(27) |
Apr
(9) |
May
(17) |
Jun
|
Jul
(7) |
Aug
(11) |
Sep
(5) |
Oct
|
Nov
(7) |
Dec
|
2006 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Matthew K. <mk...@ma...> - 2005-01-05 05:15:56
|
Would it be possible to have mail sent out with diffs of commits? I find them useful in following development. -- Matthew Kent <mk...@ma...> http://magoazul.com |
From: Ben <be...@si...> - 2005-01-04 23:50:00
|
On Tue, 4 Jan 2005, Matthew Kent wrote: > > Yeah that sounds right. Hope that works. Sorry I can't test first to > confirm, got a few other things to do this afternoon. > > - Matt Not a problem. I just checked in stuff that should do this. At least, it seems to work on my side with minimal testing so far :), with the added bonus that we don't get updates for all hosts we already know about at startup. Good catch, BTW. |
From: Matthew K. <mk...@ma...> - 2005-01-04 18:43:30
|
On Tue, 2005-01-04 at 18:06, Ben wrote: > Well, what I understand sounds like a good solution. Let's see if I > understand it right.... > > 1. On NEB init, start up a database connection and register for > processStart. > > 2. On processStart, parse all the hosts. If they aren't in the database > yet, add them. Refresh all the hostgroups. Register for status events. > > 3. Steadystate remains unchanged. > > Right? > Yeah that sounds right. Hope that works. Sorry I can't test first to confirm, got a few other things to do this afternoon. - Matt > Actually, we're already parsing all the hosts in order to mark the ones > that are currently configured, so this shouldn't be so bad. > > On Tue, 4 Jan 2005, Matthew Kent wrote: > > > On Tue, 2005-01-04 at 17:14, Ben wrote: > > > Ahhhhh..... I understand now. I *knew* I should have checked for insert > > > status. > > > > > > Now, as for the two solutions you proposed, they seem the same, except > > > that the latter includes modifying nagios to not send updates when parsing > > > retention.dat data. Correct? > > > > > > > Almost, my idea was to either solve it only the module in a hackish way > > or just patch nagios directly. > > > > I do have a better idea though. If I recall from my testing processStart > > got triggered after all the data from the retention file was loaded > > (triggering that big wad of updates). So if the neb register callbacks > > for host and status data were moved to the end of processStart, you > > could simply walk the host and service list and the beginning of the > > function and pass the data to processStatus to register. Basically > > ignore the first round of data from nagios loading the retention file > > and do it ourselves. > > > > - Matt > > > > > On Tue, 4 Jan 2005, Matthew Kent wrote: > > > > > > > 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 > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > 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 > > > > > > > > ------------------------------------------------------- > > 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 |
From: Ben <be...@si...> - 2005-01-04 18:06:49
|
Well, what I understand sounds like a good solution. Let's see if I understand it right.... 1. On NEB init, start up a database connection and register for processStart. 2. On processStart, parse all the hosts. If they aren't in the database yet, add them. Refresh all the hostgroups. Register for status events. 3. Steadystate remains unchanged. Right? Actually, we're already parsing all the hosts in order to mark the ones that are currently configured, so this shouldn't be so bad. On Tue, 4 Jan 2005, Matthew Kent wrote: > On Tue, 2005-01-04 at 17:14, Ben wrote: > > Ahhhhh..... I understand now. I *knew* I should have checked for insert > > status. > > > > Now, as for the two solutions you proposed, they seem the same, except > > that the latter includes modifying nagios to not send updates when parsing > > retention.dat data. Correct? > > > > Almost, my idea was to either solve it only the module in a hackish way > or just patch nagios directly. > > I do have a better idea though. If I recall from my testing processStart > got triggered after all the data from the retention file was loaded > (triggering that big wad of updates). So if the neb register callbacks > for host and status data were moved to the end of processStart, you > could simply walk the host and service list and the beginning of the > function and pass the data to processStatus to register. Basically > ignore the first round of data from nagios loading the retention file > and do it ourselves. > > - Matt > > > On Tue, 4 Jan 2005, Matthew Kent wrote: > > > > > 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 > > > > > > > > > > > > ------------------------------------------------------- > > > 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 > > > > ------------------------------------------------------- > 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 > |
From: Matthew K. <mk...@ma...> - 2005-01-04 17:57:50
|
On Tue, 2005-01-04 at 17:14, Ben wrote: > Ahhhhh..... I understand now. I *knew* I should have checked for insert > status. > > Now, as for the two solutions you proposed, they seem the same, except > that the latter includes modifying nagios to not send updates when parsing > retention.dat data. Correct? > Almost, my idea was to either solve it only the module in a hackish way or just patch nagios directly. I do have a better idea though. If I recall from my testing processStart got triggered after all the data from the retention file was loaded (triggering that big wad of updates). So if the neb register callbacks for host and status data were moved to the end of processStart, you could simply walk the host and service list and the beginning of the function and pass the data to processStatus to register. Basically ignore the first round of data from nagios loading the retention file and do it ourselves. - Matt > On Tue, 4 Jan 2005, Matthew Kent wrote: > > > 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 > > > > > > > > ------------------------------------------------------- > > 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 |
From: Ben <be...@si...> - 2005-01-04 17:14:20
|
Ahhhhh..... I understand now. I *knew* I should have checked for insert status. Now, as for the two solutions you proposed, they seem the same, except that the latter includes modifying nagios to not send updates when parsing retention.dat data. Correct? On Tue, 4 Jan 2005, Matthew Kent wrote: > 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 > > > > ------------------------------------------------------- > 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 > |
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 |
From: Ben <be...@si...> - 2005-01-04 15:34:17
|
Before I can speak to the solutions, I don't understand the problem. 1. Why would retention.dat be missing? 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. 4. Every time I restart Nagios, I get an imperial boatload of updates. Then again, I probably have a retention.dat file. 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 |
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 |
From: Ben <be...@si...> - 2004-12-30 19:50:04
|
So I was looking over the historical availability reports I'd created, and realized they were confusing me. I had two of them, Historical Availability by Service, and Historical Availability by Hostgroup. The former would let you get service stats for a given set of services, and the latter would give you host stats for a given set of hostgroups. What I *really* wanted was 4 reports: Host Availability by Hostgroup, Host Availability by Service, Service Availability by Service, and Service Availability by Hostgroup. Host Availability by Hostgroup does just what you'd expect. Host Availability by Service finds all hosts running a given set of services and reports on host availability for those hosts. Instead of grouping hosts by hostgroup, it groups hosts by service. Service Availability by Service does just what you'd expect. Service Availability by Hostgroup reports on all services run by a given set of hostgroups. Grouping is done first by hostgroup, then by service. We plan to use this to compare the services on similar servers running in different regions. Anyway, to get all this stuff to work I had to redo the four availability stored procs and alter some database types. And of course do the necessary web alterations. If nobody has a problem with that, I'll go ahead and check it all in. Going once, going twice..... |