1517 Commits

Author SHA1 Message Date
Alexander A. Klimov
d48144968c Version 2.11.11
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEql0VxA4bnBDSGn4985WONmaH6mMFAmEdLVsACgkQ85WONmaH
 6mPLHxAArGT90S6mKYcTK+H4NE1jBVOclGdqAsEnjPmwiRZo6U+Wc4y2CqZXNbK3
 Dm+LAQ8C8xukOZFz+2jtUuTg40rywb0A2lZt1dm0qmUMNQ7C3z46pd5glsYniXPm
 4qIGV4wHc9/Cnw8CC6gq5dfcRWrsV/BlaJ1OXBYF9tU0fJkIHBaEnKU3tUVe8mCi
 zmlFEL06NxvbVkewB7YAAiHZA7nePYfkC8gt4F/fgo3nDW8xZrjUcJRpa72cAebL
 thmtpCgsmtO1ObVuBFrjoJJ3Y+/+KUL/mZXKfqXbWEvp34OEFappN/b8KaUoNzT0
 PkGSnyH30zgOnnNRmo+q1vWPnFMW5t8GmJzOphg1oA1GUM7H6rXOz3AiJAAOUVBV
 JY6xD/L7kZL3Y0SAvH1Uit72Obu/9KZTU5PDaSDO/oZt0Ww3ZznqxK7WMqIESqBt
 TlBqhuTaLMq3uZeQ4EaSC6v4PgG8ljhw6rf6//fs33TG1w/7M6BiB8Gu68BHt4LD
 B2w/amb+B/46/eOlqdodytCrRQUzh6RGecIWwgyCdMzZgOjk3GDCPHi7DdAb80/v
 ds0LS8L6AirMlE85XJy5fxaskvvKLV5XqcZo5xPIMXlI3zQM0Ni/RSm4KH957Dtw
 L567ZNBjPrD/5+j5/TwjIa269PZFF3APqyVfST4HMGJDEOirPwU=
 =paiQ
 -----END PGP SIGNATURE-----

Merge tag 'v2.11.11' into feature/v1-actions-execute-command-8034-2.11.9

