[icinga-devel] clearing & updating icinga_acknowledgements table

Michael Friedrich michael.friedrich at univie.ac.at
Mon Feb 8 19:00:35 CET 2010


Hi,

Bruce Pennypacker wrote:
>
> Thanks for the information.  Is there a document somewhere that 
> describes in detail what each table is meant for, what data they're 
> meant to hold, etc?
Currently IDOUtils are coming from original NDOUtils where the table 
design and relationships have been described here:

http://www.scribd.com/doc/17608342/Nagios-NDOUtils-DB-Model

But thanks for the hint we might add extended documentation for idoutils 
then.

>
> My confusion stems from the fact that there is both a comments and a 
> commenthistory table, but just an acknowledgements table that you 
> indicate is for historical data as well.  If, as you're suggesting, the 
> acknowledgements table is meant for historical data only then I'd argue 
> that it should be renamed to something like acknowledgementhistory so 
> that it's clear what's in it.
The attempt with having a live and historical db slows down database 
insertions, currently it's a lot of querying. Maybe we can get a better 
approach when splitting idoutils directly into live data only and 
historical data only.
I know about those problems but it's difficult to fix them in the 
current code base as you might have seen already.
>
> I guess I'm just not clear as to why comments and acknowledgments are 
> being handled so differently in idodb.  When you acknowledge a service 
> problem in Icinga it creates a servicecomment object in status.dat, so 
> that implies that it's just a special type of comment.  In idodb it adds 
> an entry to the acknowlegedments table but I don't see anything show up 
> in either the comments or commenthistory tables.  From what I now 
> understand I believe this is expected behavior.
I don't know that either... I don't want to complain about the origin 
and the gotten code but to improve that. But there are a lot of things 
implying data handling I don't really understand. I'll take them 
currently "as is" because my focus is on oracle support and improved 
query handling.
>
> If I manually add either a service or host comment then I see entries 
> for them appear in both the comments and commenthistory table.
>
> In both cases all the comments (both the service outage acknowledgement 
> and the manually entered ones) are displayed in Icinga on the Comments 
> page.  The type is set to either Acknowledgment or User as expected.
>
> If I then delete the user service/host comments they are deleted from 
> the comments table but the historical data remains in the commenthistory 
> table.
>
> Acknowledgments are removed from status.dat and from the Comments page 
> either when the problem clears or when the user deletes the associated 
> comment just like they can with other comments.  So aside from the fact 
> that an acknowledgment is a special type of comment it behaves virtually 
> identically within Icinga itself.  For that reason I'd argue that they 
> should be cleared from the acknowlegements table as well.  The comments 
> table displays a current snapshot of comments.  The commenthistory table 
> stores a history of all comments.  It seems to me that the 
> acknowledgments table should behave like the comments table, and a new 
> acknowledgementhistory table should be added that maintains a history so 
> that all the processing of both comments and acknowledgments is handled 
> identically.
We might add a housekeeping option in ido2db.cfg and clearing data 
periodically if set to an appropriate value. This implies improved 
housekeeping though - that is something in progress.

Kind regards,
Michael
>
> Hopefully I'm making myself clear here....
>
> Thanks,
>
> -Bruce
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> icinga-devel mailing list
> icinga-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/icinga-devel
>




More information about the icinga-devel mailing list