From 22f341bd26a484579dda94fd70df80d41141a3b3 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Thu, 6 Aug 2020 18:40:38 +0200 Subject: [PATCH] Adds additional notes for new check configuration handling #95 --- doc/30-upgrading-framework.md | 2 ++ doc/31-Changelog.md | 4 ++++ lib/core/tools/Get-IcingaCheckCommandConfig.psm1 | 2 ++ 3 files changed, 8 insertions(+) diff --git a/doc/30-upgrading-framework.md b/doc/30-upgrading-framework.md index c0f97f4..6117c27 100644 --- a/doc/30-upgrading-framework.md +++ b/doc/30-upgrading-framework.md @@ -10,6 +10,8 @@ Specific version upgrades are described below. Please note that version updates #### Changes on check command execution +**Breaking Change/Important Note:** Check Command configuration generated by Icinga for Windows 1.2.0 require Icinga for Windows 1.2.0 or later deployed on all systems, otherwise you will run into issues with an unknown command `Exit-IcingaPluginNotInstalled` error. + As mentioned in [#95](https://github.com/Icinga/icinga-powershell-framework/issues/95) we should make sure that in case the Framework itself is not installed on a system or plugins are missing the user is informed about this. We do how ever not intend to print huge stack traces of PowerShell errors into the console, but inform in a minimalistic way about this. For this reason we will cover with a Try-Catch statement if the `Use-Icinga` command is executed and return a proper message and error code on failures. In addition we will now check of a plugin is installed before the execution of it, ensuring that in case it is not present on the system we receive an `Unknown` message that a certain plugin is not installed or present. diff --git a/doc/31-Changelog.md b/doc/31-Changelog.md index 4796b47..3feab10 100644 --- a/doc/31-Changelog.md +++ b/doc/31-Changelog.md @@ -13,6 +13,10 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic ### Upgrading Notes +#### Breaking change with non-equal versions + +Check Command configuration generated by Icinga for Windows 1.2.0 require Icinga for Windows 1.2.0 or later deployed on all systems, otherwise you will run into issues with an unknown command `Exit-IcingaPluginNotInstalled` error. + * To properly catch errors on check execution you will have to import check commands as Director basket again by using `Get-IcingaCheckCommandConfig`. Further details can be found in the [upgrading docs](30-upgrading-framework.md) ### Notes diff --git a/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 b/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 index 4a31d6d..cec2033 100644 --- a/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 +++ b/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 @@ -324,6 +324,7 @@ function Get-IcingaCheckCommandConfig() Write-IcingaConsoleNotice "- '$check'"; } Write-IcingaConsoleNotice "JSON export created in '${OutDirectory}'" + Write-IcingaConsoleWarning 'By using this generated check command configuration you will require the Icinga PowerShell Framework 1.2.0 or later to be installed on ALL monitored machines!'; return; } @@ -331,6 +332,7 @@ function Get-IcingaCheckCommandConfig() foreach ($check in $CheckName) { Write-IcingaConsoleNotice "- '$check'" } + Write-IcingaConsoleWarning 'By using this generated check command configuration you will require the Icinga PowerShell Framework 1.2.0 or later to be installed on ALL monitored machines!'; Write-IcingaConsoleNotice '############################################################'; return $output;