Version 2.11.11

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEql0VxA4bnBDSGn4985WONmaH6mMFAmEdLVsACgkQ85WONmaH
# 6mPLHxAArGT90S6mKYcTK+H4NE1jBVOclGdqAsEnjPmwiRZo6U+Wc4y2CqZXNbK3
# Dm+LAQ8C8xukOZFz+2jtUuTg40rywb0A2lZt1dm0qmUMNQ7C3z46pd5glsYniXPm
# 4qIGV4wHc9/Cnw8CC6gq5dfcRWrsV/BlaJ1OXBYF9tU0fJkIHBaEnKU3tUVe8mCi
# zmlFEL06NxvbVkewB7YAAiHZA7nePYfkC8gt4F/fgo3nDW8xZrjUcJRpa72cAebL
# thmtpCgsmtO1ObVuBFrjoJJ3Y+/+KUL/mZXKfqXbWEvp34OEFappN/b8KaUoNzT0
# PkGSnyH30zgOnnNRmo+q1vWPnFMW5t8GmJzOphg1oA1GUM7H6rXOz3AiJAAOUVBV
# JY6xD/L7kZL3Y0SAvH1Uit72Obu/9KZTU5PDaSDO/oZt0Ww3ZznqxK7WMqIESqBt
# TlBqhuTaLMq3uZeQ4EaSC6v4PgG8ljhw6rf6//fs33TG1w/7M6BiB8Gu68BHt4LD
# B2w/amb+B/46/eOlqdodytCrRQUzh6RGecIWwgyCdMzZgOjk3GDCPHi7DdAb80/v
# ds0LS8L6AirMlE85XJy5fxaskvvKLV5XqcZo5xPIMXlI3zQM0Ni/RSm4KH957Dtw
# L567ZNBjPrD/5+j5/TwjIa269PZFF3APqyVfST4HMGJDEOirPwU=
# =paiQ
# -----END PGP SIGNATURE-----
# gpg: Signatur vom Mi 18 Aug 17:55:07 2021 CEST
# gpg:                mittels RSA-Schlüssel AA5D15C40E1B9C10D21A7E3DF3958E366687EA63
# gpg: Signatur kann nicht geprüft werden: No public key
2023-02-09 10:36:38 +01:00
Alexander A. Klimov
9b1c447339 Version 2.11.9
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE/QahNshZYA8kVY+rcVbnuuF3SgAFAmCvSioACgkQcVbnuuF3
 SgAZbw//c++hPaa4ldpanyP8fCYs3+36TsgheZvFbRmCp/nCzoRG102S3kusUQJB
 R2driSpvnay1mPDlMp7WXNZBg6zpf45K7C98hROis5zdXD3qAR8yXi3EOOfa+ANI
 irPbjVmrZ6gdfKaiI8gi6tc+P1aNjEfs8TZ3F1hp7EAgYwFB9nPlHLbH6n37W1Fc
 dwu3XBtTbTHqZtDPKeq9kQ9pJd20mEzm4boZLidicuJw0g7QllzP2Pzks6jLDplK
 8EhpZ4Vg19LEcefXDm9seVWW6X3BxyXn0AKhvCYTD0ycQ5rdXUeAUjMwcHehq2Yo
 Np2JMdUcI1LD3Q5ZJwhiNraRAI112qWEyeUbyL9XFDuYCgcNpprQgu0j+3sRu3Mk
 5QXMAaFFkTwga+f1VCdKhHFsf3xxTvPi288z71e2QRyOAMsgeQtsfSaJq+WFGeqL
 14tDfq7SQimu27IJSkhFXx554Gu/P64ggYvmFhJ0F/sHDIbaWx+kOpKQX0eULN8P
 VqtiyoG/QlgrdPCOaA5nQnSa8+iaO6hA5boWtjXgSxTx040cwhg0CbYlmpzj8l1G
 MNDhgEprx3sAaCsYlgDczjyKEHDZbn8IQTU8vcSfaGFcSwGF1t8kOTJiGd1UXp2I
 nLuYO+oBlJElOHBgzTn+W6yvgWz5NL9UMwTE9CZOcef0GAUTbbQ=
 =x1Jw
 -----END PGP SIGNATURE-----

Merge tag 'v2.11.9' into feature/v1-actions-execute-command-8034-2.11.9

