Commit Graph

266 Commits

Author SHA1 Message Date
Michael Friedrich 90f102abf3 Ensure that program status updates are immediately updated in DB IDO
fixes #11767
2016-05-11 14:03:40 +02:00
Michael Friedrich ba82d2eb20 Move CalculateExecutionTime and CalculateLatency into the CheckResult class
fixes #11751
2016-05-10 12:16:49 +02:00
Michael Friedrich 23ab6cf78b Fix: Expired downtimes are not removed
fixes #11711
2016-05-02 15:32:46 +02:00
Michael Friedrich 83e0bcddce IDO: Ensure that the notification insert id is passed to contactnotification inserts
We cannot add the notification insert id directly
to the following contactnotifications queries. Instead
we need to pass a DbValue reference which gets set after
the notification insert id is calculated.
The contactnotifications insert queries are fired as query
group calling CanExecuteQuery() and FieldToEscapedString().
If the notification id does not exist yet, the queries are
moved to the end of the queue.
Once the contactnotifications queries are fired the DbValue
reference is destroyed.

This patch also removes the old notification insert id cache
which was broken in many ways.

fixes #11387
2016-03-29 15:12:24 +02:00
Michael Friedrich 98e1d70dab DB IDO: Fix that downtime is not in effect after restart
fixes #10843
2016-03-23 13:42:00 +01:00
Michael Friedrich 67b7df3189 DB IDO: Fix user notification type filters
fixes #10766
2016-03-15 14:50:43 +01:00
Michael Friedrich 5b30c9ed2c DB IDO: PArtially revert change for *group_members
Otherwise the index breaks.

refs #11103
2016-02-22 20:23:18 +01:00
Michael Friedrich 99dbb249de DB IDO: Fix problem with hostgroup_members cleanup
fixes #11103
2016-02-08 11:05:27 +01:00
Michael Friedrich 4049cc0b9a Fix: Deleting an object via API does not disable it in DB IDO
fixes #11065
2016-02-05 12:37:00 +01:00
Gunnar Beutner f234bdd321 Fix crash in IdoCheckTask::ScriptFunc
refs #11014
2016-02-02 12:03:12 +01:00
Michael Friedrich c2cf614d62 Remove debug output, part 2
refs #11014
2016-01-29 14:09:50 +01:00
Michael Friedrich b960850ce3 DB IDO: Only update 'next_check' column when manually scheduling a check
Otherwise the changes from #7287 already take care of setting
the proper next check time from inside ProcessCheckResult().

There is no need to use the generic OnNextCheckChanged signal
but instead we're using a new one, locally just for DB IDO.

fixes #11019
2016-01-22 18:42:15 +01:00
Gunnar Beutner 599929b0f6 Update copyright headers for 2016 2016-01-12 08:29:59 +01:00
Gunnar Beutner 1bf27011df Fix incorrect is_active queries
fixes #10891
2016-01-11 14:23:16 +01:00
Michael Friedrich 9c8fdf06cf Fix crash in DbEvents::RemoveCommentInternal()
Missing multiple queries as implemented with RemoveDowntimeInternal().

fixes #10883
2015-12-18 10:52:04 +01:00
Gunnar Beutner a393c8213e Don't log IDO statistics when we're not connected
refs #10860
2015-12-17 12:09:42 +01:00
Michael Friedrich 6387bec049 Fix duplicate key violation for downtimes
refs #10829
2015-12-16 13:57:29 +01:00
Gunnar Beutner ef8ba6e275 Implement additional query statistics for DB IDO
fixes #10860
2015-12-16 10:46:27 +01:00
Michael Friedrich 5b48559d75 Implement support for re-ordering groups of IDO queries
fixes #10855
2015-12-15 15:29:48 +01:00
Michael Friedrich 96fa29793c Avoid duplicate config and status updates on startup
fixes #10765
2015-12-15 14:25:08 +01:00
Michael Friedrich da3d21091c Fix priority ordering for IDO queries
fixes #10829
refs #8714
2015-12-15 11:58:50 +01:00
Gunnar Beutner 372cf07bc4 Clean up the FinishAsyncQueries code a bit
refs #8714
2015-12-14 10:34:12 +01:00
Gunnar Beutner 15ca9987fa Implement support for priorities in the WorkQueue class
fixes #8714
2015-12-10 17:06:00 +01:00
Michael Friedrich 0813e69a41 Fix DB IDO events for next_check, etc. updates
refs #10817
2015-12-10 15:24:28 +01:00
Michael Friedrich 0285bcefb5 DB IDO: Fix group membership updates for runtime created objects
fixes #10604
2015-11-11 12:31:52 +01:00
Gunnar Beutner e3c75faabc Implement support for recursive object locks
fixes #10596
2015-11-11 10:21:30 +01:00
Michael Friedrich 64c936d387 API Actions: Remove -by-id from actions and require names for comments and downtimes
The documentation is updated as well. Furthermore actions provide
detailed error information in case of an exception.
Includes DB IDO schema updates.

