[pkg-nagios-changes] [Git][nagios-team/pkg-icinga2][upstream] New upstream version 2.11.3

Bas Couwenberg gitlab at salsa.debian.org
Tue Mar 3 13:06:21 GMT 2020



Bas Couwenberg pushed to branch upstream at Debian Nagios Maintainer Group / pkg-icinga2


Commits:
8404425e by Bas Couwenberg at 2020-03-03T11:51:09+01:00
New upstream version 2.11.3
- - - - -


26 changed files:

- VERSION
- doc/02-installation.md
- doc/08-advanced-topics.md
- lib/base/io-engine.hpp
- lib/compat/compatlogger.cpp
- lib/compat/compatlogger.hpp
- lib/db_ido/dbevents.cpp
- lib/db_ido/dbevents.hpp
- lib/icinga/CMakeLists.txt
- lib/icinga/checkable-notification.cpp
- lib/icinga/checkable.hpp
- lib/icinga/clusterevents.cpp
- lib/icinga/clusterevents.hpp
- lib/icinga/notification.cpp
- lib/icinga/notification.hpp
- lib/icinga/notification.ti
- lib/icinga/notificationcommand.cpp
- lib/icinga/notificationcommand.hpp
- − lib/icinga/notificationresult.cpp
- − lib/icinga/notificationresult.hpp
- − lib/icinga/notificationresult.ti
- lib/methods/pluginnotificationtask.cpp
- lib/methods/pluginnotificationtask.hpp
- lib/perfdata/gelfwriter.cpp
- lib/perfdata/gelfwriter.hpp
- lib/remote/jsonrpcconnection.cpp


Changes:

=====================================
VERSION
=====================================
@@ -1,2 +1,2 @@
-Version: 2.11.2
+Version: 2.11.3
 Revision: 1


=====================================
doc/02-installation.md
=====================================
@@ -118,6 +118,12 @@ apt-get update
 
 #### RHEL/CentOS/Fedora Repositories <a id="package-repositories-rhel-centos-fedora"></a>
 
+RHEL/CentOS 8:
+
+```
+dnf install https://packages.icinga.com/epel/icinga-rpm-release-8-latest.noarch.rpm
+```
+
 RHEL/CentOS 7:
 
 ```
@@ -130,10 +136,10 @@ RHEL/CentOS 6 x64:
 yum install https://packages.icinga.com/epel/icinga-rpm-release-6-latest.noarch.rpm
 ```
 
-Fedora 29:
+Fedora 31:
 
 ```
-dnf install https://packages.icinga.com/fedora/icinga-rpm-release-29-latest.noarch.rpm
+dnf install https://packages.icinga.com/fedora/icinga-rpm-release-31-latest.noarch.rpm
 ```
 
 ##### RHEL/CentOS EPEL Repository <a id="package-repositories-rhel-epel"></a>