Version 2.11.9

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE/QahNshZYA8kVY+rcVbnuuF3SgAFAmCvSioACgkQcVbnuuF3
# SgAZbw//c++hPaa4ldpanyP8fCYs3+36TsgheZvFbRmCp/nCzoRG102S3kusUQJB
# R2driSpvnay1mPDlMp7WXNZBg6zpf45K7C98hROis5zdXD3qAR8yXi3EOOfa+ANI
# irPbjVmrZ6gdfKaiI8gi6tc+P1aNjEfs8TZ3F1hp7EAgYwFB9nPlHLbH6n37W1Fc
# dwu3XBtTbTHqZtDPKeq9kQ9pJd20mEzm4boZLidicuJw0g7QllzP2Pzks6jLDplK
# 8EhpZ4Vg19LEcefXDm9seVWW6X3BxyXn0AKhvCYTD0ycQ5rdXUeAUjMwcHehq2Yo
# Np2JMdUcI1LD3Q5ZJwhiNraRAI112qWEyeUbyL9XFDuYCgcNpprQgu0j+3sRu3Mk
# 5QXMAaFFkTwga+f1VCdKhHFsf3xxTvPi288z71e2QRyOAMsgeQtsfSaJq+WFGeqL
# 14tDfq7SQimu27IJSkhFXx554Gu/P64ggYvmFhJ0F/sHDIbaWx+kOpKQX0eULN8P
# VqtiyoG/QlgrdPCOaA5nQnSa8+iaO6hA5boWtjXgSxTx040cwhg0CbYlmpzj8l1G
# MNDhgEprx3sAaCsYlgDczjyKEHDZbn8IQTU8vcSfaGFcSwGF1t8kOTJiGd1UXp2I
# nLuYO+oBlJElOHBgzTn+W6yvgWz5NL9UMwTE9CZOcef0GAUTbbQ=
# =x1Jw
# -----END PGP SIGNATURE-----
# gpg: Signatur vom Do 27 Mai 09:28:42 2021 CEST
# gpg:                mittels RSA-Schlüssel FD06A136C859600F24558FAB7156E7BAE1774A00
# gpg: Signatur kann nicht geprüft werden: No public key
2021-10-22 18:56:08 +02: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 A. Klimov
eb454b8517 Introduce Endpoint#capabilities
refs #8034
2020-11-20 17:41:45 +01:00
Alexander A. Klimov
9d574e7702 Fix missing include
refs #8034
2020-11-20 17:41:08 +01:00
Mattia Codato
c9cc8a7c70 Add timer to clean deadlined executions 2020-11-20 17:40:45 +01:00
Mattia Codato
76007d369f Remove an useless check 2020-11-20 17:38:27 +01:00
Mattia Codato
e4c9616068 Set exit code 126 if endpoint doens't support the new executeCommand API 2020-11-20 17:38:27 +01:00
Mattia Codato
f1f5bb4738 Check child endpoint versions and check child zone can access to the target endpoint 2020-11-20 17:38:27 +01:00
Mattia Codato
85e2f3a479 Check satellites Icinga version before relay the execute command message 2020-11-20 17:38:27 +01:00
Mattia Codato
3516c9c631 Use local zone for update executions 2020-11-20 17:38:27 +01:00
Mattia Codato
1253aa07e4 Change checkable with the endpoint zone for execute command relay message 2020-11-20 17:38:27 +01:00
Mattia Codato
5134eca2ab Forward the execute command through the zones 2020-11-20 17:38:27 +01:00
Mattia Codato
3a105cfe7c Use ExecuteOverride to override the command 2020-11-20 17:38:27 +01:00
Mattia Codato
ba80ebc7cf Fix update execution 2020-11-20 17:38:27 +01:00
Mattia Codato
bb2726a44e Fix macros substitutions 2020-11-20 17:38:27 +01:00
Mattia Codato
dad2a3e786 Notify to all nodes that execution has completed 2020-11-20 17:38:27 +01:00
Mattia Codato
f790b7699d Check if last check result is null before executing the command 2020-11-20 17:38:27 +01:00
Mattia Codato
5467b7aa37 Fix indentation 2020-11-20 17:38:27 +01:00
Mattia Codato
aa2edcb322 Keep consistency with other methods in case of missing API listener 2020-11-20 17:38:27 +01:00
Mattia Codato
3d85492b9a Execute notification command only if there is a source param 2020-11-20 17:38:27 +01:00
Mattia Codato
c019dc9f90 Remove unused key in the execution 2020-11-20 17:38:27 +01:00
Mattia Codato
eb38821869 Remove pending key when the execution is completed 2020-11-20 17:38:27 +01:00
Mattia Codato
9a6646f76f Fix logs 2020-11-20 17:38:27 +01:00
Mattia Codato
d72b9dc138 Fix indentation 2020-11-20 17:38:27 +01:00
Mattia Codato
facf3ff170 Remove arguments from 'throw' inc case of ExecuteEventHandler error 2020-11-20 17:38:27 +01:00
Mattia Codato
58251d1fca Throw an exception in case of error during ExecuteEventHandler if source is not set 2020-11-20 17:38:27 +01:00
Mattia Codato
1f5a92a22d Remove unuseful variables 2020-11-20 17:38:27 +01:00
Mattia Codato
3ce56ac11a Add try catch for ExecuteEventHandler 2020-11-20 17:38:27 +01:00
Mattia Codato
78743098b0 Remove unuseful check result for notification command 2020-11-20 17:38:27 +01:00
Mattia Codato
e6c49fc61d Refactor SendEventExecuteCommand function 2020-11-20 17:38:27 +01:00
Mattia Codato
39583553ed Code refactoring: create sendEventExecuteCommand function 2020-11-20 17:38:27 +01:00
Mattia Codato
d5119b2378 Run ExecutedCommandAPIHandler in case of command not found and if source is set 2020-11-20 17:38:27 +01:00
Mattia Codato
78be7ebafd Unify code to check if command exists 2020-11-20 17:38:27 +01:00