fixes #10512
2015-11-06 17:06:12 +01:00
Michael Friedrich 1b9f0a8c77 Add the unique_id for comments/downtimes next to legacy_id to DB IDO
fixes #10431
2015-10-30 11:25:07 +01:00
Michael Friedrich 9485938d32 Fix: Unique constraint violation with multiple comment inserts in DB IDO
fixes #10491
2015-10-29 16:12:53 +01:00
Michael Friedrich cf5735e3df DB IDO: Remove deleted custom variables
We cannot clear the custom variable tables on startup and then re-insert
all known custom vars. Instead we "fixed" it by leaving them
in the database only updating their value if changed. We certainly
forgot about deleted custom vars at that point.

Since the older fix must stay in place, we'll use a session
token stored in the backend to check whether the custom
variable has been updated/inserted in the current session, or not.
If the session token does not match, the custom vars are deleted
at the end of the config dump. Ugly but fairly the only performant
solution as CVs don't have an object_id.

fixes #10436
2015-10-29 16:00:06 +01:00
Gunnar Beutner 050c520b2a Convert Comment/Downtime to config objects
fixes #9777
2015-10-28 17:56:29 +01:00
Michael Friedrich de8aae90e4 DB IDO: Add object_id where clause for icinga_downtimehistory
fixes #10110
2015-10-28 17:12:23 +01:00
Gunnar Beutner 13375d74fc Fix: Changing a group's attributes causes duplicate rows in the icinga_*group_members table
fixes #10422
2015-10-26 09:36:13 +01:00
Michael Friedrich d618762dad Export original attributes in DB IDO and Livestatus
fixes #10392
2015-10-22 15:49:42 +02:00
Gunnar Beutner 4aa0165701 Add getter for endpoint 'connected' attribute
fixes #10394
2015-10-22 10:52:38 +02:00
Gunnar Beutner d01f09f3ef Hide internal attributes in the API
fixes #10393
2015-10-20 08:25:10 +02:00
Michael Friedrich 498ff3c1ee Add a debug log message for updating the program status table in DB IDO
fixes #10379
2015-10-15 18:43:30 +02:00
Gunnar Beutner 5f98fd3e9a Update schema version in dbconnection.hpp
refs #9286
2015-10-01 17:13:33 +02:00
Michael Friedrich 1813c0932c Remove dead code from old modified attributes
refs #9851
2015-09-29 14:24:39 +02:00
Gunnar Beutner d24af1e639 Fix incorrect value for IdoMysqlConnection::m_AffectedRows
refs #10190
2015-09-28 13:19:42 +02:00
Michael Friedrich 8c997255a9 DB IDO: Fix modified custom attribute update query problems
fixes #10190
2015-09-24 11:45:44 +02:00
Michael Friedrich a6d8cea5c2 Update DB IDO on changed object version (create, update, delete)
refs #9927
2015-09-17 14:20:44 +02:00
Gunnar Beutner 6fa58a520c Implement config object sync
Adds object version.

refs #9927
2015-09-17 14:20:43 +02:00
Michael Friedrich 50cd694142 Fix wrong calculation for host compat state UNREACHABLE
fixes #10058
2015-09-04 13:24:41 +02:00
Gunnar Beutner f45f6ccd82 Implement support for tracking dependencies between config objects
refs #9096
2015-08-25 13:54:05 +02:00
Gunnar Beutner d8cab2f0e8 Add 'override' keyword to methods
refs #9929
2015-08-18 12:45:30 +02:00
Gunnar Beutner d118b71a2a Fix compiler warnings
fixes #9929
2015-08-18 07:46:04 +02:00
Michael Friedrich 020533842b Add missing category for IDO query
fixes #9928
2015-08-17 11:04:14 +02:00
Gunnar Beutner 071d2f18fb Rename DynamicObject/DynamicType to ConfigObject/ConfigType
fixes #9914
2015-08-15 20:40:41 +02:00
Michael Friedrich d7970f5bb1 Implement modified attributes v2
refs #9081
refs #9093
2015-08-15 20:07:10 +02:00