Commit Graph

431 Commits

Author SHA1 Message Date
Noah Hilverling 15786baf3d IDO: Use own transaction for programstatus 2021-05-19 17:26:32 +02:00
Alexander Aleksandrovič Klimov ef8619f76b
Merge pull request #8601 from Icinga/feature/replace-std-boost-bind-with-lambdas-7006
Feature: Replace std/boost::bind() with lambdas
2021-03-18 17:56:13 +01:00
Yonas Habteab 43ba2da39c Replace std/boost::bind() function with lambda expression 2021-03-10 16:29:40 +01:00
Alexander Aleksandrovič Klimov aa0baf6f69
Merge pull request #8099 from Icinga/feature/std-mutex
Use std::mutex, not boost::mutex
2021-02-04 10:19:04 +01:00
Alexander A. Klimov c3388e9af6 Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
Yonas Habteab 3e5dfa9607 IdoCheckTask: Don't override checkable critical with warn state 2021-01-27 13:27:14 +01:00
Alexander A. Klimov fa61711c21 Introduce ReportIdoCheck()
... for code deduplication

refs #8034
2020-11-23 16:40:32 +01:00
Alexander A. Klimov 0ad1ab20aa Fix code style
refs #8034
2020-11-23 16:39:24 +01:00
Alexander A. Klimov bb851b0558 Merge branch 'master' into feature/v1-actions-execute-command-8034 2020-10-28 18:37:08 +01:00
Noah Hilverling 03af068302 IDO: Make sure to insert program status during reconnect() 2020-10-16 12:30:57 +02:00
Noah Hilverling 8db82ff87d IDO: Do not log stats, if paused 2020-10-15 10:48:41 +02:00
Alexander Aleksandrovič Klimov 79210a5542
Merge pull request #8367 from Icinga/bugfix/ido-hash-groups
*DbObject#CalculateConfigHash(): sort groups to be hashed
2020-10-14 16:23:24 +02:00
Alexander Aleksandrovič Klimov 28f1f70321
Merge pull request #8326 from Icinga/bugfix/do-not-update-customvar-status-on-heavy-config-update
Do not upsert customvar status on heavy config update
2020-10-14 11:00:29 +02:00
Alexander A. Klimov cb00a7fd6a *DbObject#CalculateConfigHash(): sort groups to be hashed
... to ensure consistent hashes across config reloads.

This will likely cause a heavy update once for all objects in >1 group,
but it will ensure that this happens the last time.
2020-10-13 13:47:49 +02:00
Noah Hilverling 04fc0014ce IDO-Logging: Increase logging threshold for nearly empty queue 2020-10-13 09:15:20 +02:00
Noah Hilverling d377996176 IDO-Logging: Don't log when not connected 2020-10-13 09:15:14 +02:00
Noah Hilverling 82c4d58d14 IDO-Logging: Remove useless ETA 2020-10-13 09:15:09 +02:00
Noah Hilverling be3eb0821a IDO-Logging: Add log timeout to log every 5 minutes 2020-10-13 09:15:03 +02:00
Noah Hilverling 22c14fd964 IDO: Always insert customvar status on heavy config update 2020-10-13 08:54:58 +02:00
Henrik Triem 7a759a6427 IDO: Implement more accurate logging for query stats 2020-09-22 13:44:02 +02:00
Mattia Codato 80dc908fca Use ExecuteCommand::ExecuteOverride also for ido check 2020-08-13 09:26:19 +02:00
Michael Friedrich d242b41704 Revert "Make NotificationResult available for events: Cluster and Features"
This reverts commit 566e59bbfa.
2020-01-07 14:20:59 +01:00
Alexander A. Klimov 829d07aefe Introduce Checkable#acknowledgement_last_change
refs #7689
2019-12-10 10:44:23 +01:00
Michael Friedrich 8098f4d54d Improve type logging for notifications 2019-07-16 13:46:16 +02:00
Michael Friedrich e659f8d2e1 DB IDO: Fix possible crash with program status updates before IcingaApplication is loaded 2019-07-11 16:06:27 +02:00
Michael Friedrich 5553438249 DB IDO: Use cached reachable state
fixes #6844
2019-05-07 13:47:09 +02:00
Michael Friedrich 78e24c53f1 DB IDO: Do not deactivate objects during application reload/restart
This follows the same principle as with the shutdown handler,
and was introduced with the changed reload handling with 2.9.
Previously IsShuttingDown() was sufficient which got set at one
location.

