Fix: Performance Data was not written for checks which were not compared to a threshold
Fixes an issue for Performance Data, which mainly occurs for hidden packages and checks, as there was no action taking place to "use" the provided value in someway. This caused the performance data object not being generated and threfor was not added to the check output.
Fix: Numeric converison to comparing thresholds is incorrect
Fixes values to be transformed properly to `decimal` to compare them against thresholds provided
Fix: Unhandled units might cause exception on maximum compare
Unhandled units like `c` are causing exceptions, in case they are used as maximum or base value.
Fix: Array handling on log analyser and adds timestamp to output
Improves `Show-IcingaEventLogAnalysis` by properly handling array logs and only processing the first entry while also adding timestamps for the newest and oldest eventog entry
Fixes#246
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`