[icinga-devel] clearing & updating icinga_acknowledgements table

Michael Friedrich michael.friedrich at univie.ac.at
Sat Jan 30 02:48:16 CET 2010


Hi,

Bruce Pennypacker wrote:
> I've been digging a bit into how the icinga_acknowledgements table is 
> used since we want to be able to use it for tracking acknowledgments.  
> It appears (after applying the fix for bug #261 is applied) that data is 
> inserted into this table yet it's never cleared even when ido2db is 
> restarted.  At the very least it appears that a call to 
> ndo2db_db_clear_table should be made for this table in 
> ndo2db_handle_processdata where all the other tables are cleared.
I don't really understand why this table should be cleared at ido2db 
restart. Imho this table is related to historical data, not 
config/status which will get deleted at startup. The reason why no 
updates are issued is pretty clear - if you do an acknowledgement, you 
cannot undo that so it will go straight into the neb module and 
therefore into the rdbm.

>
> Also, should acknowledgements be cleared from this table when a 
> host/service returns to an OK state?  I would expect it to but it's not 
> happening and I don't see any code that seems to do it.  Of course I 
> could be missing something since I'm just starting to dig into the code 
> a bit.
IDOUtils only has logic on how to determine and delete old historical 
data and to insert and update new data. but not to determine wether host 
or service changes state and therefore cleans the acknowledgement. 
that's more related to do the db stuff quick and without any state 
checkings.

Regarding your desire to track acknowledgements how are you planning to 
do that - nothing historical? On the other hand you might resolve those 
problems with your own query into the rdbm. Or maybe an API based query 
then.

Besides thanks for reporting another bug and providing all useful 
information on the code. I like that kind of developing :)

#263 is fixed and all yours :)

https://git.icinga.org/index?p=icinga-core.git;a=commit;h=384e1268acb60934d12dbe4c2d482fbd92015d16

Kind regards,
Michael




More information about the icinga-devel mailing list