Feature: Re-Write execution of checks
We re-dessigned the handling on how checks are executed internally, to make configuration, extension and adding future features even more easier.
What is new:
* Allows to specify generic % values for thresholds, in case you added the `BaseValue` argument with the basic value for your input value to compare them as % for each other: `New-IcingaCheck -BaseValue $partition.Size`
* Allows to check for defined thresholds intervalls by the Icinga for Windows daemon, by adding `-ThresholdInterval 15m` for example to your check execution: `Invoke-IcingaCheckCPU -ThresholdInterval 1m -Warning 60%`
* Values of output data which are defined as Bytes, seconds or anything related will now always be properly translated for better readability
* Provided translations for example service states are anything related are improvement and will always apply now
* There is an optional `-AddSummary` header available, which now adds in addition to the current package header the number of Unknown, Critical, Warning or Ok services (requires Plugin update)
* In case a check is not ok, it will not added to the first package including the current value of the check for better overview
* The check functions `SetOk()`, `SetWarning()`, `SetCritical()`, `SetUnknown()` for `New-IcingaCheck` now support a input message as first value to print informations on why the check is in this state, including a `bool` value as second argument, which will look the entire check object in this state, making it unmodifyable in case it is set to `$TRUE`: `$check.SetUnknown('Your partition could not be read', $TRUE) | Out-Null`
Fix: Self Service for removed hosts/keys inside Icinga Director
Fixes error while using Icinga Director Self-Service API, in case the host or host API key was deleted inside the Icinga Director and the installation wizard was called with the correct template key, while the old host key was still present inside the Icinga for Windows configuration
Feature: Stop Icinga Agent during Framework upgrade
In some rare cases it can happen that during the upgrade of the Icinga PowerShell Framework, files are still used caused by the Icinga Agent running in the background.
To remove this impact, we will now stop the Icinga Agent in case it is running before upgrading the Framework and starting the Icinga Agent again, in case it was started before.
Feature: Inform the user if plugins are executed which are not meeting dependency requirements
Improve error handling on plugin execution by informing the user if the plugin is simply not installed or the entire module was not loaded because of errors or missing dependencies
Fixes#250
Feature: Improve test if Performance Counter category exist
This will improve `Test-IcingaPerformanceCounterCategory` by creating an object for the Performance Counter category provided and checking if it is a valid object instead of relying on the registry which might not contain all categories in the correct language.
Feature: Suppress other messages then plugin output
Adds feature to suppress any kind of console output except for plugin output and performance data, while Icinga for Windows is initialised with `Use-Icinga -Minimal`
Fix: Exit-IcingaExecutePlugin throws exception for localized PerfCounters
Encoding for REST-Api check calls was wrong during queue and while reading the result. We will now enfore UTF8 in both ways.
Fixes#232
If you tried this
Use-Icinga; Get-IcingaSSLCertForSocket -CertFile "C:/my/cert.pfx"
the former code expanded like
$FileType = Get-Item -Path "C:/my/cert.pfx";
if ("cert.pfx" -eq '.pfx') { ... not reached ... }
and thus did not load the certificate file.
Now use GetExtension instead of Get-Item to make the .pfx check work.
Fix: Adds missing attributes for services
While filtering for certain services with `Get-IcingaServices`, there were some attributes missing from the collection. These are now added resulting in always correct output data.
Feature: Hide SecureString CustomFields input in Icinga Director
Adds feature to mask CustomField input values with `*` within the Icinga Director, in case the argument is defined as `SecureString`. Please ensure to read the [upgrading docs](https://icinga.com/docs/icinga-for-windows/latest/doc/30-upgrading-framework/) carefully, before importing new configurations.
Fixes#229
Adds Cmdlet for analysing EventLog content
Adds new Cmdlet `Show-IcingaEventLogAnalysis` to get a better overview on how many log entries are present within the EventLog based on hour, minute and day average/maximum for allowing a more dynamic configuration for `Invoke-IcingaCheckEventLog`
Fix wrong plugin not installed unknown checkresult
Unknown checks for the plugin handler were called to soon, as the minimal configuration does not load old check commands for the plugins.
In addition API checks did not throw an unknown and were not catched properly
Feature: Adds experimental Feature "Management Console"
Adds new experimental feature `Management Console` for better and easier management for Icinga for Windows and improved automation and deployed.
In addition following changes were made:
* Added support to fetch network interface for `Register-IcingaDirectorSelfServiceHost` directly from provided director url
* Added support for Icinga Framework Code Cache file being deleted once the feature is disabled
* Added support to suppress any console output for the current PowerShell session by using `Disable-IcingaFrameworkConsoleOutput` and to enable it again by using `Enable-IcingaFrameworkConsoleOutput`
* Added support for `-Release` argument for `Get-IcingaFrameworkServiceBinary` suppressing questions and using GitHub as source directly if set
* Added support to color console output by using `Write-IcingaConsolePlain` with the new argument `-ForeColor`
* Added new feature to write Icinga for Windows console headers more easily, better structured and formatted with `Write-IcingaConsoleHeader` by adding line content as array elements
* Fixed possible crash on `Get-IcingaAgentFeatures` if PowerShell is not running as administrator and therefor the command `icinga2 feature list` can not be processed
* Fixed `ConvertTo-IcingaSecureString` to return `$null` for empty strings instead of throwing an exception