Alexander A. Klimov
e0a35e3c3c
Checkable#ExecuteEventHandler(): don't outsource event command run twice
...
refs #8704
2022-03-03 16:07:31 +01:00
Julian Brost
58be537557
Merge pull request #8891 from Icinga/bugfix/trigger-fixed-downtimes-immediately-211
...
Downtime#Start(): trigger fixed downtimes immediately instead of waiting for the timer
2021-07-08 15:33:52 +02:00
Alexander Aleksandrovič Klimov
7c4996d1c2
Merge pull request #8878 from Icinga/bugfix/fixed-dt-end-notify-211
...
Checkable::NotifyDowntimeEnd(): don't send Downtime end notification unless triggered
2021-07-07 22:37:04 +02:00
Alexander A. Klimov
05b2606fbb
Checkable::NotifyDowntimeEnd(): don't send Downtime end notification unless triggered
...
... for fixed Downtimes as well.
2021-07-07 15:44:48 +02:00
Alexander A. Klimov
084acbe028
On ScheduledDowntime change: remove future downtimes created before change
...
refs #8309
2021-07-07 15:44:46 +02:00
Alexander A. Klimov
ffa3872b28
On ScheduledDowntime change: ignore downtimes created before change
...
... while creating new downtimes.
refs #8309
2021-07-07 15:44:46 +02:00
Alexander A. Klimov
a262d18921
Introduce Downtime#config_owner_hash
...
refs #8309
2021-07-07 15:44:46 +02:00
Alexander A. Klimov
743af40114
ScheduledDowntime: ignore not related Downtimes while creating Downtimes
2021-07-07 15:44:46 +02:00
Alexander A. Klimov
4216ed018c
Downtime#Start(): trigger fixed downtimes immediately instead of waiting for the timer
...
... not to cause e.g. notifications if a problem occurs
between the downtime start time and the timer routine.
2021-07-07 15:34:04 +02:00
Noah Hilverling
f444d1e4f9
ScheduledDowntime::TimerProc(): Catch exceptions to make sure other downtimes are still created
2021-07-06 12:27:57 +02:00
Alexander Aleksandrovič Klimov
a18a2e3813
Merge pull request #8772 from Icinga/bugfix/problem-notification-at-downtime-end-2.11
...
Send problem notifications after downtime end for checkables in child zones (2.11)
2021-05-26 13:41:41 +02:00
Alexander Aleksandrovič Klimov
031f379051
Merge pull request #8780 from Icinga/bugfix/concurent-notification-send-and-delete-2.11
...
Fix crash when notifications are sent while the notification object is deleted (2.11)
2021-05-26 13:36:18 +02:00
Julian Brost
77427bedae
AddDowntime: return Downtime::Ptr instead of String containing the name
...
At numerous places in the code, something like this is performed:
String name = Downtime::AddDowntime(...);
Downtime::Ptr downtime = Downtime::GetByName(name);
However, `downtime` can be a `nullptr` after this as it is possible that
the downtime is deleted in between.
This commit changes the return type of `Downtime::AddDowntime` to return
a Downtime::Ptr instead of the full name of the downtime. `AddDowntime`
performs the very same `GetByName()` operation internally, but handles
the `nullptr` case correctly and throws an exception.
2021-05-26 08:54:01 +02:00
Julian Brost
5b5efab847
Properly handle service downtime referencing a deleted host
...
Only two out of three cases were handled properly by the code: host
downtimes referencing a deleted host and service downtimes referencing a
deleted service worked fine. However, if a service downtime references a
deleted host, `Host::GetByName()` returns `nullptr` which isn't
accounted for. Use `Service::GetByNamePair()` instead as this performs a
check for the host being null internally.
2021-05-26 08:54:01 +02:00
Julian Brost
9060264c64
Use reference-counted pointer in notification callback
...
`this` could be deleted after `Notification::BeginExecuteNotification`
exited and before `Notification::ExecuteNotificationHelper` finished.
This is fixed by constructing a `Notification::Ptr` and operate on that
one as it is properly reference-counted.
2021-05-26 08:53:33 +02:00
Julian Brost
7511a5c3fc
Only handle event::SetSuppressed{Notifications,NotificationTypes} within the local zone
...
Note that even when passing `nullptr` as target zone to `RelayMessage()`, the
cluster message will still be sent to the parent zone. These incoming messages
will now be rejected by the parent nodes. At the moment, there's no way to only
send within the local zone.
2021-05-26 08:52:05 +02:00
Alexander A. Klimov
4b0313d3f3
On recovery: re-check children
2020-12-11 16:40:29 +01:00
Alexander A. Klimov
3c15e71e19
Don't fire suppressed notifications if last parent recovery >= last check result
2020-12-11 16:40:29 +01:00
Alexander Aleksandrovič Klimov
b5123e3c25
Merge pull request #8226 from Icinga/bugfix/downtime-checkable-getname
...
Check !!downtime->GetCheckable() before downtime->GetCheckable()->GetName()
2020-09-11 16:44:02 +02:00
Alexander A. Klimov
8b0ba2275a
Check !!downtime->GetCheckable() before downtime->GetCheckable()->GetName()
...
... not to crash while removing a downtime from a disappeared checkable.
2020-09-11 14:47:46 +02:00
Noah Hilverling
949da2bc6b
Merge pull request #8043 from Icinga/bugfix/unify-application-start-times-v2114
...
Fix timing point for Application::GetStartTime() (related to command endpoint grace period)
2020-06-09 14:04:07 +02:00
Michael Friedrich
18fdc1457a
Unify Application::GetStartTime() and drop GetMainTime()
...
This essentially moves the start time into the scope when main
starts to "do something", after the reload and configuration handling
is done.
2020-06-03 16:25:53 +02:00
Michael Friedrich
4878daff44
Introduce Application::GetUptime()
2020-06-03 16:21:01 +02:00
Alexander A. Klimov
18c1f1c4e5
Revert "Add NotificationResult class"
...
This reverts commit 9621fd2e4bc337befb46a4c885d80ccfce95f5ab.
2020-02-19 11:00:56 +01:00
Alexander A. Klimov
1183010b45
Revert "Add OnNewNotificationResult signal and ProcessNotificationResult handler"
...
This reverts commit ac483f2a8a07e4962068408d18b10a17204b6454.
2020-02-19 11:00:47 +01:00
Alexander A. Klimov
685ac2f6d7
Revert "Implement last_notification_result handling for Notification objects"
...
This reverts commit 1706b297a50aceafdbbfe8ed8d46c8d01c114464.
2020-02-19 10:59:07 +01:00
Alexander A. Klimov
e79e350740
Revert "Make NotificationResult available for events: Cluster and Features"
...
This reverts commit 566e59bbfa385ec1a023c32a1feb895791950032.
2020-02-19 10:59:00 +01:00
Alexander A. Klimov
f2474e2dc6
Revert "Fix license headers"
...
This reverts commit 48b3d25ce2ea9c6b48115f4bed2f9ac90a748c70.
2020-02-19 10:58:42 +01:00
Michael Friedrich
617f1d1333
Improve error message for command endpoint checkable's requiring a zone
...
fixes #7514
2019-09-23 09:41:08 +02:00
Michael Friedrich
55d7da30ca
Metrics: Expose problem/handled counts for hosts/services
...
With the addition of problem/handled as checkable runtime
attributes in #7096 we should also expose them via CIB
into
- icinga check
- /v1/status/CIB
- IcingaApplication runtime macros
This originates from a request by @phil-or at the recent
Icinga meetup in Linz.
2019-08-29 17:04:23 +02:00
Alexander A. Klimov
efc7f2cf8d
Correct current_concurrent_checks to actually running checks
...
refs #7416
2019-08-15 13:39:01 +02:00
Alexander A. Klimov
448a991404
Expose metric current_pending_callbacks
2019-08-14 17:22:27 +02:00
Michael Friedrich
59081c4f82
Merge pull request #7400 from Icinga/bugfix/cib-stats-concurrent-checks
...
Fix missing stats for current_concurrent_checks via REST API
2019-08-06 15:25:44 +02:00
Michael Friedrich
550a92f077
Fix missing stats for current_concurrent_checks via REST API
...
It was added inside the 'icinga' check task, but not for the REST API.
Thanks for asking, @Thomas-Gelf
2019-08-06 14:51:10 +02:00
Michael Friedrich
743dcad35d
Improve logging for downtime/ack events (add, remove, expire)
...
fixes #7374
2019-08-06 13:28:58 +02:00
Michael Friedrich
f58d1ef7f7
Revert "API: Improve error handling for 'schedule-downtime' action"
...
This reverts commit 8ca38302fceeb05f99c703e1e66b234de996cbd5.
2019-08-01 14:03:44 +02:00
Michael Friedrich
8f3a1335dc
Revert "API: Don't be so strict with the downtime start_time"
...
This reverts commit 3b7cf5b9b55f2dfa933b0e5e89bc1285794f21a7.
2019-08-01 14:03:40 +02:00
Michael Friedrich
8098f4d54d
Improve type logging for notifications
2019-07-16 13:46:16 +02:00
Alexander A. Klimov
b95e92ea5f
Stash notifications until object authority has been updated once
...
refs #7086
2019-07-11 13:07:50 +02:00
Michael Friedrich
60661eaecb
Merge pull request #7270 from Icinga/feature/notification-after-downtime-ends-5919
...
Re-send suppressed notifications
2019-07-11 10:46:59 +02:00
Michael Friedrich
a3c6797310
Fix compiler warnings and style
2019-07-10 11:51:58 +02:00
Alexander A. Klimov
ffa7b749cb
Wait until the next check result if it's expected to arrive soon before re-sending a suppressed notification
...
refs #5919
2019-07-09 16:38:50 +02:00
Alexander A. Klimov
ed56fa34dc
Re-send suppressed notifications
...
refs #5919
2019-07-09 16:38:50 +02:00
Michael Friedrich
88e5d8c47a
TimePeriod: Fully support and test "day -X" notation
...
Previously no tests would have detected if this really worked or not.
2019-07-09 16:21:07 +02:00
Michael Friedrich
0dc87668d6
Fix parsing of "day -X (last day of month)" in TimePeriod class
2019-07-09 16:16:43 +02:00
Michael Friedrich
7665143afa
Tests: Rewrite TimePeriod tests using Boost::DateTime
...
fixes #7257
2019-07-09 15:34:07 +02:00
Michael Friedrich
fdaab4b420
Merge pull request #7287 from Icinga/bugfix/script-debugger-crash-7284
...
Service: don't rely on the own host being already set during derivative state calculation
2019-07-08 09:31:15 +02:00
Alexander A. Klimov
3824b03913
Service: don't rely on the own host being already set during derivative state calculation
...
refs #7284
2019-07-04 16:14:40 +02:00
Michael Friedrich
3b7cf5b9b5
API: Don't be so strict with the downtime start_time
...
There may be a slight overlap between the actual request
time and 'now'.
refs #7271
2019-07-02 15:13:36 +02:00
Michael Friedrich
8ca38302fc
API: Improve error handling for 'schedule-downtime' action
2019-07-02 11:15:43 +02:00