@@ -141,14 +147,34 @@ dnf install https://packages.icinga.com/fedora/icinga-rpm-release-29-latest.noar
 The packages for RHEL/CentOS depend on other packages which are distributed
 as part of the [EPEL repository](https://fedoraproject.org/wiki/EPEL).
 
+CentOS 8 additionally needs the PowerTools repository for EPEL:
+
+```
+dnf install 'dnf-command(config-manager)'
+dnf config-manager --set-enabled PowerTools
+
+dnf install epel-release
+```
+
 CentOS 7/6:
 
 ```
 yum install epel-release
 ```
 
-If you are using RHEL you need to enable the `optional` repository and then install
-the [EPEL rpm package](https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F).
+If you are using RHEL you need to additionally enable the `optional` and `codeready-builder`
+repository before installing the [EPEL rpm package](https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F).
+
+RHEL 8:
+
+```
+ARCH=$( /bin/arch )
+
+subscription-manager repos --enable rhel-8-server-optional-rpms
+subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
+
+dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
+```
 
 ```
 subscription-manager repos --enable rhel-7-server-optional-rpms
@@ -181,8 +207,6 @@ zypper ref
 
 #### Alpine Linux Repositories <a id="package-repositories-alpine"></a>
 
-Alpine Linux:
-
 ```
 echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
 echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
@@ -206,7 +230,15 @@ Debian/Ubuntu:
 apt-get install icinga2
 ```
 
-RHEL/CentOS 7 and Fedora:
+RHEL/CentOS 8 and Fedora:
+
+```
+dnf install icinga2
+systemctl enable icinga2
+systemctl start icinga2
+```
+
+RHEL/CentOS 7:
 
 ```
 yum install icinga2
@@ -240,65 +272,6 @@ Alpine Linux:
 apk add icinga2
 ```
 
-### Enabled Features during Installation <a id="installation-enabled-features"></a>
-
-The default installation will enable three features required for a basic
-Icinga 2 installation:
-
-* `checker` for executing checks
-* `notification` for sending notifications
-* `mainlog` for writing the `icinga2.log` file
-
-You can verify that by calling `icinga2 feature list`
-[CLI command](11-cli-commands.md#cli-command-feature) to see which features are
-enabled and disabled.
-
-```
-# icinga2 feature list
-Disabled features: api command compatlog debuglog gelf graphite icingastatus ido-mysql ido-pgsql influxdb livestatus opentsdb perfdata statusdata syslog
-Enabled features: checker mainlog notification
-```
-
-### Installation Paths <a id="installation-paths"></a>
-
-By default Icinga 2 uses the following files and directories:
-
-  Path                                		| Description
-  ----------------------------------------------|------------------------------------
-  /etc/icinga2                        		| Contains Icinga 2 configuration files.
-  /usr/lib/systemd/system/icinga2.service 	| The Icinga 2 systemd service file on systems using systemd.
-  /etc/systemd/system/icinga2.service.d/limits.conf | On distributions with systemd >227, additional service limits are required.
-  /etc/init.d/icinga2                 		| The Icinga 2 init script on systems using SysVinit or OpenRC.
-  /usr/sbin/icinga2                   		| Shell wrapper for the Icinga 2 binary.
-  /usr/lib\*/icinga2				| Libraries and the Icinga 2 binary (use `find /usr -type f -name icinga2` to locate the binary path).
-  /usr/share/doc/icinga2              		| Documentation files that come with Icinga 2.
-  /usr/share/icinga2/include          		| The Icinga Template Library and plugin command configuration.
-  /var/lib/icinga2                    		| Icinga 2 state file, cluster log, master CA, node certificates and configuration files (cluster, api).
-  /var/run/icinga2                    		| PID file.
-  /var/run/icinga2/cmd                		| Command pipe and Livestatus socket.
-  /var/cache/icinga2                  		| status.dat/objects.cache, icinga2.debug files.
-  /var/spool/icinga2                  		| Used for performance data spool files.
-  /var/log/icinga2                    		| Log file location and compat/ directory for the CompatLogger feature.
-
-FreeBSD uses slightly different paths:
-
-By default Icinga 2 uses the following files and directories:
-
-  Path                                | Description
-  ------------------------------------|------------------------------------
-  /usr/local/etc/icinga2              | Contains Icinga 2 configuration files.
-  /usr/local/etc/rc.d/icinga2         | The Icinga 2 init script.
-  /usr/local/sbin/icinga2             | Shell wrapper for the Icinga 2 binary.
-  /usr/local/lib/icinga2              | Libraries and the Icinga 2 binary.
-  /usr/local/share/doc/icinga2        | Documentation files that come with Icinga 2.
-  /usr/local/share/icinga2/include    | The Icinga Template Library and plugin command configuration.
-  /var/lib/icinga2                    | Icinga 2 state file, cluster log, master CA, node certificates and configuration files (cluster, api).
-  /var/run/icinga2                    | PID file.
-  /var/run/icinga2/cmd                | Command pipe and Livestatus socket.
-  /var/cache/icinga2                  | status.dat/objects.cache, icinga2.debug files.
-  /var/spool/icinga2                  | Used for performance data spool files.
-  /var/log/icinga2                    | Log file location and compat/ directory for the CompatLogger feature.
-
 ## Setting up Check Plugins <a id="setting-up-check-plugins"></a>
 
 Without plugins Icinga 2 does not know how to check external services. The
@@ -314,54 +287,71 @@ popular operating systems/distributions:
 
 OS/Distribution        | Package Name       | Repository                | Installation Path
 -----------------------|--------------------|---------------------------|----------------------------
-RHEL/CentOS            | nagios-plugins-all | [EPEL](https://fedoraproject.org/wiki/EPEL) | /usr/lib/nagios/plugins or /usr/lib64/nagios/plugins
+RHEL/CentOS            | nagios-plugins-all | [EPEL](02-installation.md#package-repositories-rhel-epel) | /usr/lib64/nagios/plugins
 SLES/OpenSUSE          | monitoring-plugins | [server:monitoring](https://build.opensuse.org/project/repositories/server:monitoring) | /usr/lib/nagios/plugins
 Debian/Ubuntu          | monitoring-plugins | -                         | /usr/lib/nagios/plugins
 FreeBSD                | monitoring-plugins | -                         | /usr/local/libexec/nagios
 Alpine Linux           | monitoring-plugins | -                         | /usr/lib/monitoring-plugins
-macOS                  | monitoring-plugins | [MacPorts](https://www.macports.org), [Homebrew](https://brew.sh) | /opt/local/libexec or /usr/local/sbin
 
 The recommended way of installing these standard plugins is to use your
 distribution's package manager.
 
-Debian/Ubuntu:
+Depending on which directory your plugins are installed into you may need to
+update the global `PluginDir` constant in your [Icinga 2 configuration](04-configuration.md#constants-conf).
+This constant is used by the check command definitions contained in the Icinga Template Library
+to determine where to find the plugin binaries.
 
-```
-apt-get install monitoring-plugins
-```
+> **Note**
+>
+> Please refer to the [service monitoring](05-service-monitoring.md#service-monitoring-plugins) chapter for details about how to integrate
+> additional check plugins into your Icinga 2 setup.
 
-RHEL/CentOS:
+### Debian/Ubuntu <a id="setting-up-check-plugins-debian-ubuntu"></a>
 
 ```
-yum install nagios-plugins-all
+apt-get install monitoring-plugins
 ```
 
+### RHEL/CentOS/Fedora <a id="setting-up-check-plugins-rhel-centos-fedora"></a>
+
 The packages for RHEL/CentOS depend on other packages which are distributed
 as part of the [EPEL repository](02-installation.md#package-repositories-rhel-epel).
 
-Fedora:
+RHEL/CentOS 8:
 
 ```
 dnf install nagios-plugins-all
 ```
 
-SLES/openSUSE:
+RHEL/CentOS 7/6:
 
 ```
-zypper install monitoring-plugins
+yum install nagios-plugins-all
+```
+
+Fedora:
+
+```
+dnf install nagios-plugins-all
 ```
 
+### SLES/openSUSE <a id="setting-up-check-plugins-sles-opensuse"></a>
+
 The packages for SLES/OpenSUSE depend on other packages which are distributed
 as part of the [server:monitoring repository](https://build.opensuse.org/project/repositories/server:monitoring).
 Please make sure to enable this repository beforehand.
 
-FreeBSD:
+```
+zypper install monitoring-plugins
+```
+
+### FreeBSD <a id="setting-up-check-plugins-freebsd"></a>
 
 ```
 pkg install monitoring-plugins
 ```
 
-Alpine Linux:
+### Alpine Linux <a id="setting-up-check-plugins-alpine"></a>
 
 ```
 apk add monitoring-plugins
@@ -370,28 +360,19 @@ apk add monitoring-plugins
 Note: For Alpine you don't need to explicitly add the `monitoring-plugins` package since it is a dependency of
 `icinga2` and is pulled automatically.
 
-Depending on which directory your plugins are installed into you may need to
-update the global `PluginDir` constant in your [Icinga 2 configuration](04-configuration.md#constants-conf).
-This constant is used by the check command definitions contained in the Icinga Template Library
-to determine where to find the plugin binaries.
-
-> **Note**
->
-> Please refer to the [service monitoring](05-service-monitoring.md#service-monitoring-plugins) chapter for details about how to integrate
-> additional check plugins into your Icinga 2 setup.
-
 ## Running Icinga 2 <a id="running-icinga2"></a>
 
 ### Systemd Service <a id="systemd-service"></a>
 
-Some distributions (e.g. Fedora, openSUSE and RHEL/CentOS 7) use systemd. The
+The majority of supported distributions use systemd. The
 Icinga 2 packages automatically install the necessary systemd unit files..
 
 The Icinga 2 systemd service can be (re-)started, reloaded, stopped and also
 queried for its current status.
 
 ```
-# systemctl status icinga2
+systemctl status icinga2
+
 icinga2.service - Icinga host/service/network monitoring system
    Loaded: loaded (/usr/lib/systemd/system/icinga2.service; disabled)
    Active: active (running) since Mi 2014-07-23 13:39:38 CEST; 15s ago
@@ -425,15 +406,19 @@ The `systemctl` command supports the following actions:
 Examples:
 
 ```
-# systemctl enable icinga2
+systemctl enable icinga2
 
-# systemctl restart icinga2
+systemctl restart icinga2
 Job for icinga2.service failed. See 'systemctl status icinga2.service' and 'journalctl -xn' for details.
 ```
 
 If you're stuck with configuration errors, you can manually invoke the
 [configuration validation](11-cli-commands.md#config-validation).
 
+```
+icinga2 daemon -C
+```
+
 > **Tip**
 >
 > If you are running into fork errors with systemd enabled distributions,
@@ -444,7 +429,8 @@ If you're stuck with configuration errors, you can manually invoke the
 Icinga 2's init script is installed in `/etc/init.d/icinga2` (`/usr/local/etc/rc.d/icinga2` on FreeBSD) by default:
 
 ```
-# /etc/init.d/icinga2
+/etc/init.d/icinga2
+
 Usage: /etc/init.d/icinga2 {start|stop|restart|reload|checkconfig|status}
 ```
 
@@ -469,9 +455,9 @@ using the init script. Using Debian packages the user and group are set to
 On FreeBSD you need to enable icinga2 in your rc.conf
 
 ```
-# sysrc icinga2_enable=yes
+sysrc icinga2_enable=yes
 
-# service icinga2 restart
+service icinga2 restart
 ```
 
 ### SELinux <a id="running-icinga2-selinux"></a>
@@ -484,16 +470,16 @@ Icinga 2 provides its own SELinux policy. `icinga2-selinux` is a policy package
 for Red Hat Enterprise Linux 7 and derivatives. The package runs the targeted policy
 which confines Icinga 2 including enabled features and running commands.
 
-RHEL/CentOS 7:
+RHEL/CentOS 8 and Fedora:
 
 ```
-yum install icinga2-selinux
+dnf install icinga2-selinux
 ```
 
-Fedora:
+RHEL/CentOS 7:
 
 ```
-dnf install icinga2-selinux
+yum install icinga2-selinux
 ```
 
 Read more about SELinux in [this chapter](22-selinux.md#selinux).
@@ -518,7 +504,13 @@ vim-addon-manager -w install icinga2
 Info: installing removed addon 'icinga2' to /var/lib/vim/addons
 ```
 
-RHEL/CentOS/Fedora:
+RHEL/CentOS 8 and Fedora:
+
+```
+dnf install vim-icinga2
+```
+
+RHEL/CentOS 7/6:
 
 ```
 yum install vim-icinga2
@@ -535,6 +527,7 @@ Alpine Linux:
 ```
 apk add icinga2-vim
 ```
+
 Ensure that syntax highlighting is enabled e.g. by editing the user's `vimrc`
 configuration file:
 
@@ -560,7 +553,13 @@ Debian/Ubuntu:
 
 **Note:** The syntax files are installed with the `icinga2-common` package already.
 
-RHEL/CentOS/Fedora:
+RHEL/CentOS 8 and Fedora:
+
+```
+dnf install nano-icinga2
+```
+
+RHEL/CentOS 7/6:
 
 ```
 yum install nano-icinga2
@@ -618,7 +617,7 @@ apt-get install mysql-server mysql-client
 mysql_secure_installation
 ```
 
-RHEL/CentOS 7 and Fedora:
+RHEL/CentOS and Fedora:
 
 ```
 yum install mariadb-server mariadb
@@ -756,7 +755,7 @@ Debian/Ubuntu:
 apt-get install postgresql
 ```
 
-RHEL/CentOS 7:
+RHEL/CentOS:
 
 ```
 yum install postgresql-server postgresql
@@ -918,13 +917,18 @@ The preferred way of installing Icinga Web 2 is to use Apache as webserver
 in combination with PHP-FPM. If you prefer Nginx, please refer to the Icinga Web 2
 documentation.
 
+> **Note**
+>
+> These instructions follow HTTP. In order to secure your webserver, please
+> use HTTPS and TLS certificates e.g. from [Let's Encrypt](https://letsencrypt.org/).
+
 Debian/Ubuntu:
 
 ```
 apt-get install apache2
 ```
 
-RHEL/CentOS 7, Fedora:
+RHEL/CentOS/Fedora:
 
 ```
 yum install httpd
@@ -1037,6 +1041,68 @@ A number of additional features are available in the form of addons. A list of
 popular addons is available in the
 [Addons and Plugins](13-addons.md#addons) chapter.
 
+## Installation Overview <a id="installation-overview"></a>
+
+### Enabled Features during Installation <a id="installation-overview-enabled-features"></a>
+
+The default installation will enable three features required for a basic
+Icinga 2 installation:
+
+* `checker` for executing checks
+* `notification` for sending notifications
+* `mainlog` for writing the `icinga2.log` file
+
+You can verify that by calling `icinga2 feature list`
+[CLI command](11-cli-commands.md#cli-command-feature) to see which features are
+enabled and disabled.
+
+```
+# icinga2 feature list
+Disabled features: api command compatlog debuglog gelf graphite icingastatus ido-mysql ido-pgsql influxdb livestatus opentsdb perfdata statusdata syslog
+Enabled features: checker mainlog notification
+```
+
+### Installation Paths <a id="installation-overview-paths"></a>
+
+By default Icinga 2 uses the following files and directories:
+
+  Path                                		| Description
+  ----------------------------------------------|------------------------------------
+  /etc/icinga2                        		| Contains Icinga 2 configuration files.
+  /usr/lib/systemd/system/icinga2.service 	| The Icinga 2 systemd service file on systems using systemd.
+  /etc/systemd/system/icinga2.service.d/limits.conf | On distributions with systemd >227, additional service limits are required.
+  /etc/init.d/icinga2                 		| The Icinga 2 init script on systems using SysVinit or OpenRC.
+  /usr/sbin/icinga2                   		| Shell wrapper for the Icinga 2 binary.
+  /usr/lib\*/icinga2				| Libraries and the Icinga 2 binary (use `find /usr -type f -name icinga2` to locate the binary path).
+  /usr/share/doc/icinga2              		| Documentation files that come with Icinga 2.
+  /usr/share/icinga2/include          		| The Icinga Template Library and plugin command configuration.
+  /var/lib/icinga2                    		| Icinga 2 state file, cluster log, master CA, node certificates and configuration files (cluster, api).
+  /var/run/icinga2                    		| PID file.
+  /var/run/icinga2/cmd                		| Command pipe and Livestatus socket.
+  /var/cache/icinga2                  		| status.dat/objects.cache, icinga2.debug files.
+  /var/spool/icinga2                  		| Used for performance data spool files.
+  /var/log/icinga2                    		| Log file location and compat/ directory for the CompatLogger feature.
+
+FreeBSD uses slightly different paths:
+
+By default Icinga 2 uses the following files and directories:
+
+  Path                                | Description
+  ------------------------------------|------------------------------------
+  /usr/local/etc/icinga2              | Contains Icinga 2 configuration files.
+  /usr/local/etc/rc.d/icinga2         | The Icinga 2 init script.
+  /usr/local/sbin/icinga2             | Shell wrapper for the Icinga 2 binary.
+  /usr/local/lib/icinga2              | Libraries and the Icinga 2 binary.
+  /usr/local/share/doc/icinga2        | Documentation files that come with Icinga 2.
+  /usr/local/share/icinga2/include    | The Icinga Template Library and plugin command configuration.
+  /var/lib/icinga2                    | Icinga 2 state file, cluster log, master CA, node certificates and configuration files (cluster, api).
+  /var/run/icinga2                    | PID file.
+  /var/run/icinga2/cmd                | Command pipe and Livestatus socket.
+  /var/cache/icinga2                  | status.dat/objects.cache, icinga2.debug files.
+  /var/spool/icinga2                  | Used for performance data spool files.
+  /var/log/icinga2                    | Log file location and compat/ directory for the CompatLogger feature.
+
+
 ## Backup <a id="install-backup"></a>
 
 Ensure to include the following in your backups:


=====================================
doc/08-advanced-topics.md
=====================================
@@ -1190,16 +1190,3 @@ Icinga 2 parses performance data strings returned by check plugins and makes the
   warn                      | Value                 | Warning threshold value.
   min                       | Value                 | Minimum value returned by the check.
   max                       | Value                 | Maximum value returned by the check.
-
-### NotificationResult <a id="advanced-value-types-notificationresult"></a>
-
-  Name                      | Type                  | Description
-  --------------------------|-----------------------|----------------------------------
-  exit\_status              | Number                | The exit status returned by the check execution.
-  output                    | String                | The notification command output.
-  execution\_endpoint       | String                | Name of the node executing the check.
-  command                   | Value                 | Array of command with shell-escaped arguments or command line string.
-  execution\_start          | Timestamp             | Check execution start time (as a UNIX timestamp).
-  execution\_end            | Timestamp             | Check execution end time (as a UNIX timestamp).
-  active                    | Boolean               | Whether the result is from an active or passive check.
-


=====================================
lib/base/io-engine.hpp
=====================================
@@ -3,7 +3,9 @@
 #ifndef IO_ENGINE_H
 #define IO_ENGINE_H
 
+#include "base/exception.hpp"
 #include "base/lazy-init.hpp"
+#include "base/logger.hpp"
 #include <atomic>
 #include <exception>
 #include <memory>
@@ -79,28 +81,6 @@ public:
 
 	boost::asio::io_context& GetIoContext();
 
-	/*
-	 * Custom exceptions thrown in a Boost.Coroutine may cause stack corruption.
-	 * Ensure that these are wrapped correctly.
-	 *
-	 * Inspired by https://github.com/niekbouman/commelec-api/blob/master/commelec-api/coroutine-exception.hpp
-	 * Source: http://boost.2283326.n4.nabble.com/coroutine-only-std-exceptions-are-caught-from-coroutines-td4683671.html
-	 */
-	static inline boost::exception_ptr convertExceptionPtr(std::exception_ptr ex) {
-		try {
-			throw boost::enable_current_exception(ex);
-		} catch (...) {
-			return boost::current_exception();
-		}
-	}
-
-	static inline void rethrowBoostExceptionPointer() {
-		std::exception_ptr sep;
-		sep = std::current_exception();
-		boost::exception_ptr bep = convertExceptionPtr(sep);
-		boost::rethrow_exception(bep);
-	}
-
 	static inline size_t GetCoroutineStackSize() {
 #ifdef _WIN32
 		// Increase the stack size for Windows coroutines to prevent exception corruption.
@@ -124,9 +104,11 @@ public:
 					// Required for proper stack unwinding when coroutines are destroyed.
 					// https://github.com/boostorg/coroutine/issues/39
 					throw;
+				} catch (const std::exception& ex) {
+					Log(LogCritical, "IoEngine", "Exception in coroutine!");
+					Log(LogDebug, "IoEngine") << "Exception in coroutine: " << DiagnosticInformation(ex);
 				} catch (...) {
-					// Handle uncaught exceptions outside of the coroutine.
-					rethrowBoostExceptionPointer();
+					Log(LogCritical, "IoEngine", "Exception in coroutine!");
 				}
 			},
 			boost::coroutines::attributes(GetCoroutineStackSize()) // Set a pre-defined stack size.
@@ -146,9 +128,11 @@ public:
 					// Required for proper stack unwinding when coroutines are destroyed.
 					// https://github.com/boostorg/coroutine/issues/39
 					throw;
+				} catch (const std::exception& ex) {
+					Log(LogCritical, "IoEngine", "Exception in coroutine!");
+					Log(LogDebug, "IoEngine") << "Exception in coroutine: " << DiagnosticInformation(ex);
 				} catch (...) {
-					// Handle uncaught exceptions outside of the coroutine.
-					rethrowBoostExceptionPointer();
+					Log(LogCritical, "IoEngine", "Exception in coroutine!");
 				}
 			},
 			boost::coroutines::attributes(GetCoroutineStackSize()) // Set a pre-defined stack size.


=====================================
lib/compat/compatlogger.cpp
=====================================
@@ -50,7 +50,7 @@ void CompatLogger::Start(bool runtimeCreated)
 		<< "This feature is DEPRECATED and will be removed in future releases. Check the roadmap at https://github.com/Icinga/icinga2/milestones";
 
 	Checkable::OnNewCheckResult.connect(std::bind(&CompatLogger::CheckResultHandler, this, _1, _2));
-	Checkable::OnNotificationSentToUser.connect(std::bind(&CompatLogger::NotificationSentHandler, this, _1, _2, _3, _4, _5, _6, _7, _8, _9));
+	Checkable::OnNotificationSentToUser.connect(std::bind(&CompatLogger::NotificationSentHandler, this, _1, _2, _3, _4, _5, _6, _7, _8));
 	Downtime::OnDowntimeTriggered.connect(std::bind(&CompatLogger::TriggerDowntimeHandler, this, _1));
 	Downtime::OnDowntimeRemoved.connect(std::bind(&CompatLogger::RemoveDowntimeHandler, this, _1));
 	Checkable::OnEventCommandExecuted.connect(std::bind(&CompatLogger::EventCommandHandler, this, _1));
@@ -230,7 +230,7 @@ void CompatLogger::RemoveDowntimeHandler(const Downtime::Ptr& downtime)
  * @threadsafety Always.
  */
 void CompatLogger::NotificationSentHandler(const Notification::Ptr& notification, const Checkable::Ptr& checkable,
-	const User::Ptr& user, NotificationType notification_type, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
+	const User::Ptr& user, NotificationType notification_type, CheckResult::Ptr const& cr,
 	const String& author, const String& comment_text, const String& command_name)
 {
 	Host::Ptr host;


=====================================
lib/compat/compatlogger.hpp
=====================================
@@ -36,8 +36,8 @@ private:
 
 	void CheckResultHandler(const Checkable::Ptr& service, const CheckResult::Ptr& cr);
 	void NotificationSentHandler(const Notification::Ptr& notification, const Checkable::Ptr& service,
-		const User::Ptr& user, NotificationType notification_type, const CheckResult::Ptr& cr,
-		const NotificationResult::Ptr& nr, const String& author, const String& comment_text, const String& command_name);
+		const User::Ptr& user, NotificationType notification_type, CheckResult::Ptr const& cr,
+		const String& author, const String& comment_text, const String& command_name);
 	void FlappingChangedHandler(const Checkable::Ptr& checkable);
 	void EnableFlappingChangedHandler(const Checkable::Ptr& checkable);
 	void TriggerDowntimeHandler(const Downtime::Ptr& downtime);


=====================================
lib/db_ido/dbevents.cpp
=====================================
@@ -56,7 +56,7 @@ void DbEvents::StaticInitialize()
 	Checkable::OnStateChange.connect(std::bind(&DbEvents::AddStateChangeHistory, _1, _2, _3));
 
 	Checkable::OnNewCheckResult.connect(std::bind(&DbEvents::AddCheckResultLogHistory, _1, _2));
-	Checkable::OnNotificationSentToUser.connect(std::bind(&DbEvents::AddNotificationSentLogHistory, _1, _2, _3, _4, _5, _6, _7, _8));
+	Checkable::OnNotificationSentToUser.connect(std::bind(&DbEvents::AddNotificationSentLogHistory, _1, _2, _3, _4, _5, _6, _7));
 	Checkable::OnFlappingChanged.connect(std::bind(&DbEvents::AddFlappingChangedLogHistory, _1));
 	Checkable::OnEnableFlappingChanged.connect(std::bind(&DbEvents::AddEnableFlappingChangedLogHistory, _1));
 	Downtime::OnDowntimeTriggered.connect(std::bind(&DbEvents::AddTriggerDowntimeLogHistory, _1));
@@ -1061,7 +1061,7 @@ void DbEvents::AddRemoveDowntimeLogHistory(const Downtime::Ptr& downtime)
 }
 
 void DbEvents::AddNotificationSentLogHistory(const Notification::Ptr& notification, const Checkable::Ptr& checkable, const User::Ptr& user,
-	NotificationType notification_type, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
+	NotificationType notification_type, const CheckResult::Ptr& cr,
 	const String& author, const String& comment_text)
 {
 	CheckCommand::Ptr commandObj = checkable->GetCheckCommand();


=====================================
lib/db_ido/dbevents.hpp
=====================================
@@ -94,8 +94,8 @@ public:
 	static void AddTriggerDowntimeLogHistory(const Downtime::Ptr& downtime);
 	static void AddRemoveDowntimeLogHistory(const Downtime::Ptr& downtime);
 	static void AddNotificationSentLogHistory(const Notification::Ptr& notification, const Checkable::Ptr& checkable,
-		const User::Ptr& user, NotificationType notification_type, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
-		const String& author, const String& comment_text);
+		const User::Ptr& user, NotificationType notification_type, const CheckResult::Ptr& cr, const String& author,
+		const String& comment_text);
 
 	static void AddFlappingChangedLogHistory(const Checkable::Ptr& checkable);
 	static void AddEnableFlappingChangedLogHistory(const Checkable::Ptr& checkable);


=====================================
lib/icinga/CMakeLists.txt
=====================================
@@ -13,7 +13,6 @@ mkclass_target(host.ti host-ti.cpp host-ti.hpp)
 mkclass_target(icingaapplication.ti icingaapplication-ti.cpp icingaapplication-ti.hpp)
 mkclass_target(customvarobject.ti customvarobject-ti.cpp customvarobject-ti.hpp)
 mkclass_target(notificationcommand.ti notificationcommand-ti.cpp notificationcommand-ti.hpp)
-mkclass_target(notificationresult.ti notificationresult-ti.cpp notificationresult-ti.hpp)
 mkclass_target(notification.ti notification-ti.cpp notification-ti.hpp)
 mkclass_target(scheduleddowntime.ti scheduleddowntime-ti.cpp scheduleddowntime-ti.hpp)
 mkclass_target(servicegroup.ti servicegroup-ti.cpp servicegroup-ti.hpp)
@@ -52,7 +51,6 @@ set(icinga_SOURCES
   macroresolver.hpp
   notification.cpp notification.hpp notification-ti.hpp notification-apply.cpp
   notificationcommand.cpp notificationcommand.hpp notificationcommand-ti.hpp
-  notificationresult.cpp notificationresult.hpp notificationresult-ti.hpp
   objectutils.cpp objectutils.hpp
   pluginutility.cpp pluginutility.hpp
   scheduleddowntime.cpp scheduleddowntime.hpp scheduleddowntime-ti.hpp scheduleddowntime-apply.cpp


=====================================
lib/icinga/checkable-notification.cpp
=====================================
@@ -18,8 +18,8 @@ boost::signals2::signal<void (const Notification::Ptr&, const Checkable::Ptr&, c
 	const NotificationType&, const CheckResult::Ptr&, const String&, const String&,
 	const MessageOrigin::Ptr&)> Checkable::OnNotificationSentToAllUsers;
 boost::signals2::signal<void (const Notification::Ptr&, const Checkable::Ptr&, const User::Ptr&,
-	const NotificationType&, const CheckResult::Ptr&, const NotificationResult::Ptr&, const String&,
-	const String&, const String&, const MessageOrigin::Ptr&)> Checkable::OnNotificationSentToUser;
+	const NotificationType&, const CheckResult::Ptr&, const String&, const String&, const String&,
+	const MessageOrigin::Ptr&)> Checkable::OnNotificationSentToUser;
 
 void Checkable::ResetNotificationNumbers()
 {


=====================================
lib/icinga/checkable.hpp
=====================================
@@ -122,8 +122,8 @@ public:
 	static boost::signals2::signal<void (const Checkable::Ptr&, NotificationType, const CheckResult::Ptr&,
 		const String&, const String&, const MessageOrigin::Ptr&)> OnNotificationsRequested;
 	static boost::signals2::signal<void (const Notification::Ptr&, const Checkable::Ptr&, const User::Ptr&,
-		const NotificationType&, const CheckResult::Ptr&, const NotificationResult::Ptr&, const String&,
-		const String&, const String&, const MessageOrigin::Ptr&)> OnNotificationSentToUser;
+		const NotificationType&, const CheckResult::Ptr&, const String&, const String&, const String&,
+		const MessageOrigin::Ptr&)> OnNotificationSentToUser;
 	static boost::signals2::signal<void (const Notification::Ptr&, const Checkable::Ptr&, const std::set<User::Ptr>&,
 		const NotificationType&, const CheckResult::Ptr&, const String&,
 		const String&, const MessageOrigin::Ptr&)> OnNotificationSentToAllUsers;


=====================================
lib/icinga/clusterevents.cpp
=====================================
@@ -688,7 +688,7 @@ Value ClusterEvents::SendNotificationsAPIHandler(const MessageOrigin::Ptr& origi
 }
 
 void ClusterEvents::NotificationSentUserHandler(const Notification::Ptr& notification, const Checkable::Ptr& checkable, const User::Ptr& user,
-	NotificationType notificationType, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr, const String& author, const String& commentText, const String& command,
+	NotificationType notificationType, const CheckResult::Ptr& cr, const String& author, const String& commentText, const String& command,
 	const MessageOrigin::Ptr& origin)
 {
 	ApiListener::Ptr listener = ApiListener::GetInstance();
@@ -708,7 +708,6 @@ void ClusterEvents::NotificationSentUserHandler(const Notification::Ptr& notific
 	params->Set("user", user->GetName());
 	params->Set("type", notificationType);
 	params->Set("cr", Serialize(cr));
-	params->Set("nr", Serialize(nr));
 	params->Set("author", author);
 	params->Set("text", commentText);
 	params->Set("command", command);
@@ -770,14 +769,6 @@ Value ClusterEvents::NotificationSentUserAPIHandler(const MessageOrigin::Ptr& or
 		}
 	}
 
-	NotificationResult::Ptr nr;
-	if (params->Contains("nr")) {
-		nr = new NotificationResult();
-		Dictionary::Ptr vnr = params->Get("nr");
-
-		Deserialize(nr, vnr, true);
-	}
-
 	NotificationType type = static_cast<NotificationType>(static_cast<int>(params->Get("type")));
 	String author = params->Get("author");
 	String text = params->Get("text");
@@ -794,7 +785,7 @@ Value ClusterEvents::NotificationSentUserAPIHandler(const MessageOrigin::Ptr& or
 
 	String command = params->Get("command");
 
-	Checkable::OnNotificationSentToUser(notification, checkable, user, type, cr, nr, author, text, command, origin);
+	Checkable::OnNotificationSentToUser(notification, checkable, user, type, cr, author, text, command, origin);
 
 	return Empty;
 }


=====================================
lib/icinga/clusterevents.hpp
=====================================
@@ -54,8 +54,7 @@ public:
 	static Value SendNotificationsAPIHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params);
 
 	static void NotificationSentUserHandler(const Notification::Ptr& notification, const Checkable::Ptr& checkable, const User::Ptr& user,
-		NotificationType notificationType, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
-		const String& author, const String& commentText, const String& command, const MessageOrigin::Ptr& origin);
+		NotificationType notificationType, const CheckResult::Ptr& cr, const String& author, const String& commentText, const String& command, const MessageOrigin::Ptr& origin);
 	static Value NotificationSentUserAPIHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params);
 
 	static void NotificationSentToAllUsersHandler(const Notification::Ptr& notification, const Checkable::Ptr& checkable, const std::set<User::Ptr>& users,


=====================================
lib/icinga/notification.cpp
=====================================
@@ -23,7 +23,6 @@ std::map<String, int> Notification::m_StateFilterMap;
 std::map<String, int> Notification::m_TypeFilterMap;
 
 boost::signals2::signal<void (const Notification::Ptr&, const MessageOrigin::Ptr&)> Notification::OnNextNotificationChanged;
-boost::signals2::signal<void (const Notification::Ptr&, const NotificationResult::Ptr&, const MessageOrigin::Ptr&)> Notification::OnNewNotificationResult;
 
 String NotificationNameComposer::MakeName(const String& shortName, const Object::Ptr& context) const
 {
@@ -509,14 +508,10 @@ void Notification::ExecuteNotificationHelper(NotificationType type, const User::
 	String commandName = command->GetName();
 
 	try {
-		NotificationResult::Ptr nr = new NotificationResult();
-
-		nr->SetExecutionStart(Utility::GetTime());
-
-		command->Execute(this, user, cr, nr, type, author, text);
+		command->Execute(this, user, cr, type, author, text);
 
 		/* required by compatlogger */
-		Checkable::OnNotificationSentToUser(this, GetCheckable(), user, type, cr, nr, author, text, command->GetName(), nullptr);
+		Service::OnNotificationSentToUser(this, GetCheckable(), user, type, cr, author, text, commandName, nullptr);
 
 		Log(LogInformation, "Notification")
 			<< "Completed sending '" << NotificationTypeToString(type)
@@ -532,36 +527,6 @@ void Notification::ExecuteNotificationHelper(NotificationType type, const User::
 	}
 }
 
-void Notification::ProcessNotificationResult(const NotificationResult::Ptr& nr, const MessageOrigin::Ptr& origin)
-{
-	if (!nr)
-		return;
-
-	double now = Utility::GetTime();
-
-	if (nr->GetExecutionStart() == 0)
-		nr->SetExecutionStart(now);
-
-	if (nr->GetExecutionEnd() == 0)
-		nr->SetExecutionEnd(now);
-
-	/* Determine the execution endpoint from a locally executed check. */
-	if (!origin || origin->IsLocal())
-		nr->SetExecutionEndpoint(IcingaApplication::GetInstance()->GetNodeName());
-
-	if (!IsActive())
-		return;
-
-	{
-		ObjectLock olock(this);
-
-		SetLastNotificationResult(nr);
-	}
-
-	/* Notify cluster, API and feature events. */
-	OnNewNotificationResult(this, nr, origin);
-}
-
 int icinga::ServiceStateToFilter(ServiceState state)
 {
 	switch (state) {


=====================================
lib/icinga/notification.hpp
=====================================
@@ -10,7 +10,6 @@
 #include "icinga/usergroup.hpp"
 #include "icinga/timeperiod.hpp"
 #include "icinga/checkresult.hpp"
-#include "icinga/notificationresult.hpp"
 #include "remote/endpoint.hpp"
 #include "remote/messageorigin.hpp"
 #include "base/array.hpp"
@@ -83,8 +82,6 @@ public:
 
 	Endpoint::Ptr GetCommandEndpoint() const;
 
-	void ProcessNotificationResult(const NotificationResult::Ptr& nr, const MessageOrigin::Ptr& origin = nullptr);
-
 	// Logging, etc.
 	static String NotificationTypeToString(NotificationType type);
 	// Compat, used for notifications, etc.
@@ -95,7 +92,6 @@ public:
 	static String NotificationHostStateToString(HostState state);
 
 	static boost::signals2::signal<void (const Notification::Ptr&, const MessageOrigin::Ptr&)> OnNextNotificationChanged;
-	static boost::signals2::signal<void (const Notification::Ptr&, const NotificationResult::Ptr&, const MessageOrigin::Ptr&)> OnNewNotificationResult;
 
 	void Validate(int types, const ValidationUtils& utils) override;
 


=====================================
lib/icinga/notification.ti
=====================================
@@ -1,8 +1,6 @@
 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
 
 #include "icinga/customvarobject.hpp"
-#include "icinga/notificationresult.hpp"
-#include "base/array.hpp"
 #impl_include "icinga/notificationcommand.hpp"
 #impl_include "icinga/service.hpp"
 
@@ -18,7 +16,6 @@ public:
 	virtual String MakeName(const String& shortName, const Object::Ptr& context) const;
 	virtual Dictionary::Ptr ParseName(const String& name) const;
 };
-
 }}}
 
 class Notification : CustomVarObject < NotificationNameComposer
@@ -88,7 +85,6 @@ class Notification : CustomVarObject < NotificationNameComposer
 	[state] Timestamp next_notification;
 	[state] int notification_number;
 	[state] Timestamp last_problem_notification;
-	[state] NotificationResult::Ptr last_notification_result;
 
 	[config, navigation] name(Endpoint) command_endpoint (CommandEndpointRaw) {
 		navigate {{{


=====================================
lib/icinga/notificationcommand.cpp
=====================================
@@ -8,15 +8,14 @@ using namespace icinga;
 REGISTER_TYPE(NotificationCommand);
 
 Dictionary::Ptr NotificationCommand::Execute(const Notification::Ptr& notification,
-	const User::Ptr& user, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
-	const NotificationType& type, const String& author, const String& comment,
-	const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros)
+	const User::Ptr& user, const CheckResult::Ptr& cr, const NotificationType& type,
+	const String& author, const String& comment, const Dictionary::Ptr& resolvedMacros,
+	bool useResolvedMacros)
 {
 	return GetExecute()->Invoke({
 		notification,
 		user,
 		cr,
-		nr,
 		type,
 		author,
 		comment,


=====================================
lib/icinga/notificationcommand.hpp
=====================================
@@ -23,8 +23,8 @@ public:
 	DECLARE_OBJECTNAME(NotificationCommand);
 
 	virtual Dictionary::Ptr Execute(const intrusive_ptr<Notification>& notification,
-		const User::Ptr& user, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
-		const NotificationType& type, const String& author, const String& comment,
+		const User::Ptr& user, const CheckResult::Ptr& cr, const NotificationType& type,
+		const String& author, const String& comment,
 		const Dictionary::Ptr& resolvedMacros = nullptr,
 		bool useResolvedMacros = false);
 };


=====================================
lib/icinga/notificationresult.cpp deleted
=====================================
@@ -1,13 +0,0 @@
-/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
-
-#include "icinga/notificationresult.hpp"
-#include "icinga/notificationresult-ti.cpp"
-
-using namespace icinga;
-
-REGISTER_TYPE(NotificationResult);
-
-double NotificationResult::CalculateExecutionTime() const
-{
-	return GetExecutionEnd() - GetExecutionStart();
-}


=====================================
lib/icinga/notificationresult.hpp deleted
=====================================
@@ -1,27 +0,0 @@
-/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
-
-#ifndef NOTIFICATIONRESULT_H
-#define NOTIFICATIONRESULT_H
-
-#include "icinga/i2-icinga.hpp"
-#include "icinga/notificationresult-ti.hpp"
-
-namespace icinga
-{
-
-/**
- * A notification result.
- *
- * @ingroup icinga
- */
-class NotificationResult final : public ObjectImpl<NotificationResult>
-{
-public:
-	DECLARE_OBJECT(NotificationResult);
-
-	double CalculateExecutionTime() const;
-};
-
-}
-
-#endif /* NOTIFICATIONRESULT_H */


=====================================
lib/icinga/notificationresult.ti deleted
=====================================
@@ -1,24 +0,0 @@
-/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
-
-library icinga;
-
-namespace icinga
-{
-
-class NotificationResult
-{
-	[state] Timestamp execution_start;
-	[state] Timestamp execution_end;
-
-	[state] Value command;
-	[state] int exit_status;
-	[state] String output;
-
-	[state] bool active {
-		default {{{ return true; }}}
-	};
-
-	[state] String execution_endpoint;
-};
-
-}


=====================================
lib/methods/pluginnotificationtask.cpp
=====================================
@@ -15,12 +15,12 @@
 
 using namespace icinga;
 
-REGISTER_FUNCTION_NONCONST(Internal, PluginNotification, &PluginNotificationTask::ScriptFunc, "notification:user:cr:nr:itype:author:comment:resolvedMacros:useResolvedMacros");
+REGISTER_FUNCTION_NONCONST(Internal, PluginNotification, &PluginNotificationTask::ScriptFunc, "notification:user:cr:itype:author:comment:resolvedMacros:useResolvedMacros");
 
 void PluginNotificationTask::ScriptFunc(const Notification::Ptr& notification,
-	const User::Ptr& user, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
-	int itype, const String& author, const String& comment,
-	const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros)
+	const User::Ptr& user, const CheckResult::Ptr& cr, int itype,
+	const String& author, const String& comment, const Dictionary::Ptr& resolvedMacros,
+	bool useResolvedMacros)
 {
 	REQUIRE_NOT_NULL(notification);
 	REQUIRE_NOT_NULL(user);
@@ -55,28 +55,16 @@ void PluginNotificationTask::ScriptFunc(const Notification::Ptr& notification,
 
 	PluginUtility::ExecuteCommand(commandObj, checkable, cr, resolvers,
 		resolvedMacros, useResolvedMacros, timeout,
-		std::bind(&PluginNotificationTask::ProcessFinishedHandler, checkable, notification, nr, _1, _2));
+		std::bind(&PluginNotificationTask::ProcessFinishedHandler, checkable, _1, _2));
 }
 
-void PluginNotificationTask::ProcessFinishedHandler(const Checkable::Ptr& checkable,
-	const Notification::Ptr& notification, const NotificationResult::Ptr& nr, const Value& commandLine, const ProcessResult& pr)
+void PluginNotificationTask::ProcessFinishedHandler(const Checkable::Ptr& checkable, const Value& commandLine, const ProcessResult& pr)
 {
 	if (pr.ExitStatus != 0) {
 		Process::Arguments parguments = Process::PrepareCommand(commandLine);
 		Log(LogWarning, "PluginNotificationTask")
-			<< "Notification command for checkable '" << checkable->GetName()
-			<< "' and notification '" << notification->GetName() << "' (PID: " << pr.PID
+			<< "Notification command for object '" << checkable->GetName() << "' (PID: " << pr.PID
 			<< ", arguments: " << Process::PrettyPrintArguments(parguments) << ") terminated with exit code "
 			<< pr.ExitStatus << ", output: " << pr.Output;
 	}
-
-	String output = pr.Output.Trim();
-
-	nr->SetCommand(commandLine);
-	nr->SetOutput(output);
-	nr->SetExitStatus(pr.ExitStatus);
-	nr->SetExecutionStart(pr.ExecutionStart);
-	nr->SetExecutionEnd(pr.ExecutionEnd);
-
-	notification->ProcessNotificationResult(nr);
 }


=====================================
lib/methods/pluginnotificationtask.hpp
=====================================
@@ -20,15 +20,14 @@ class PluginNotificationTask
 {
 public:
 	static void ScriptFunc(const Notification::Ptr& notification,
-		const User::Ptr& user, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
-		int itype, const String& author, const String& comment,
+		const User::Ptr& user, const CheckResult::Ptr& cr, int itype,
+		const String& author, const String& comment,
 		const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros);
 
 private:
 	PluginNotificationTask();
 
 	static void ProcessFinishedHandler(const Checkable::Ptr& checkable,
-		const Notification::Ptr& notification, const NotificationResult::Ptr& nr,
 		const Value& commandLine, const ProcessResult& pr);
 };
 


=====================================
lib/perfdata/gelfwriter.cpp
=====================================
@@ -91,7 +91,7 @@ void GelfWriter::Resume()
 
 	/* Register event handlers. */
 	Checkable::OnNewCheckResult.connect(std::bind(&GelfWriter::CheckResultHandler, this, _1, _2));
-	Checkable::OnNotificationSentToUser.connect(std::bind(&GelfWriter::NotificationToUserHandler, this, _1, _2, _3, _4, _5, _6, _7, _8, _9));
+	Checkable::OnNotificationSentToUser.connect(std::bind(&GelfWriter::NotificationToUserHandler, this, _1, _2, _3, _4, _5, _6, _7, _8));
 	Checkable::OnStateChange.connect(std::bind(&GelfWriter::StateChangeHandler, this, _1, _2, _3));
 }
 
@@ -346,18 +346,18 @@ void GelfWriter::CheckResultHandlerInternal(const Checkable::Ptr& checkable, con
 }
 
 void GelfWriter::NotificationToUserHandler(const Notification::Ptr& notification, const Checkable::Ptr& checkable,
-	const User::Ptr& user, NotificationType notificationType, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
+	const User::Ptr& user, NotificationType notificationType, CheckResult::Ptr const& cr,
 	const String& author, const String& commentText, const String& commandName)
 {
 	if (IsPaused())
 		return;
 
 	m_WorkQueue.Enqueue(std::bind(&GelfWriter::NotificationToUserHandlerInternal, this,
-		notification, checkable, user, notificationType, cr, nr, author, commentText, commandName));
+		notification, checkable, user, notificationType, cr, author, commentText, commandName));
 }
 
 void GelfWriter::NotificationToUserHandlerInternal(const Notification::Ptr& notification, const Checkable::Ptr& checkable,
-	const User::Ptr& user, NotificationType notificationType, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
+	const User::Ptr& user, NotificationType notificationType, CheckResult::Ptr const& cr,
 	const String& author, const String& commentText, const String& commandName)
 {
 	AssertOnWorkQueue();


=====================================
lib/perfdata/gelfwriter.hpp
=====================================
@@ -41,10 +41,10 @@ private:
 	void CheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr);
 	void CheckResultHandlerInternal(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr);
 	void NotificationToUserHandler(const Notification::Ptr& notification, const Checkable::Ptr& checkable,
-		const User::Ptr& user, NotificationType notificationType, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
+		const User::Ptr& user, NotificationType notificationType, const CheckResult::Ptr& cr,
 		const String& author, const String& commentText, const String& commandName);
 	void NotificationToUserHandlerInternal(const Notification::Ptr& notification, const Checkable::Ptr& checkable,
-		const User::Ptr& user, NotificationType notification_type, const CheckResult::Ptr& cr, const NotificationResult::Ptr& nr,
+		const User::Ptr& user, NotificationType notification_type, const CheckResult::Ptr& cr,
 		const String& author, const String& comment_text, const String& command_name);
 	void StateChangeHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type);
 	void StateChangeHandlerInternal(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type);


=====================================
lib/remote/jsonrpcconnection.cpp
=====================================
@@ -170,12 +170,16 @@ ConnectionRole JsonRpcConnection::GetRole() const
 
 void JsonRpcConnection::SendMessage(const Dictionary::Ptr& message)
 {
-	m_IoStrand.post([this, message]() { SendMessageInternal(message); });
+	Ptr keepAlive (this);
+
+	m_IoStrand.post([this, keepAlive, message]() { SendMessageInternal(message); });
 }
 
 void JsonRpcConnection::SendRawMessage(const String& message)
 {
-	m_IoStrand.post([this, message]() {
+	Ptr keepAlive (this);
+
+	m_IoStrand.post([this, keepAlive, message]() {
 		m_OutgoingMessagesQueue.emplace_back(message);
 		m_OutgoingMessagesQueued.Set();
 	});



View it on GitLab: https://salsa.debian.org/nagios-team/pkg-icinga2/-/commit/8404425e7ed0b6b2c003e7eac66d0924c70fc20a

-- 
View it on GitLab: https://salsa.debian.org/nagios-team/pkg-icinga2/-/commit/8404425e7ed0b6b2c003e7eac66d0924c70fc20a
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20200303/4eda7489/attachment-0001.html>


More information about the pkg-nagios-changes mailing list