SigUsr2 as handler introduced a new location where m_ShuttingDown
is not necessarily set yet. Since this handler gets called when
l_Restarting is enabled, we'll use this flag to avoid config update
events resulting in object deactivation (object->IsActive() always
returns false).

refs #5996
refs #6691
refs #6970

fixes #7125
2019-05-03 15:40:48 +02:00
Michael Friedrich a630d0185f
Merge pull request #6722 from Icinga/feature/notification-result
Add notification result store/sync
2019-04-25 15:56:14 +02:00
Michael Friedrich 2913291a17 ido Check: Add last failover timestamp to output when HA enabled IDO is running 2019-04-01 09:31:03 +02:00
Michael Friedrich 149f640fd8 Improve DB IDO HA failover behaviour
- Decrease Object Authority updates to 10s (was 30s)
- Decrease failover timeout to 30s (was 60s)
- Decrease cold startup (after (re)start) with no OA updates to 30s (was 60s)
- Immediately connect on Resume()
- Fix query priority which got broken with #6970
- Add more logging when a failover is in progress

```
[2019-03-29 16:13:53 +0100] information/IdoMysqlConnection: Last update by endpoint 'master1' was 8.33246s ago (< failover timeout of 30s). Retrying.

[2019-03-29 16:14:23 +0100] information/IdoMysqlConnection: Last update by endpoint 'master1' was 38.3288s ago. Taking over 'ido-mysql' in HA zone 'master'.
```

- Add more logging for reconnect and disconnect handling
- Add 'last_failover' attribute to IDO*Connection objects

refs #6970
2019-04-01 08:50:00 +02:00
Michael Friedrich 566e59bbfa Make NotificationResult available for events: Cluster and Features 2019-03-28 11:42:28 +01:00
Michael Friedrich e2df11520e
Merge pull request #6970 from Icinga/bugfix/perfdata-gaps
Improve reload handling for features (metric & queue flush, activation priority)
2019-02-26 15:38:15 +01:00
Michael Friedrich 458f997a18 Replace Copyright header with a short version, part II 2019-02-25 15:09:36 +01:00
Michael Friedrich d14a88235d Replace Copyright header with a short version, part I
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich 1bfe756cb1 DB IDO: Improve queue handling on Pause/Shutdown/Reload 2019-02-20 17:10:46 +01:00
Michael Friedrich 108b85427c Silence the debug log a bit for IDO events
They're actually not processed when the feature is paused,
and I have already seen them in user's logs when analysing why
objects are not updated or notifications sent. 'DbEvents' isn't
related to rather 'DB IDO' and is confusing.
2018-10-24 16:01:57 +02:00
Michael Friedrich eabea68c56 icinga.com: Update config files (ITL, etc.) 2018-10-18 09:37:59 +02:00
Michael Friedrich dea5ec614e icinga.com: Update CMakeLists.txt 2018-10-18 09:35:18 +02:00
Michael Friedrich 44c3b83769 icinga.com: Update '*.ti' 2018-10-18 09:30:00 +02:00
Michael Friedrich dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Michael Friedrich c0c17fc340 Remove unused timestamp function in DB IDO
refs #6584
2018-09-17 10:06:30 +02:00
Gunnar Beutner 10d6f70a85 Move constants and functions into different namespaces 2018-08-13 13:44:31 +02:00
Gunnar Beutner 1a8692d972 Implement support for namespaces 2018-08-13 13:44:31 +02:00
Gunnar Beutner d9c0b6f806 Refactor REGISTER_SCRIPTFUNCTION_* macros 2018-08-13 13:44:31 +02:00
Jean Flach 1da6b2c883 Fix whitespaces in CMakeLists files
Uses 2 space indentation as standard
2018-01-19 09:19:40 +01:00
Gunnar Beutner 9d436605f0 Fix compatibility with CMake < 3.1 2018-01-18 15:12:46 +01:00
Michael Friedrich a83ad4b7f2 Explicitly pass 1 or 0 for notification filters in DB IDO 2018-01-17 13:38:48 +01:00
Gunnar Beutner 2a9dceb367 Use CMake object libraries for our libs 2018-01-17 04:28:21 +01:00
Gunnar Beutner c2fb9fe226 Use initializer lists for arrays and dictionaries 2018-01-16 12:27:44 +01:00
Michael Friedrich 0201f8ff64 Add query thresholds for the 'ido' check: Rate and pending queries
fixes #3924
2018-01-15 16:38:15 +01:00