Feature: Rework IMC menu and extend feature set
Reworks the menu structure of the Icinga for Windows Management Console and makes it the default when running the command `icinga`.
For developers you can use `icinga -Shell` to receive the Icinga shell as before. In addition improves error handling of IMC, by caching all `Errors` and `Warnings` during action execution, printing them afterwards.
Fix: Add-IcingaRepository removes and adds repository with -Force
Fixes `Add-IcingaRepository` which now only overrides the `RemotePath` by using `-Force` instead of removing and adding the repository again, causing problems with installation orders over IMC for example
Fix: Icinga Agent not configured properly if not installed over IMC and installation disabled there
Fixes Icinga Agent installation over IMC and Director Self-Service, in case the Self-Service is configured to not install the Icinga Agent or the user manually set `Do not install Icinga Agent` inside the IMC, which results in most configurations not being applied to the Agent, in case it is already installed
Fix: Update-Icinga not working between snapshot/stable
Fixes `Update-Icinga` which now supports to update from a snapshot branch and to downgrade properly from snapshot to stable to the latest release packages again.
**NOTE:** It is still **not** entirely supported to downgrade from snapshot to stable, as possible migrations for later versions will **not** be rolled back.
Fix: Install-IcingaSecurity should only run in administrative shell
We have to ensure that `Install-IcingaSecurity` is only allowed to be excuted from an administrative shell to not cause any errors.
Fix: JEA service error count not resetting itself
While running the Icinga for Windows service in JEA context, it can happen that the corresponding WinRM service is restarted or terminated. The service daemon will keep an eye on that and restart the JEA session up to 5 times, before terminating the service and printing an error.
This fix will not add a grace period, which will reset the failure counter in case the service was running for more than 3 minutes. Which is more then enough runtime to not asume a faulty service behavior.
Feature: Adds support for check_by_icingaforwindows.ps1
Adds support for the remote execution plugin [check_by_icingaforwindows](https://github.com/LordHepipud/check_by_icingaforwindows), allowing to check from a Linux or Windows remote host by using WinRM to a target Windows machine.
Fully supports JEA profiles, but requires powershell installed on the Linux machine.
Fix: Background daemon not working in JEA context
The current implementation of the Icinga for Windows background daemon was not working entirely by using JEa profiles.
We fixed the behavior by resolving a problem within our JEA profile catalog builder as well as other factors causing issues. All background daemons will now work properly inside the JEA context.
Fix: Get-IcingaServices returns unknown for StartType on wildcards
Fixes `Get\-IcingaServices` which returned `Unknown` for service `StartType`, in case the `-Service` argument contained values with wildcard `*`.
Example:
```powershell
$result = (Get-IcingaServices -Service 'icinga*');
$result.values.configuration.starttype;
$result.values.metadata.DisplayName
Name Value
---- -----
value Unknown
raw 5
value Unknown
raw 5
Icinga PowerShell Service
Icinga 2
```
Fixes#443
Fix: JEA context cannot be created and command not found output
Fixes the PowerShell not being able to enter the JEA context, if only the Icinga PowerShell Framework is installed and no other component like plugins being present.
Fixes in addition the output for the JEA PowerShell, in case a check command cannot be executed. Previously the pipe `|` for performance data was always added, which is now gone.
Feature: Improve show commands and extend Show-Icinga
Improves show command `Show-IcingaRegisteredServiceChecks` to use new layout for displaying information and adds new command `Show-IcingaRegisteredBackgroundDaemons`, following the same layout and possiblity.
In addition extends `Show-Icinga` by both commands and adds debug and api forwarder features to environment list.
Fix: Error handling for failed module import
Adds improved exception handling for using `Install\-IcingaComponent` while importing of modules failed, because of missing dependencies for example.
Feature: Adds support to sort arrays without ScriptBlocks
Adds a new function, allowing to sort arrays with objects inside for specific members wihtout having to use ScriptBlocks on external modules.
This allows a secure usage even in JEA context and external modules are not blocked by calling `ScriptBlocks`
Feature: Supresses error messages on progress status
Adds `-PrintErrors` to `New-IcingaProgressStatus`, surpressing all errors by default, allowing to add this for testing internally.
Fix: Reworks progress preference to remove ui glitches
Reworked Icinga for Windows progress status writer, which now properly closes progress status windows and allows to force close them afterwards, fixing previous UI glitches.
Feature: Adds command to repair Icinga Agent service
In some cases it can happen, that during an upgrade of the Icinga Agent, the service fails because on how the .msi installer works.
This adds a new Cmdlet `Repair-IcingaService`, which resolves the problem and repairs the service.
Fix: Exception on Use-Icinga
In some cases it can happen, that Icinga for Windows throws an exception while using \\\`Use\\\-Icinga\\\`. This happens because of an internal handling for rebuilding the cache, which tried to re\\\-import the modules.
This code seems no longer to be required and causes only problems while trying to use \\\`Use\\\-Icinga\\\` while inside the same shell, that Icinga for Windows is being installed the first time in.
As this seems no longer to be required, we will remove this code.
Fix: Exception on loading by missing environment
Fixes an exception while loading the Framework, caused by a race condition for missing environment variables which are accessed by some plugins before the Framework is loaded properly.