From f5f0f7bd6e1e763628a6211523e3a25c8dc1a6e8 Mon Sep 17 00:00:00 2001 From: Sebastian Chrostek Date: Mon, 22 Feb 2016 19:43:44 +0100 Subject: [PATCH 01/34] Fix problem notifications while flapping is active fixes #9969 fixes #9642 --- lib/icinga/checkable-check.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index 65747a02f..ebec15501 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -346,22 +346,24 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig if (send_downtime_notification) OnNotificationsRequested(this, in_downtime ? NotificationDowntimeStart : NotificationDowntimeEnd, cr, "", ""); - if (!was_flapping && is_flapping) { - OnNotificationsRequested(this, NotificationFlappingStart, cr, "", ""); + if (send_notification) { + if (!was_flapping && is_flapping) { + OnNotificationsRequested(this, NotificationFlappingStart, cr, "", ""); - Log(LogNotice, "Checkable") - << "Flapping: Checkable " << GetName() << " started flapping (" << GetFlappingThreshold() << "% < " << GetFlappingCurrent() << "%)."; + Log(LogNotice, "Checkable") + << "Flapping: Checkable " << GetName() << " started flapping (" << GetFlappingThreshold() << "% < " << GetFlappingCurrent() << "%)."; - NotifyFlapping(origin); - } else if (was_flapping && !is_flapping) { - OnNotificationsRequested(this, NotificationFlappingEnd, cr, "", ""); + NotifyFlapping(origin); + } else if (was_flapping && !is_flapping) { + OnNotificationsRequested(this, NotificationFlappingEnd, cr, "", ""); - Log(LogNotice, "Checkable") - << "Flapping: Checkable " << GetName() << " stopped flapping (" << GetFlappingThreshold() << "% >= " << GetFlappingCurrent() << "%)."; + Log(LogNotice, "Checkable") + << "Flapping: Checkable " << GetName() << " stopped flapping (" << GetFlappingThreshold() << "% >= " << GetFlappingCurrent() << "%)."; - NotifyFlapping(origin); - } else if (send_notification) - OnNotificationsRequested(this, recovery ? NotificationRecovery : NotificationProblem, cr, "", ""); + NotifyFlapping(origin); + } else if (!was_flapping && !is_flapping) + OnNotificationsRequested(this, recovery ? NotificationRecovery : NotificationProblem, cr, "", ""); + } } void Checkable::ExecuteRemoteCheck(const Dictionary::Ptr& resolvedMacros) From 3df7336fb3e10f50c39fa156d5d78893b1e8e0e5 Mon Sep 17 00:00:00 2001 From: Andres Ivanov Date: Tue, 23 Feb 2016 09:44:30 +0200 Subject: [PATCH 02/34] ITL: Add query option to check_postgres There were "query", "valtype" and "reverse" options missing for "custom_query" action type in check_postgres plugin. fixes #11205 Signed-off-by: Michael Friedrich --- doc/7-icinga-template-library.md | 3 +++ itl/plugins-contrib.d/databases.conf | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 943942bca..0f7083b5e 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -1721,6 +1721,9 @@ postgres_standby | **Optional.** Assume that the server is in continious WAL postgres_production | **Optional.** Assume that the server is in production mode if set to true. Defaults to false. postgres_action | **Required.** Determines the test executed. postgres_unixsocket | **Optional.** If "postgres_unixsocket" is set to true the unix socket is used instead of an address. Defaults to false. +postgres_query | **Optional.** Query for "custom_query" action. +postgres_valtype | **Optional.** Value type of query result for "custom_query". +postgres_reverse | **Optional.** If "postgres_reverse" is set, warning and critical values are reversed for "custom_query" action. #### mongodb diff --git a/itl/plugins-contrib.d/databases.conf b/itl/plugins-contrib.d/databases.conf index fc40093ca..adf9a14a9 100644 --- a/itl/plugins-contrib.d/databases.conf +++ b/itl/plugins-contrib.d/databases.conf @@ -296,6 +296,18 @@ object CheckCommand "postgres" { value = "$postgres_action$" description = "determines the test executed" } + "--query" = { + value = "$postgres_query$" + description = "query for custom_query action" + } + "--valtype" = { + value = "$postgres_valtype$" + description = "determines the result type for custom_query action" + } + "--reverse" = { + set_if = "$postgres_reverse$" + description = "reverses warning and critical for custom_query action" + } } vars.postgres_host = "$check_address$" From e415d15d4d3370b07d8f66bf0d04ec3e6ef9cb58 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 23 Feb 2016 22:19:03 +0100 Subject: [PATCH 03/34] Update AUTHORS refs #11205 --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index a36f65b92..c440531fe 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,6 +3,7 @@ Alexander A. Klimov Alexander Fuhr Alexander Schomburg Alexander Wirt +Andres Ivanov Andrew Meyer Arnd Hannemann Bastian Guse From 3979ec9b153699289d0832643f38fa14d0870d29 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 23 Feb 2016 16:55:45 +0100 Subject: [PATCH 04/34] Fix wrong log message in 'node setup' cli command fixes #11209 --- lib/cli/nodesetupcommand.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/cli/nodesetupcommand.cpp b/lib/cli/nodesetupcommand.cpp index ed0126ce8..cf185b335 100644 --- a/lib/cli/nodesetupcommand.cpp +++ b/lib/cli/nodesetupcommand.cpp @@ -293,10 +293,9 @@ int NodeSetupCommand::SetupNode(const boost::program_options::variables_map& vm, boost::shared_ptr trustedcert = GetX509Certificate(vm["trustedcert"].as()); Log(LogInformation, "cli") - << "Verifying trusted certificate from file '" << trustedcert << "'."; + << "Verifying trusted certificate file '" << vm["trustedcert"].as() << "'."; /* retrieve CN and pass it (defaults to FQDN) */ - String cn = Utility::GetFQDN(); if (vm.count("cn")) From cd5f11b1ea9f7f1f5e345b07e1d266153afa914a Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 24 Feb 2016 21:31:10 +0100 Subject: [PATCH 05/34] Docs: Add an example for API joins with comments and host/services fixes #10976 --- doc/9-icinga2-api.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/9-icinga2-api.md b/doc/9-icinga2-api.md index ee0e6f45a..42c9d3077 100644 --- a/doc/9-icinga2-api.md +++ b/doc/9-icinga2-api.md @@ -501,6 +501,11 @@ via a join: ] } +In case you want to fetch all [comments](6-object-types.md#objecttype-comment) +for hosts and services, you can use the following query URL (similar example +for downtimes): + + https://localhost:5665/v1/objects/comments?joins=host&joins=service ### Creating Config Objects From 5c52e3e428bfe736efe9a0fccc2e162cf5315f93 Mon Sep 17 00:00:00 2001 From: Brian De Wolf Date: Mon, 16 Nov 2015 11:34:18 -0800 Subject: [PATCH 06/34] ITL: add check_http args for SSL version forcing The -S argument of check_http can take a number, which forces the connection to use a specific SSL version. This is implemented as multiple options because check_http does not accept the number following -S if they are separated. fixes #10358 Signed-off-by: Michael Friedrich --- doc/7-icinga-template-library.md | 3 +++ itl/command-plugins.conf | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 0f7083b5e..fad70a5ac 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -436,6 +436,9 @@ http_vhost | **Optional.** The virtual host that should be sent in http_uri | **Optional.** The request URI. http_port | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise. http_ssl | **Optional.** Whether to use SSL. Defaults to false. +http_ssl_force_tlsv1 | **Optional.** Whether to force TLSv1. +http_ssl_force_sslv2 | **Optional.** Whether to force SSLv2. +http_ssl_force_sslv3 | **Optional.** Whether to force SSLv3. http_sni | **Optional.** Whether to use SNI. Defaults to false. http_auth_pair | **Optional.** Add 'username:password' authorization pair. http_proxy_auth_pair | **Optional.** Add 'username:password' authorization pair for proxy. diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index a6257f9e4..e017952db 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -331,6 +331,15 @@ object CheckCommand "http" { "-S" = { set_if = "$http_ssl$" } + "-S1" = { + set_if = "$http_ssl_force_tlsv1$" + } + "-S2" = { + set_if = "$http_ssl_force_sslv2$" + } + "-S3" = { + set_if = "$http_ssl_force_sslv3$" + } "--sni" = { set_if = "$http_sni$" } From 7f7f46b6cbc3a7517febf5695b2e845793a3a41b Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 24 Feb 2016 23:38:52 +0100 Subject: [PATCH 07/34] Update AUTHORS refs #10358 --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index c440531fe..a2c4b5e7c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -10,6 +10,7 @@ Bastian Guse Benedikt Heine Bernd Erk Blerim Sheqa +Brian De Wolf Brian Dockter Bruno Lingner Carlos Cesario From aadbe98c56539ab1d442f90a9d862875b3cdfb38 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 24 Feb 2016 22:13:03 +0100 Subject: [PATCH 08/34] Docs: http check's URI is really just Path fixes #10795 --- doc/7-icinga-template-library.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index fad70a5ac..4f75b4c96 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -433,7 +433,7 @@ Name | Description -------------------------|-------------- http_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise. http_vhost | **Optional.** The virtual host that should be sent in the "Host" header. -http_uri | **Optional.** The request URI. +http_uri | **Optional.** The request URI for GET or POST. Defaults to `/`. http_port | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise. http_ssl | **Optional.** Whether to use SSL. Defaults to false. http_ssl_force_tlsv1 | **Optional.** Whether to force TLSv1. From 9e833d7563a7960f96e626bfbd6dd1edeb924076 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 3 Mar 2016 15:54:35 +0100 Subject: [PATCH 09/34] Fix MkDirP() on Windows fixes #10231 --- lib/base/utility.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp index da21d7480..c86051bb4 100644 --- a/lib/base/utility.cpp +++ b/lib/base/utility.cpp @@ -702,11 +702,13 @@ bool Utility::GlobRecursive(const String& path, const String& pattern, const boo void Utility::MkDir(const String& path, int mode) { + #ifndef _WIN32 if (mkdir(path.CStr(), mode) < 0 && errno != EEXIST) { #else /*_ WIN32 */ if (mkdir(path.CStr()) < 0 && errno != EEXIST) { #endif /* _WIN32 */ + BOOST_THROW_EXCEPTION(posix_error() << boost::errinfo_api_function("mkdir") << boost::errinfo_errno(errno) @@ -719,7 +721,11 @@ void Utility::MkDirP(const String& path, int mode) size_t pos = 0; while (pos != String::NPos) { +#ifndef _WIN32 pos = path.Find("/", pos + 1); +#else /*_ WIN32 */ + pos = path.Find("\\", pos + 1); +#endif /* _WIN32 */ MkDir(path.SubStr(0, pos), mode); } } From baecdc321038e22564b55c83c50bb8d46f45f97c Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Mon, 7 Mar 2016 09:22:07 +0100 Subject: [PATCH 10/34] Fix: MkDirP supports '/' and '\' on Windows fixes #10231 --- lib/base/utility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp index c86051bb4..b139ce7b0 100644 --- a/lib/base/utility.cpp +++ b/lib/base/utility.cpp @@ -724,7 +724,7 @@ void Utility::MkDirP(const String& path, int mode) #ifndef _WIN32 pos = path.Find("/", pos + 1); #else /*_ WIN32 */ - pos = path.Find("\\", pos + 1); + pos = path.FindFirstOf("/\\", pos + 1); #endif /* _WIN32 */ MkDir(path.SubStr(0, pos), mode); } From 9e498383a1a7657ed6bd77666633173f156de46f Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 8 Mar 2016 15:00:26 +0100 Subject: [PATCH 11/34] Update build requirements for SLES 11 SP4 fixes #11331 --- icinga2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icinga2.spec b/icinga2.spec index d6faba6f7..3a237f4ea 100644 --- a/icinga2.spec +++ b/icinga2.spec @@ -93,7 +93,7 @@ BuildRequires: libyajl-devel BuildRequires: libedit-devel BuildRequires: ncurses-devel %if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210 -BuildRequires: gcc47-c++ +BuildRequires: gcc48-c++ BuildRequires: libstdc++47-devel BuildRequires: libopenssl1-devel %else From a63db2805e0da55a7f2845328c8fc19cfc342795 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 10 Mar 2016 10:58:41 +0100 Subject: [PATCH 12/34] Docs: Add API examples for creating services and check commands fixes #11350 --- doc/9-icinga2-api.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/9-icinga2-api.md b/doc/9-icinga2-api.md index 42c9d3077..0a8cc3588 100644 --- a/doc/9-icinga2-api.md +++ b/doc/9-icinga2-api.md @@ -557,6 +557,16 @@ which is required for host objects: ] } +Service objects must be created using their full name ("hostname!servicename") referencing an existing host object: + + $ curl -k -s -u root:icinga -H 'Accept: application/json' -X PUT 'https://localhost:5665/v1/objects/services/localhost!realtime-load' \ + -d '{ "templates": [ "generic-service" ], "attrs": { "check_command": "load", "check_interval": 1,"retry_interval": 1 } }' + + +Example for a new CheckCommand object: + + $ curl -k -s -u root:icinga -H 'Accept: application/json' -X PUT 'https://localhost:5665/v1/objects/checkcommands/mytest' \ + -d '{ "templates": [ "plugin-check-command" ], "attrs": { "command": [ "/usr/local/sbin/check_http" ], "arguments": { "-I": "$mytest_iparam$" } } }' ### Modifying Objects From 8344f749cdcbcb5fc94cdb6436a9004e0a54d6a2 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Sat, 5 Mar 2016 17:48:06 +0100 Subject: [PATCH 13/34] Revert "Properly set the next check time for active and passive checks" This reverts commit 2a11b27972e4325bf80e9abc9017eab7dd03e712. This patch does not properly work and breaks the check_interval setting for passive checks. Requires a proper patch. refs #11248 refs #11257 refs #11273 (the old issue) refs #7287 --- lib/compat/checkresultreader.cpp | 5 +++++ lib/icinga/apiactions.cpp | 5 +++++ lib/icinga/checkable-check.cpp | 12 ++---------- lib/icinga/externalcommandprocessor.cpp | 10 ++++++++++ 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/lib/compat/checkresultreader.cpp b/lib/compat/checkresultreader.cpp index 58d35c94d..4b1e4ad53 100644 --- a/lib/compat/checkresultreader.cpp +++ b/lib/compat/checkresultreader.cpp @@ -156,4 +156,9 @@ void CheckResultReader::ProcessCheckResultFile(const String& path) const Log(LogDebug, "CheckResultReader") << "Processed checkresult file for object '" << checkable->GetName() << "'"; + + /* Reschedule the next check. The side effect of this is that for as long + * as we receive check result files for a host/service we won't execute any + * active checks. */ + checkable->SetNextCheck(Utility::GetTime() + checkable->GetCheckInterval()); } diff --git a/lib/icinga/apiactions.cpp b/lib/icinga/apiactions.cpp index b4283813b..9faa0304c 100644 --- a/lib/icinga/apiactions.cpp +++ b/lib/icinga/apiactions.cpp @@ -106,6 +106,11 @@ Dictionary::Ptr ApiActions::ProcessCheckResult(const ConfigObject::Ptr& object, cr->SetCommand(params->Get("check_command")); checkable->ProcessCheckResult(cr); + /* Reschedule the next check. The side effect of this is that for as long + * as we receive passive results for a service we won't execute any + * active checks. */ + checkable->SetNextCheck(Utility::GetTime() + checkable->GetCheckInterval()); + return ApiActions::CreateResult(200, "Successfully processed check result for object '" + checkable->GetName() + "'."); } diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index ebec15501..9916093de 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -302,16 +302,8 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig UpdateFlappingStatus(stateChange); is_flapping = IsFlapping(); - /* update next check time for active and passive check results */ - if (!GetEnableActiveChecks() && GetEnablePassiveChecks()) { - /* Reschedule the next passive check. The side effect of this is that for as long - * as we receive passive results for a service we won't execute any - * active checks. */ - SetNextCheck(Utility::GetTime() + GetCheckInterval()); - } else if (GetEnableActiveChecks()) { - /* update next check time based on state changes and types */ - UpdateNextCheck(); - } + /* update next check time on possible state changes */ + UpdateNextCheck(); olock.Unlock(); diff --git a/lib/icinga/externalcommandprocessor.cpp b/lib/icinga/externalcommandprocessor.cpp index e0a6b317e..e63e53b02 100644 --- a/lib/icinga/externalcommandprocessor.cpp +++ b/lib/icinga/externalcommandprocessor.cpp @@ -327,6 +327,11 @@ void ExternalCommandProcessor::ProcessHostCheckResult(double time, const std::ve << "Processing passive check result for host '" << arguments[0] << "'"; host->ProcessCheckResult(result); + + /* Reschedule the next check. The side effect of this is that for as long + * as we receive passive results for a service we won't execute any + * active checks. */ + host->SetNextCheck(Utility::GetTime() + host->GetCheckInterval()); } void ExternalCommandProcessor::ProcessServiceCheckResult(double time, const std::vector& arguments) @@ -357,6 +362,11 @@ void ExternalCommandProcessor::ProcessServiceCheckResult(double time, const std: << "Processing passive check result for service '" << arguments[1] << "'"; service->ProcessCheckResult(result); + + /* Reschedule the next check. The side effect of this is that for as long + * as we receive passive results for a service we won't execute any + * active checks. */ + service->SetNextCheck(Utility::GetTime() + service->GetCheckInterval()); } void ExternalCommandProcessor::ScheduleHostCheck(double, const std::vector& arguments) From f99feab08c8929b8e2db8a49689b8f09bd3c3448 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Sat, 5 Mar 2016 17:55:14 +0100 Subject: [PATCH 14/34] Revert "Fix check scheduling w/ retry_interval" This reverts commit a51e647cc760bd5f7c4de6182961a477478c11a9. This patch causes trouble with check results received 1) passively 2) throughout the cluster. A proper patch for setting the retry_interval on NOT-OK state changes is required. refs #11248 refs #11257 refs #11273 (the old issue) refs #7287 --- lib/icinga/checkable-check.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index 9916093de..398b8dfbe 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -302,9 +302,6 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig UpdateFlappingStatus(stateChange); is_flapping = IsFlapping(); - /* update next check time on possible state changes */ - UpdateNextCheck(); - olock.Unlock(); // Log(LogDebug, "Checkable") From 7ad7e28d7a0b5826b74e066399dab1157f44fc6d Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 11 Mar 2016 13:19:03 +0100 Subject: [PATCH 15/34] Fix: Volatile transitions from HARD NOT-OK->NOT-OK do not trigger notifications fixes #11320 --- lib/icinga/checkable-check.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index 398b8dfbe..f1c547793 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -262,7 +262,17 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig Checkable::UpdateStatistics(cr, checkable_type); bool in_downtime = IsInDowntime(); - bool send_notification = hardChange && notification_reachable && !in_downtime && !IsAcknowledged(); + + bool send_notification = false; + + if (notification_reachable && !in_downtime && !IsAcknowledged()) { + /* Send notifications whether when a hard state change occured. */ + if (hardChange) + send_notification = true; + /* Or if the checkable is volatile and in a HARD state. */ + else if (is_volatile && GetStateType() == StateTypeHard) + send_notification = true; + } if (!old_cr) send_notification = false; /* Don't send notifications for the initial state change */ From 5516427446396a74f8aec44cd7d018eed70e41ee Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 11 Mar 2016 14:22:24 +0100 Subject: [PATCH 16/34] Fix: Common name in node wizard isn't case sensitive fixes #11159 --- lib/cli/nodewizardcommand.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/cli/nodewizardcommand.cpp b/lib/cli/nodewizardcommand.cpp index 9c89196d0..d592b0073 100644 --- a/lib/cli/nodewizardcommand.cpp +++ b/lib/cli/nodewizardcommand.cpp @@ -127,7 +127,6 @@ int NodeWizardCommand::Run(const boost::program_options::variables_map& vm, << " [" << Utility::GetFQDN() << "]: "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); if (answer.empty()) answer = Utility::GetFQDN(); @@ -151,7 +150,6 @@ wizard_endpoint_loop_start: << " (CN from your master setup): "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); if (answer.empty()) { Log(LogWarning, "cli", "Master CN is required! Please retry."); @@ -182,7 +180,6 @@ wizard_endpoint_loop_start: << ConsoleColorTag(Console_Normal) << " (Your master's IP address or FQDN): "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); if (answer.empty()) { Log(LogWarning, "cli", "Please enter the master's endpoint connection information."); @@ -200,7 +197,6 @@ wizard_endpoint_loop_start: << " [" << tmpPort << "]: "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); if (!answer.empty()) tmpPort = answer; @@ -230,7 +226,6 @@ wizard_master_host: << ConsoleColorTag(Console_Normal) << " [" << master_endpoint_name << "]: "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); if (answer.empty() && !master_endpoint_name.IsEmpty()) answer = master_endpoint_name; @@ -245,7 +240,6 @@ wizard_master_host: << ConsoleColorTag(Console_Normal) << " [" << tmpPort << "]: "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); if (!answer.empty()) tmpPort = answer; @@ -322,7 +316,6 @@ wizard_ticket: << " (Hint: # icinga2 pki ticket --cn '" << cn << "'): "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); if (answer.empty()) goto wizard_ticket; @@ -365,7 +358,6 @@ wizard_ticket: << ConsoleColorTag(Console_Normal) << " []: "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); String bind_host = answer; bind_host = bind_host.Trim(); @@ -373,7 +365,6 @@ wizard_ticket: std::cout << "Bind Port []: "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); String bind_port = answer; bind_port = bind_port.Trim(); @@ -477,7 +468,6 @@ wizard_ticket: << " (CN) [" << Utility::GetFQDN() << "]: "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); if (answer.empty()) answer = Utility::GetFQDN(); @@ -518,7 +508,6 @@ wizard_ticket: << "Bind Host" << ConsoleColorTag(Console_Normal) << " []: "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); String bind_host = answer; bind_host = bind_host.Trim(); @@ -527,7 +516,6 @@ wizard_ticket: << "Bind Port" << ConsoleColorTag(Console_Normal) << " []: "; std::getline(std::cin, answer); - boost::algorithm::to_lower(answer); String bind_port = answer; bind_port = bind_port.Trim(); From ca869719d0420e3a66e6b69873c64c50116f37b0 Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Fri, 26 Feb 2016 14:31:32 +0100 Subject: [PATCH 17/34] Fix max number of args for DEL_DOWNTIME_BY_HOST_NAME The RegisterCommand call for DEL_DOWNTIME_BY_HOST_NAME was missing the max args parameter. This prevented the optional service name, start time and comment arguments to be passed. Signed-off-by: Michael Friedrich fixes #11240 --- lib/icinga/externalcommandprocessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/icinga/externalcommandprocessor.cpp b/lib/icinga/externalcommandprocessor.cpp index e63e53b02..f0889376c 100644 --- a/lib/icinga/externalcommandprocessor.cpp +++ b/lib/icinga/externalcommandprocessor.cpp @@ -215,7 +215,7 @@ void ExternalCommandProcessor::StaticInitialize(void) RegisterCommand("DEL_SVC_DOWNTIME", &ExternalCommandProcessor::DelSvcDowntime, 1); RegisterCommand("SCHEDULE_HOST_DOWNTIME", &ExternalCommandProcessor::ScheduleHostDowntime, 8); RegisterCommand("DEL_HOST_DOWNTIME", &ExternalCommandProcessor::DelHostDowntime, 1); - RegisterCommand("DEL_DOWNTIME_BY_HOST_NAME", &ExternalCommandProcessor::DelDowntimeByHostName, 1); + RegisterCommand("DEL_DOWNTIME_BY_HOST_NAME", &ExternalCommandProcessor::DelDowntimeByHostName, 1, 4); RegisterCommand("SCHEDULE_HOST_SVC_DOWNTIME", &ExternalCommandProcessor::ScheduleHostSvcDowntime, 8); RegisterCommand("SCHEDULE_HOSTGROUP_HOST_DOWNTIME", &ExternalCommandProcessor::ScheduleHostgroupHostDowntime, 8); RegisterCommand("SCHEDULE_HOSTGROUP_SVC_DOWNTIME", &ExternalCommandProcessor::ScheduleHostgroupSvcDowntime, 8); From cc562e257c253a9f9a4352a0b65e76db0f0abdbb Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 7 Mar 2016 09:09:01 +0100 Subject: [PATCH 18/34] Update AUTHORS refs #11240 --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index a2c4b5e7c..fa54517f5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -43,6 +43,7 @@ Jo Goossens Johannes Meyer Jonas Meurer Joseph L. Casale +Julian Brost Jérôme Drouet Lars Engels Lee Clemens From ee7af887c8d4814236cab4ea2eff89cd2c8011a1 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 10 Mar 2016 14:32:57 +0100 Subject: [PATCH 19/34] Fix host recovery notifications for warning states fixes #10225 --- lib/icinga/checkable-check.cpp | 60 ++++++++++++++++++++++------------ lib/icinga/checkable.hpp | 2 ++ 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index f1c547793..3bd5272dc 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -95,6 +95,16 @@ double Checkable::GetLastCheck(void) const return schedule_end; } +bool Checkable::StateIsOK(CheckableType type, ServiceState state) +{ + if (type == CheckableHost && Host::CalculateState(state) == HostUp) + return true; + else if (type == CheckableService && state == ServiceOK) + return true; + + return false; +} + void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrigin::Ptr& origin) { { @@ -150,6 +160,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig long old_attempt = GetCheckAttempt(); bool recovery = false; + /* Ignore check results older than the current one. */ if (old_cr && cr->GetExecutionStart() < old_cr->GetExecutionStart()) return; @@ -159,19 +170,27 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig SetLastStateType(old_stateType); SetLastReachable(reachable); + Host::Ptr host; + Service::Ptr service; + tie(host, service) = GetHostService(this); + + CheckableType checkableType = CheckableHost; + if (service) + checkableType = CheckableService; + long attempt = 1; std::set children = GetChildren(); if (!old_cr) { SetStateType(StateTypeHard); - } else if (cr->GetState() == ServiceOK) { - if (old_state == ServiceOK && old_stateType == StateTypeSoft) { + } else if (StateIsOK(checkableType, cr->GetState())) { + if (StateIsOK(checkableType, old_state) && old_stateType == StateTypeSoft) { SetStateType(StateTypeHard); // SOFT OK -> HARD OK recovery = true; } - if (old_state != ServiceOK) + if (!StateIsOK(checkableType, old_state)) recovery = true; // NOT OK -> SOFT/HARD OK ResetNotificationNumbers(); @@ -183,17 +202,17 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig } else { if (old_attempt >= GetMaxCheckAttempts()) { SetStateType(StateTypeHard); - } else if (old_stateType == StateTypeSoft && old_state != ServiceOK) { + } else if (old_stateType == StateTypeSoft && !StateIsOK(checkableType, old_state)) { SetStateType(StateTypeSoft); attempt = old_attempt + 1; //NOT-OK -> NOT-OK counter - } else if (old_state == ServiceOK) { + } else if (StateIsOK(checkableType, old_state)) { SetStateType(StateTypeSoft); attempt = 1; //OK -> NOT-OK transition, reset the counter } else { attempt = old_attempt; } - if (cr->GetState() != ServiceOK) { + if (!StateIsOK(checkableType, cr->GetState())) { SaveLastState(cr->GetState(), Utility::GetTime()); } @@ -210,13 +229,20 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig ServiceState new_state = cr->GetState(); SetStateRaw(new_state); - bool stateChange = (old_state != new_state); + bool stateChange; + + /* Exception on state change calculation for hosts. */ + if (checkableType == CheckableService) + stateChange = (old_state != new_state); + else + stateChange = (Host::CalculateState(old_state) != Host::CalculateState(new_state)); + if (stateChange) { SetLastStateChange(now); /* remove acknowledgements */ if (GetAcknowledgement() == AcknowledgementNormal || - (GetAcknowledgement() == AcknowledgementSticky && new_state == ServiceOK)) { + (GetAcknowledgement() == AcknowledgementSticky && StateIsOK(checkableType, new_state))) { ClearAcknowledgement(); } @@ -247,19 +273,11 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig SetLastHardStateChange(now); } - if (new_state != ServiceOK) + if (!StateIsOK(checkableType, new_state)) TriggerDowntimes(); - Host::Ptr host; - Service::Ptr service; - tie(host, service) = GetHostService(this); - - CheckableType checkable_type = CheckableHost; - if (service) - checkable_type = CheckableService; - /* statistics for external tools */ - Checkable::UpdateStatistics(cr, checkable_type); + Checkable::UpdateStatistics(cr, checkableType); bool in_downtime = IsInDowntime(); @@ -277,10 +295,10 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig if (!old_cr) send_notification = false; /* Don't send notifications for the initial state change */ - if (old_state == ServiceOK && old_stateType == StateTypeSoft) + if (StateIsOK(checkableType, old_state) && old_stateType == StateTypeSoft) send_notification = false; /* Don't send notifications for SOFT-OK -> HARD-OK. */ - if (is_volatile && old_state == ServiceOK && new_state == ServiceOK) + if (is_volatile && StateIsOK(checkableType, old_state) && StateIsOK(checkableType, new_state)) send_notification = false; /* Don't send notifications for volatile OK -> OK changes. */ bool send_downtime_notification = (GetLastInDowntime() != in_downtime); @@ -308,8 +326,10 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig bool was_flapping, is_flapping; was_flapping = IsFlapping(); + if (GetStateType() == StateTypeHard) UpdateFlappingStatus(stateChange); + is_flapping = IsFlapping(); olock.Unlock(); diff --git a/lib/icinga/checkable.hpp b/lib/icinga/checkable.hpp index cef114733..4981cf719 100644 --- a/lib/icinga/checkable.hpp +++ b/lib/icinga/checkable.hpp @@ -92,6 +92,8 @@ public: void UpdateNextCheck(void); bool HasBeenChecked(void) const; + bool StateIsOK(CheckableType type, ServiceState state); + virtual double GetLastCheck(void) const override; virtual void SaveLastState(ServiceState state, double timestamp) = 0; From 2d4ccb40d32546bd0200a9c32df34d999023cec2 Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Tue, 8 Mar 2016 09:35:39 +0100 Subject: [PATCH 20/34] Correct API URL example for acknowledge-problem refs #11328 --- doc/9-icinga2-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/9-icinga2-api.md b/doc/9-icinga2-api.md index 0a8cc3588..99bf284a9 100644 --- a/doc/9-icinga2-api.md +++ b/doc/9-icinga2-api.md @@ -793,7 +793,7 @@ In addition to these parameters a [filter](9-icinga2-api.md#icinga2-api-filters) The following example acknowledges all services which are in a hard critical state and sends out a notification for them: - $ curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://localhost:566tions/acknowledge-problem?type=Service&filter=service.state==2&service.state_type=1' \ + $ curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://localhost:5665/v1/actions/acknowledge-problem?type=Service&filter=service.state==2&service.state_type=1' \ -d '{ "author": "icingaadmin", "comment": "Global outage. Working on it.", "notify": true }' | python -m json.tool { From 397c0ada954042ddf4d70dc0c2c51686a10e4685 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Tue, 23 Feb 2016 16:07:28 +0100 Subject: [PATCH 21/34] Fix CMake not finding mysql libs on Windows fixes #11208 --- third-party/cmake/FindMySQL.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/third-party/cmake/FindMySQL.cmake b/third-party/cmake/FindMySQL.cmake index d92b6c766..d24337987 100644 --- a/third-party/cmake/FindMySQL.cmake +++ b/third-party/cmake/FindMySQL.cmake @@ -95,7 +95,12 @@ IF (MYSQL_INCLUDE_DIR AND MYSQL_LIB_DIR) FIND_LIBRARY(MYSQL_ZLIB zlib PATHS ${MYSQL_LIB_DIR}) FIND_LIBRARY(MYSQL_YASSL yassl PATHS ${MYSQL_LIB_DIR}) FIND_LIBRARY(MYSQL_TAOCRYPT taocrypt PATHS ${MYSQL_LIB_DIR}) - SET(MYSQL_CLIENT_LIBS mysqlclient_r) + + IF (WIN32) + SET(MYSQL_CLIENT_LIBS libmysql) + ELSE (WIN32) + SET(MYSQL_CLIENT_LIBS mysqlclient_r) + ENDIF (WIN32) IF (MYSQL_ZLIB) SET(MYSQL_CLIENT_LIBS ${MYSQL_CLIENT_LIBS} zlib) ENDIF (MYSQL_ZLIB) From 4cf33b74f2790649860228b171d69783a4389b1e Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Tue, 1 Mar 2016 16:53:52 +0100 Subject: [PATCH 22/34] Fix delete object handler returning incorrect status codes Now a 200 OK only gets returned if all objects could be deleted fixes #10770 --- lib/remote/deleteobjecthandler.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/remote/deleteobjecthandler.cpp b/lib/remote/deleteobjecthandler.cpp index efdeb1fac..234e8f60e 100644 --- a/lib/remote/deleteobjecthandler.cpp +++ b/lib/remote/deleteobjecthandler.cpp @@ -76,6 +76,8 @@ bool DeleteObjectHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& r Array::Ptr results = new Array(); + bool success = true; + BOOST_FOREACH(const ConfigObject::Ptr& obj, objs) { Dictionary::Ptr result1 = new Dictionary(); result1->Set("type", type->GetName()); @@ -88,6 +90,7 @@ bool DeleteObjectHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& r result1->Set("code", 500); result1->Set("status", "Object could not be deleted."); result1->Set("errors", errors); + success = false; } else { result1->Set("code", 200); result1->Set("status", "Object was deleted."); @@ -97,7 +100,11 @@ bool DeleteObjectHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& r Dictionary::Ptr result = new Dictionary(); result->Set("results", results); - response.SetStatus(200, "OK"); + if (!success) + response.SetStatus(500, "One or more objects could not be deleted"); + else + response.SetStatus(200, "OK"); + HttpUtility::SendJsonBody(response, result); return true; From f386920e60ed0c9878b2676971f2f14a0fb971d0 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 15 Mar 2016 09:46:20 +0100 Subject: [PATCH 23/34] Refactor patch for host recovery notifications refs #10225 --- lib/icinga/checkable-check.cpp | 32 +++++++++++--------------------- lib/icinga/checkable.hpp | 2 +- lib/icinga/host.cpp | 5 +++++ lib/icinga/host.hpp | 1 + lib/icinga/service.cpp | 5 +++++ lib/icinga/service.hpp | 1 + 6 files changed, 24 insertions(+), 22 deletions(-) diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index 3bd5272dc..42dd993f5 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -95,16 +95,6 @@ double Checkable::GetLastCheck(void) const return schedule_end; } -bool Checkable::StateIsOK(CheckableType type, ServiceState state) -{ - if (type == CheckableHost && Host::CalculateState(state) == HostUp) - return true; - else if (type == CheckableService && state == ServiceOK) - return true; - - return false; -} - void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrigin::Ptr& origin) { { @@ -184,13 +174,13 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig if (!old_cr) { SetStateType(StateTypeHard); - } else if (StateIsOK(checkableType, cr->GetState())) { - if (StateIsOK(checkableType, old_state) && old_stateType == StateTypeSoft) { + } else if (IsStateOK(cr->GetState())) { + if (IsStateOK(old_state) && old_stateType == StateTypeSoft) { SetStateType(StateTypeHard); // SOFT OK -> HARD OK recovery = true; } - if (!StateIsOK(checkableType, old_state)) + if (!IsStateOK(old_state)) recovery = true; // NOT OK -> SOFT/HARD OK ResetNotificationNumbers(); @@ -202,17 +192,17 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig } else { if (old_attempt >= GetMaxCheckAttempts()) { SetStateType(StateTypeHard); - } else if (old_stateType == StateTypeSoft && !StateIsOK(checkableType, old_state)) { + } else if (old_stateType == StateTypeSoft && !IsStateOK(old_state)) { SetStateType(StateTypeSoft); - attempt = old_attempt + 1; //NOT-OK -> NOT-OK counter - } else if (StateIsOK(checkableType, old_state)) { + attempt = old_attempt + 1; // NOT-OK -> NOT-OK counter + } else if (IsStateOK(old_state)) { SetStateType(StateTypeSoft); attempt = 1; //OK -> NOT-OK transition, reset the counter } else { attempt = old_attempt; } - if (!StateIsOK(checkableType, cr->GetState())) { + if (!IsStateOK(cr->GetState())) { SaveLastState(cr->GetState(), Utility::GetTime()); } @@ -242,7 +232,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig /* remove acknowledgements */ if (GetAcknowledgement() == AcknowledgementNormal || - (GetAcknowledgement() == AcknowledgementSticky && StateIsOK(checkableType, new_state))) { + (GetAcknowledgement() == AcknowledgementSticky && IsStateOK(new_state))) { ClearAcknowledgement(); } @@ -273,7 +263,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig SetLastHardStateChange(now); } - if (!StateIsOK(checkableType, new_state)) + if (!IsStateOK(new_state)) TriggerDowntimes(); /* statistics for external tools */ @@ -295,10 +285,10 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig if (!old_cr) send_notification = false; /* Don't send notifications for the initial state change */ - if (StateIsOK(checkableType, old_state) && old_stateType == StateTypeSoft) + if (IsStateOK(old_state) && old_stateType == StateTypeSoft) send_notification = false; /* Don't send notifications for SOFT-OK -> HARD-OK. */ - if (is_volatile && StateIsOK(checkableType, old_state) && StateIsOK(checkableType, new_state)) + if (is_volatile && IsStateOK(old_state) && IsStateOK(new_state)) send_notification = false; /* Don't send notifications for volatile OK -> OK changes. */ bool send_downtime_notification = (GetLastInDowntime() != in_downtime); diff --git a/lib/icinga/checkable.hpp b/lib/icinga/checkable.hpp index 4981cf719..849806420 100644 --- a/lib/icinga/checkable.hpp +++ b/lib/icinga/checkable.hpp @@ -92,7 +92,7 @@ public: void UpdateNextCheck(void); bool HasBeenChecked(void) const; - bool StateIsOK(CheckableType type, ServiceState state); + virtual bool IsStateOK(ServiceState state) = 0; virtual double GetLastCheck(void) const override; diff --git a/lib/icinga/host.cpp b/lib/icinga/host.cpp index 5ea6696d0..5fd2dfc47 100644 --- a/lib/icinga/host.cpp +++ b/lib/icinga/host.cpp @@ -182,6 +182,11 @@ HostState Host::GetLastHardState(void) const return CalculateState(GetLastHardStateRaw()); } +bool Host::IsStateOK(ServiceState state) +{ + return Host::CalculateState(state) == HostUp; +} + void Host::SaveLastState(ServiceState state, double timestamp) { if (state == ServiceOK || state == ServiceWarning) diff --git a/lib/icinga/host.hpp b/lib/icinga/host.hpp index 473b2f4af..6622246c8 100644 --- a/lib/icinga/host.hpp +++ b/lib/icinga/host.hpp @@ -55,6 +55,7 @@ public: virtual HostState GetLastState(void) const override; virtual HostState GetLastHardState(void) const override; + virtual bool IsStateOK(ServiceState state) override; virtual void SaveLastState(ServiceState state, double timestamp) override; static HostState StateFromString(const String& state); diff --git a/lib/icinga/service.cpp b/lib/icinga/service.cpp index 05db7f316..a96d6058d 100644 --- a/lib/icinga/service.cpp +++ b/lib/icinga/service.cpp @@ -126,6 +126,11 @@ Host::Ptr Service::GetHost(void) const return m_Host; } +bool Service::IsStateOK(ServiceState state) +{ + return state == ServiceOK; +} + void Service::SaveLastState(ServiceState state, double timestamp) { if (state == ServiceOK) diff --git a/lib/icinga/service.hpp b/lib/icinga/service.hpp index 3588b0948..7b2684c31 100644 --- a/lib/icinga/service.hpp +++ b/lib/icinga/service.hpp @@ -45,6 +45,7 @@ public: virtual bool ResolveMacro(const String& macro, const CheckResult::Ptr& cr, Value *result) const override; + virtual bool IsStateOK(ServiceState state) override; virtual void SaveLastState(ServiceState state, double timestamp) override; static ServiceState StateFromString(const String& state); From 8b941a8db55c9e62c3d5584121da3344344ec3ba Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 3 Mar 2016 13:37:16 +0100 Subject: [PATCH 24/34] Attempt to fix race condition problem with epoll_ctl() refs #11289 --- lib/base/socketevents.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/base/socketevents.cpp b/lib/base/socketevents.cpp index 58d0d1d94..40234e60c 100644 --- a/lib/base/socketevents.cpp +++ b/lib/base/socketevents.cpp @@ -369,13 +369,6 @@ void SocketEvents::ChangeEvents(int events) int tid = m_ID % SOCKET_IOTHREADS; -#ifdef __linux__ - epoll_event event; - memset(&event, 0, sizeof(event)); - event.data.fd = m_FD; - event.events = PollToEpoll(events); - epoll_ctl(l_SocketIOPollFDs[tid], EPOLL_CTL_MOD, m_FD, &event); -#else /* __linux__ */ { boost::mutex::scoped_lock lock(l_SocketIOMutex[tid]); @@ -384,6 +377,13 @@ void SocketEvents::ChangeEvents(int events) if (it == l_SocketIOSockets[tid].end()) return; +#ifdef __linux__ + epoll_event event; + memset(&event, 0, sizeof(event)); + event.data.fd = m_FD; + event.events = PollToEpoll(events); + epoll_ctl(l_SocketIOPollFDs[tid], EPOLL_CTL_MOD, m_FD, &event); +#else /* __linux__ */ if (it->second.Events == events) return; @@ -393,8 +393,10 @@ void SocketEvents::ChangeEvents(int events) m_PFD->events = events; else l_SocketIOFDChanged[tid] = true; +#endif /* __linux__ */ } +#ifndef __linux__ WakeUpThread(); #endif /* __linux__ */ } From 14a5be30e0edd69a14582e04126fd42140e0e041 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 14 Mar 2016 08:45:12 +0100 Subject: [PATCH 25/34] Fix error handling for FeatureUtility::GetFeatures fixes #11349 --- lib/cli/featureutility.cpp | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/lib/cli/featureutility.cpp b/lib/cli/featureutility.cpp index 4d5d869f0..71845b2e8 100644 --- a/lib/cli/featureutility.cpp +++ b/lib/cli/featureutility.cpp @@ -197,30 +197,16 @@ int FeatureUtility::ListFeatures(std::ostream& os) bool FeatureUtility::GetFeatures(std::vector& features, bool get_disabled) { - String path; - /* request all disabled features */ if (get_disabled) { /* disable = available-enabled */ String available_pattern = GetFeaturesAvailablePath() + "/*.conf"; std::vector available; - - if (!Utility::Glob(available_pattern, - boost::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(available)), GlobFile)) { - Log(LogCritical, "cli") - << "Cannot access path '" << path << "'."; - return false; - } + Utility::Glob(available_pattern, boost::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(available)), GlobFile); String enabled_pattern = GetFeaturesEnabledPath() + "/*.conf"; std::vector enabled; - - if (!Utility::Glob(enabled_pattern, - boost::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(enabled)), GlobFile)) { - Log(LogCritical, "cli") - << "Cannot access path '" << path << "'."; - return false; - } + Utility::Glob(enabled_pattern, boost::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(enabled)), GlobFile); std::sort(available.begin(), available.end()); std::sort(enabled.begin(), enabled.end()); @@ -233,12 +219,7 @@ bool FeatureUtility::GetFeatures(std::vector& features, bool get_disable /* all enabled features */ String enabled_pattern = GetFeaturesEnabledPath() + "/*.conf"; - if (!Utility::Glob(enabled_pattern, - boost::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(features)), GlobFile)) { - Log(LogCritical, "cli") - << "Cannot access path '" << path << "'."; - return false; - } + Utility::Glob(enabled_pattern, boost::bind(&FeatureUtility::CollectFeatures, _1, boost::ref(features)), GlobFile); } return true; From 4c7b5f710f94bbfd56db6646b2a8f05666124161 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 14 Mar 2016 08:37:13 +0100 Subject: [PATCH 26/34] Fix crash in ScheduledDowntime::TimerProc fixes #11352 --- lib/icinga/scheduleddowntime.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/icinga/scheduleddowntime.cpp b/lib/icinga/scheduleddowntime.cpp index 75b2d0578..c67bb10b3 100644 --- a/lib/icinga/scheduleddowntime.cpp +++ b/lib/icinga/scheduleddowntime.cpp @@ -106,7 +106,8 @@ void ScheduledDowntime::Start(bool runtimeCreated) void ScheduledDowntime::TimerProc(void) { BOOST_FOREACH(const ScheduledDowntime::Ptr& sd, ConfigType::GetObjectsByType()) { - sd->CreateNextDowntime(); + if (sd->IsActive()) + sd->CreateNextDowntime(); } } From 901618d15b764dd99ec100f224d7040ba4060416 Mon Sep 17 00:00:00 2001 From: Rune Darrud Date: Sun, 13 Mar 2016 23:13:01 +0100 Subject: [PATCH 27/34] Add uninstall to the chocolatey package refs #11369 --- icinga2.nuspec | 1 + tools/chocolateyUninstall.ps1 | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 tools/chocolateyUninstall.ps1 diff --git a/icinga2.nuspec b/icinga2.nuspec index 831bb6693..110e3e5c2 100755 --- a/icinga2.nuspec +++ b/icinga2.nuspec @@ -22,5 +22,6 @@ + diff --git a/tools/chocolateyUninstall.ps1 b/tools/chocolateyUninstall.ps1 new file mode 100644 index 000000000..b9acd34dd --- /dev/null +++ b/tools/chocolateyUninstall.ps1 @@ -0,0 +1,25 @@ +$instDir = "unset" +$uninstaller = "Uninstall.exe" +$icingaRegistry64bitOS = "hklm:\SOFTWARE\Wow6432Node\Icinga Development Team\ICINGA2" +$icingaRegistry32bitOS = "hklm:\SOFTWARE\Icinga Development Team\ICINGA2" +$found = $false +$validExitCodes = @(0) + +if(test-path $icingaRegistry32bitOS) { + $instDir = (get-itemproperty -literalpath $icingaRegistry32bitOS).'(default)' + $found = $true +} +elseif(test-path $icingaRegistry64bitOS) { + $instDir = (get-itemproperty -literalpath $icingaRegistry64bitOS).'(default)' + $found = $true +} +else { + Write-Host "Did not find a path in the registry to the Icinga2 folder, did you use the installer?" +} + +if ($found) { + $packageArgs = "/S ?_=" + $statements = "& `"$instDir\$uninstaller`" $packageArgs`"$instDir`"" + + Start-ChocolateyProcessAsAdmin "$statements" -minimized -validExitCodes $validExitCodes +} From c4f9c34e434e3e716b3695690e443bc62c253476 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 15 Mar 2016 09:35:53 +0100 Subject: [PATCH 28/34] Update AUTHORS refs #11369 --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index fa54517f5..62a91fd21 100644 --- a/AUTHORS +++ b/AUTHORS @@ -70,6 +70,7 @@ Phil Hutchinson Ralph Breier Reto Zeder Ricardo Bartels +Rune Darrud Sam Kottler Sebastian Brückner Sebastian Chrostek From ed4378e52113174f4739e45038d044e65849957b Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 15 Mar 2016 09:45:27 +0100 Subject: [PATCH 29/34] Update development docs to use 'thread apply all bt full' fixes #11385 --- doc/21-development.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/21-development.md b/doc/21-development.md index 62f3ba3e6..204ac76c9 100644 --- a/doc/21-development.md +++ b/doc/21-development.md @@ -156,12 +156,12 @@ a new gdb run. If Icinga 2 aborted its operation abnormally, generate a backtrace. (gdb) bt - (gdb) bt full + (gdb) thread apply all bt full -Generate a full backtrace for all threads and store it into a new file -(e.g. for debugging dead locks): +If Icinga 2 is still running generate a full backtrace from the running +process and store it into a new file (e.g. for debugging dead locks): - # gdb -p PID -batch -ex "thread apply all bt full" -ex "detach" -ex "q" > gdb_bt.log + # gdb -p $(pidof icinga2) -batch -ex "thread apply all bt full" -ex "detach" -ex "q" > gdb_bt.log If you're opening an issue at [https://dev.icinga.org] make sure to attach as much detail as possible. From 307498e71f8ecdbc4a52893aa24ea6a4c02b3edd Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 15 Mar 2016 14:41:24 +0100 Subject: [PATCH 30/34] DB IDO: Fix user notification type filters fixes #10766 --- lib/db_ido/userdbobject.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/db_ido/userdbobject.cpp b/lib/db_ido/userdbobject.cpp index 9c4065071..bb61f4251 100644 --- a/lib/db_ido/userdbobject.cpp +++ b/lib/db_ido/userdbobject.cpp @@ -49,16 +49,20 @@ Dictionary::Ptr UserDbObject::GetConfigFields(void) const fields->Set("host_notifications_enabled", user->GetEnableNotifications()); fields->Set("service_notifications_enabled", user->GetEnableNotifications()); fields->Set("can_submit_commands", 1); - fields->Set("notify_service_recovery", (user->GetTypeFilter() & NotificationRecovery) != 0); - fields->Set("notify_service_warning", (user->GetStateFilter() & StateFilterWarning) != 0); - fields->Set("notify_service_unknown", (user->GetStateFilter() & StateFilterUnknown) != 0); - fields->Set("notify_service_critical", (user->GetStateFilter() & StateFilterCritical) != 0); - fields->Set("notify_service_flapping", (user->GetTypeFilter() & (NotificationFlappingStart | NotificationFlappingEnd)) != 0); - fields->Set("notify_service_downtime", (user->GetTypeFilter() & (NotificationDowntimeStart | NotificationDowntimeEnd | NotificationDowntimeRemoved)) != 0); - fields->Set("notify_host_recovery", (user->GetTypeFilter() & NotificationRecovery) != 0); - fields->Set("notify_host_down", (user->GetStateFilter() & StateFilterDown) != 0); - fields->Set("notify_host_flapping", (user->GetTypeFilter() & (NotificationFlappingStart | NotificationFlappingEnd)) != 0); - fields->Set("notify_host_downtime", (user->GetTypeFilter() & (NotificationDowntimeStart | NotificationDowntimeEnd | NotificationDowntimeRemoved)) != 0); + + int typeFilter = user->GetTypeFilter(); + int stateFilter = user->GetStateFilter(); + + fields->Set("notify_service_recovery", (typeFilter & (1 << NotificationRecovery)) != 0); + fields->Set("notify_service_warning", (stateFilter & StateFilterWarning) != 0); + fields->Set("notify_service_unknown", (stateFilter & StateFilterUnknown) != 0); + fields->Set("notify_service_critical", (stateFilter & StateFilterCritical) != 0); + fields->Set("notify_service_flapping", (typeFilter & ((1 << NotificationFlappingStart) | (1 << NotificationFlappingEnd))) != 0); + fields->Set("notify_service_downtime", (typeFilter & ((1 << NotificationDowntimeStart) | (1 << NotificationDowntimeEnd) | (1 << NotificationDowntimeRemoved))) != 0); + fields->Set("notify_host_recovery", (typeFilter & (1 << NotificationRecovery)) != 0); + fields->Set("notify_host_down", (stateFilter & StateFilterDown) != 0); + fields->Set("notify_host_flapping", (typeFilter & ((1 << NotificationFlappingStart) | (1 << NotificationFlappingEnd))) != 0); + fields->Set("notify_host_downtime", (typeFilter & ((1 << NotificationDowntimeStart) | (1 << NotificationDowntimeEnd) | (1 << NotificationDowntimeRemoved))) != 0); return fields; } From ba989f4802700dc65084cb71ff0e0079799c5363 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 15 Mar 2016 15:26:22 +0100 Subject: [PATCH 31/34] ITL: Add additional http check command parameters for SSL version enforcement refs #10358 --- doc/7-icinga-template-library.md | 83 +++++++++++++++++--------------- itl/command-plugins.conf | 21 ++++++++ 2 files changed, 66 insertions(+), 38 deletions(-) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 4f75b4c96..3cb6d2e21 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -429,44 +429,51 @@ Check command object for the `check_http` plugin. Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): -Name | Description --------------------------|-------------- -http_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise. -http_vhost | **Optional.** The virtual host that should be sent in the "Host" header. -http_uri | **Optional.** The request URI for GET or POST. Defaults to `/`. -http_port | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise. -http_ssl | **Optional.** Whether to use SSL. Defaults to false. -http_ssl_force_tlsv1 | **Optional.** Whether to force TLSv1. -http_ssl_force_sslv2 | **Optional.** Whether to force SSLv2. -http_ssl_force_sslv3 | **Optional.** Whether to force SSLv3. -http_sni | **Optional.** Whether to use SNI. Defaults to false. -http_auth_pair | **Optional.** Add 'username:password' authorization pair. -http_proxy_auth_pair | **Optional.** Add 'username:password' authorization pair for proxy. -http_ignore_body | **Optional.** Don't download the body, just the headers. -http_linespan | **Optional.** Allow regex to span newline. -http_expect_body_regex | **Optional.** A regular expression which the body must match against. Incompatible with http_ignore_body. -http_expect_body_eregi | **Optional.** A case-insensitive expression which the body must match against. Incompatible with http_ignore_body. -http_invertregex | **Optional.** Changes behaviour of http_expect_body_regex and http_expect_body_eregi to return CRITICAL if found, OK if not. -http_warn_time | **Optional.** The warning threshold. -http_critical_time | **Optional.** The critical threshold. -http_expect | **Optional.** Comma-delimited list of strings, at least one of them is expected in the first (status) line of the server response. Default: HTTP/1. -http_certificate | **Optional.** Minimum number of days a certificate has to be valid. Port defaults to 443. -http_clientcert | **Optional.** Name of file contains the client certificate (PEM format). -http_privatekey | **Optional.** Name of file contains the private key (PEM format). -http_headerstring | **Optional.** String to expect in the response headers. -http_string | **Optional.** String to expect in the content. -http_post | **Optional.** URL encoded http POST data. -http_method | **Optional.** Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE). -http_maxage | **Optional.** Warn if document is more than seconds old. -http_contenttype | **Optional.** Specify Content-Type header when POSTing. -http_useragent | **Optional.** String to be sent in http header as User Agent. -http_header | **Optional.** Any other tags to be sent in http header. -http_extendedperfdata | **Optional.** Print additional perfdata. Defaults to false. -http_onredirect | **Optional.** How to handle redirect pages. Possible values: "ok" (default), "warning", "critical", "follow", "sticky" (like follow but stick to address), "stickyport" (like sticky but also to port) -http_pagesize | **Optional.** Minimum page size required:Maximum page size required. -http_timeout | **Optional.** Seconds before connection times out. -http_ipv4 | **Optional.** Use IPv4 only. -http_ipv6 | **Optional.** Use IPv6 only. +Name | Description +---------------------------------|--------------------------------- +http_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise. +http_vhost | **Optional.** The virtual host that should be sent in the "Host" header. +http_uri | **Optional.** The request URI for GET or POST. Defaults to `/`. +http_port | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise. +http_ssl | **Optional.** Whether to use SSL. Defaults to false. +http_ssl_force_tlsv1 | **Optional.** Whether to force TLSv1. +http_ssl_force_tlsv1_1 | **Optional.** Whether to force TLSv1.1. +http_ssl_force_tlsv1_2 | **Optional.** Whether to force TLSv1.2. +http_ssl_force_sslv2 | **Optional.** Whether to force SSLv2. +http_ssl_force_sslv3 | **Optional.** Whether to force SSLv3. +http_ssl_force_tlsv1_or_higher | **Optional.** Whether to force TLSv1 or higher. +http_ssl_force_tlsv1_1_or_higher | **Optional.** Whether to force TLSv1.1 or higher. +http_ssl_force_tlsv1_2_or_higher | **Optional.** Whether to force TLSv1.2 or higher. +http_ssl_force_sslv2_or_higher | **Optional.** Whether to force SSLv2 or higher. +http_ssl_force_sslv3_or_higher | **Optional.** Whether to force SSLv3 or higher. +http_sni | **Optional.** Whether to use SNI. Defaults to false. +http_auth_pair | **Optional.** Add 'username:password' authorization pair. +http_proxy_auth_pair | **Optional.** Add 'username:password' authorization pair for proxy. +http_ignore_body | **Optional.** Don't download the body, just the headers. +http_linespan | **Optional.** Allow regex to span newline. +http_expect_body_regex | **Optional.** A regular expression which the body must match against. Incompatible with http_ignore_body. +http_expect_body_eregi | **Optional.** A case-insensitive expression which the body must match against. Incompatible with http_ignore_body. +http_invertregex | **Optional.** Changes behaviour of http_expect_body_regex and http_expect_body_eregi to return CRITICAL if found, OK if not. +http_warn_time | **Optional.** The warning threshold. +http_critical_time | **Optional.** The critical threshold. +http_expect | **Optional.** Comma-delimited list of strings, at least one of them is expected in the first (status) line of the server response. Default: HTTP/1. +http_certificate | **Optional.** Minimum number of days a certificate has to be valid. Port defaults to 443. +http_clientcert | **Optional.** Name of file contains the client certificate (PEM format). +http_privatekey | **Optional.** Name of file contains the private key (PEM format). +http_headerstring | **Optional.** String to expect in the response headers. +http_string | **Optional.** String to expect in the content. +http_post | **Optional.** URL encoded http POST data. +http_method | **Optional.** Set http method (for example: HEAD, OPTIONS, TRACE, PUT, DELETE). +http_maxage | **Optional.** Warn if document is more than seconds old. +http_contenttype | **Optional.** Specify Content-Type header when POSTing. +http_useragent | **Optional.** String to be sent in http header as User Agent. +http_header | **Optional.** Any other tags to be sent in http header. +http_extendedperfdata | **Optional.** Print additional perfdata. Defaults to false. +http_onredirect | **Optional.** How to handle redirect pages. Possible values: "ok" (default), "warning", "critical", "follow", "sticky" (like follow but stick to address), "stickyport" (like sticky but also to port) +http_pagesize | **Optional.** Minimum page size required:Maximum page size required. +http_timeout | **Optional.** Seconds before connection times out. +http_ipv4 | **Optional.** Use IPv4 connection. Defaults to false. +http_ipv6 | **Optional.** Use IPv6 connection. Defaults to false. ### icmp diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index e017952db..3763b93ee 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -334,12 +334,33 @@ object CheckCommand "http" { "-S1" = { set_if = "$http_ssl_force_tlsv1$" } + "-S1.1" = { + set_if = "$http_ssl_force_tlsv1_1$" + } + "-S1.2" = { + set_if = "$http_ssl_force_tlsv1_2$" + } "-S2" = { set_if = "$http_ssl_force_sslv2$" } "-S3" = { set_if = "$http_ssl_force_sslv3$" } + "-S1+" = { + set_if = "$http_ssl_force_tlsv1_or_higher$" + } + "-S1.1+" = { + set_if = "$http_ssl_force_tlsv1_1_or_higher$" + } + "-S1.2+" = { + set_if = "$http_ssl_force_tlsv1_2_or_higher$" + } + "-S2+" = { + set_if = "$http_ssl_force_sslv2_or_higher$" + } + "-S3+" = { + set_if = "$http_ssl_force_sslv3_or_higher$" + } "--sni" = { set_if = "$http_sni$" } From 23295351f33c23d275eafc5d7ba008deeac91e43 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 15 Mar 2016 15:44:17 +0100 Subject: [PATCH 32/34] ITL: Missing documentation for nwc_health "mode" parameter fixes #11107 --- doc/7-icinga-template-library.md | 3 ++- itl/plugins-contrib.d/network-components.conf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 3cb6d2e21..1aa5e3094 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -1995,9 +1995,10 @@ Custom attributes passed as [command parameters](3-monitoring-basics.md#command- Name | Description --------------------------------|--------------------------------------------------------- +nwc_health_hostname | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise. +nwc_health_mode | **Optional.** The plugin mode. A list of all available modes can be found in the [plugin documentation](https://labs.consol.de/nagios/check_nwc_health/index.html). nwc_health_timeout | **Optional.** Seconds before plugin times out (default: 15) nwc_health_blacklist | **Optional.** Blacklist some (missing/failed) components. -nwc_health_hostname | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise. nwc_health_port | **Optional.** The SNMP port to use (default: 161). nwc_health_domain | **Optional.** The transport domain to use (default: udp/ipv4, other possible values: udp6, udp/ipv6, tcp, tcp4, tcp/ipv4, tcp6, tcp/ipv6). nwc_health_protocol | **Optional.** The SNMP protocol to use (default: 2c, other possibilities: 1,3). diff --git a/itl/plugins-contrib.d/network-components.conf b/itl/plugins-contrib.d/network-components.conf index 5f8592cbf..86a9aa121 100644 --- a/itl/plugins-contrib.d/network-components.conf +++ b/itl/plugins-contrib.d/network-components.conf @@ -509,7 +509,7 @@ object CheckCommand "nwc_health" { } "--mode" = { value = "$nwc_health_mode$" - description = "A keyword which tells the plugin what to do" + description = "Which mode should be executed. A list of all available modes can be found in the plugin documentation" } "--name" = { value = "$nwc_health_name$" From 8aab74802c3df467cdcd5b13f3b96d03cd37ba2e Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 15 Mar 2016 14:04:49 +0100 Subject: [PATCH 33/34] Update .mailmap refs #11328 --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index c24dfb328..45dbb9003 100644 --- a/.mailmap +++ b/.mailmap @@ -8,3 +8,4 @@ Jean-Marcel Flach Dolf Schimmel Markus Waldmüller Claudio Kuenzler + From 460c25b94d3acd119e35e23e5edb6863aaa27f8e Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 16 Mar 2016 09:48:27 +0100 Subject: [PATCH 34/34] Release version 2.4.4 --- ChangeLog | 35 +++++++++++++++++++++++++++++++++++ RELEASE.md | 6 +++--- doc/1-about.md | 35 +++++++++++++++++++++++++++++++++++ icinga2.nuspec | 2 +- icinga2.spec | 2 +- tools/chocolateyInstall.ps1 | 2 +- 6 files changed, 76 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2257e0e6f..9114b8fae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,41 @@ Please check [doc/1-about.md]. ## What's New +### What's New in Version 2.4.4 + +#### Feature + +* Feature 10358: ITL: Allow to enforce specific SSL versions using the http check command +* Feature 11205: Add "query" option to check_postgres command. + +#### Bugfixes + +* Bug 9642: Flapping notifications are sent for hosts/services which are in a downtime +* Bug 9969: Problem notifications while Flapping is active +* Bug 10225: Host notification type is PROBLEM but should be RECOVERY +* Bug 10231: MkDirP not working on Windows +* Bug 10766: DB IDO: User notification type filters are incorrect +* Bug 10770: Status code 200 even if an object could not be deleted. +* Bug 10795: http check's URI is really just Path +* Bug 10976: Explain how to join hosts/services for /v1/objects/comments +* Bug 11107: ITL: Missing documentation for nwc_health "mode" parameter +* Bug 11159: Common name in node wizard isn't case sensitive +* Bug 11208: CMake does not find MySQL libraries on Windows +* Bug 11209: Wrong log message for trusted cert in node setup command +* Bug 11240: DEL_DOWNTIME_BY_HOST_NAME does not accept optional arguments +* Bug 11248: Active checks are executed even though passive results are submitted +* Bug 11257: Incorrect check interval when passive check results are used +* Bug 11273: Services status updated multiple times within check_interval even though no retry was triggered +* Bug 11289: epoll_ctl might cause oops on Ubuntu trusty +* Bug 11320: Volatile transitions from HARD NOT-OK->NOT-OK do not trigger notifications +* Bug 11328: Typo in API docs +* Bug 11331: Update build requirements for SLES 11 SP4 +* Bug 11349: 'icinga2 feature list' fails when all features are disabled +* Bug 11350: Docs: Add API examples for creating services and check commands +* Bug 11352: Segmentation fault during 'icinga2 daemon -C' +* Bug 11369: Chocolatey package is missing uninstall function +* Bug 11385: Update development docs to use 'thread apply all bt full' + ### What's New in Version 2.4.3 #### Bugfixes diff --git a/RELEASE.md b/RELEASE.md index 3572eabcf..4c563d88f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -30,15 +30,15 @@ the changelog.py script. Also generate HTML for the wordpress release announceme Changelog: - $ ./changelog.py --version 2.4.2 --project i2 + $ ./changelog.py --version 2.4.4 --project i2 Docs: - $ ./changelog.py --version 2.4.2 --project i2 --links + $ ./changelog.py --version 2.4.4 --project i2 --links Wordpress: - $ ./changelog.py --version 2.4.2 --project i2 --html --links + $ ./changelog.py --version 2.4.4 --project i2 --html --links ## Git Tag diff --git a/doc/1-about.md b/doc/1-about.md index 794e6c293..3dcd56a6c 100644 --- a/doc/1-about.md +++ b/doc/1-about.md @@ -54,6 +54,41 @@ More details in the [Icinga FAQ](https://www.icinga.org/icinga/faq/). ## What's New +### What's New in Version 2.4.4 + +#### Feature + +* Feature [10358](https://dev.icinga.org/issues/10358 "Feature 10358"): ITL: Allow to enforce specific SSL versions using the http check command +* Feature [11205](https://dev.icinga.org/issues/11205 "Feature 11205"): Add "query" option to check_postgres command. + +#### Bugfixes + +* Bug [9642](https://dev.icinga.org/issues/9642 "Bug 9642"): Flapping notifications are sent for hosts/services which are in a downtime +* Bug [9969](https://dev.icinga.org/issues/9969 "Bug 9969"): Problem notifications while Flapping is active +* Bug [10225](https://dev.icinga.org/issues/10225 "Bug 10225"): Host notification type is PROBLEM but should be RECOVERY +* Bug [10231](https://dev.icinga.org/issues/10231 "Bug 10231"): MkDirP not working on Windows +* Bug [10766](https://dev.icinga.org/issues/10766 "Bug 10766"): DB IDO: User notification type filters are incorrect +* Bug [10770](https://dev.icinga.org/issues/10770 "Bug 10770"): Status code 200 even if an object could not be deleted. +* Bug [10795](https://dev.icinga.org/issues/10795 "Bug 10795"): http check's URI is really just Path +* Bug [10976](https://dev.icinga.org/issues/10976 "Bug 10976"): Explain how to join hosts/services for /v1/objects/comments +* Bug [11107](https://dev.icinga.org/issues/11107 "Bug 11107"): ITL: Missing documentation for nwc_health "mode" parameter +* Bug [11159](https://dev.icinga.org/issues/11159 "Bug 11159"): Common name in node wizard isn't case sensitive +* Bug [11208](https://dev.icinga.org/issues/11208 "Bug 11208"): CMake does not find MySQL libraries on Windows +* Bug [11209](https://dev.icinga.org/issues/11209 "Bug 11209"): Wrong log message for trusted cert in node setup command +* Bug [11240](https://dev.icinga.org/issues/11240 "Bug 11240"): DEL_DOWNTIME_BY_HOST_NAME does not accept optional arguments +* Bug [11248](https://dev.icinga.org/issues/11248 "Bug 11248"): Active checks are executed even though passive results are submitted +* Bug [11257](https://dev.icinga.org/issues/11257 "Bug 11257"): Incorrect check interval when passive check results are used +* Bug [11273](https://dev.icinga.org/issues/11273 "Bug 11273"): Services status updated multiple times within check_interval even though no retry was triggered +* Bug [11289](https://dev.icinga.org/issues/11289 "Bug 11289"): epoll_ctl might cause oops on Ubuntu trusty +* Bug [11320](https://dev.icinga.org/issues/11320 "Bug 11320"): Volatile transitions from HARD NOT-OK->NOT-OK do not trigger notifications +* Bug [11328](https://dev.icinga.org/issues/11328 "Bug 11328"): Typo in API docs +* Bug [11331](https://dev.icinga.org/issues/11331 "Bug 11331"): Update build requirements for SLES 11 SP4 +* Bug [11349](https://dev.icinga.org/issues/11349 "Bug 11349"): 'icinga2 feature list' fails when all features are disabled +* Bug [11350](https://dev.icinga.org/issues/11350 "Bug 11350"): Docs: Add API examples for creating services and check commands +* Bug [11352](https://dev.icinga.org/issues/11352 "Bug 11352"): Segmentation fault during 'icinga2 daemon -C' +* Bug [11369](https://dev.icinga.org/issues/11369 "Bug 11369"): Chocolatey package is missing uninstall function +* Bug [11385](https://dev.icinga.org/issues/11385 "Bug 11385"): Update development docs to use 'thread apply all bt full' + ### What's New in Version 2.4.3 #### Bugfixes diff --git a/icinga2.nuspec b/icinga2.nuspec index 110e3e5c2..a8990fbc3 100755 --- a/icinga2.nuspec +++ b/icinga2.nuspec @@ -6,7 +6,7 @@ icinga2 Icinga2 - 2.4.3 + 2.4.4 2016 - The Icinga Project Icinga Development Team icinga2 - Monitoring Agent for Windows diff --git a/icinga2.spec b/icinga2.spec index 3a237f4ea..261d85e96 100644 --- a/icinga2.spec +++ b/icinga2.spec @@ -66,7 +66,7 @@ Summary: Network monitoring application Name: icinga2 -Version: 2.4.3 +Version: 2.4.4 Release: %{revision}%{?dist} License: GPL-2.0+ Group: Applications/System diff --git a/tools/chocolateyInstall.ps1 b/tools/chocolateyInstall.ps1 index 67ac51192..bec387eca 100755 --- a/tools/chocolateyInstall.ps1 +++ b/tools/chocolateyInstall.ps1 @@ -1,6 +1,6 @@ $packageName = 'icinga2' $installerType = 'exe' -$url = 'http://packages.icinga.org/windows/Icinga2-v2.4.3.exe' +$url = 'http://packages.icinga.org/windows/Icinga2-v2.4.4.exe' $silentArgs = '/S' $validExitCodes = @(0)