Fix: StackOverflowException on invalid ThresholdInterval
By using an invalid `-ThresholdInterval` argument, PowerShell will terminate itself with `StackOverflowException`, caused by a loop while creating default threshold values.
Fix: Unhandled exception on Icinga Cache
Fixes unhandled exception on `Set-IcingaCacheData`, as the `-ErrorAction Stop` argument was not set and therefor the function never halted on errors.
Fix: Test-Numeric allows no negative value and TimeSpan conversion ignores negatives and microseconds
Fixes `Test-Numeric` to now accept negative numeric values and als fixes errors, causing `.` to be allowed multiple times. `ConvertFrom-TimeSpan` now properly prints on negative values if the time provided is positive or negative and also prints microseconds as `us` in case the value is loer than `1ms`
Feature: Adds first handling for Framework link speeds
Adds initial handling for handling link speeds or anything else by using new units and conversions, which were formerly used inside the Network plugin and corresponding provider.
Fix: Removes colon at the end of the packlage summary
Removes the `:` at the end of a package message, in case no additional text input is present on this line
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