Fix: Argument does not support percent unit error messagae
Fixes error message `This argument does not support the % unit` in case a `BaseValue` is set, but the actual value is `0`
Fix: RemoteSouce being cleared during Update-IcingaRepository
Fixes `RemoteSource` being cleared within repository `.json` files during `Update-IcingaRepository` tasks
Fix: Encoding problems with special chars or German umlauts
Fixes Icinga for Windows plugin execution, by converting all parsed arguments and values from Icinga 2 from the `Default` of the PowerShell to `UTF8`.
This resolves issues during plugin execution on which arguments like `-Path`, `-TaskName` or anything else contained characters like `äöüß`.
In addition, we created an internal `StringBuilder` to resolve current issues on which unescaped strings within the Icinga configuration like `Icinga for Windows` instead of `'Icinga for Windows'`, are interpreted as `Icinga` instead of `Icinga for Windows` because of the whitespaces.
The new argument parser will test for this and create a proper string output value.
Fix: Adds DSL parser to string arguments to fix whitespace and $ escaping
Fixes an issue with current implementation, as string values containing whitespaces or `$` are rendered wrong by default, if not set in single quotes `''`
Example:
Using `My Service`
will output
`My`
`Service`
This issue is already fixed for arrays, but plain string values on arguments require this workaround.
As Icinga 2 will always set arguments if a DSL is specified, regardless if a value is present or not, we have to use a `set_if` expression for this, but can't as the Icinga Director baskets currently ignore `set_if_format` which requires to be an expression instead of a string.
Fix the creation of powershell arrays in Icinga2 configuration
Improves Icinga and Director configuration generator, by wrapping PowerShell arrays inside `@()` instead of simply writing them comma separated
Fix: Null-value exception on missing background daemons
Fixes `You cannot call a method on va null-valued expression` during installation or while enabling JEA, in case no background daemons have been configured.
Fix: Uninstaller removal errors by improving location handling
Improves internal component uninstaller and Icinga for Windows uninstaller to ensure folders are not locked during uninstallation with the current PowerShell sessions
Docs: Fixes doc for custom repo example installation
Makes installation example for using custom repositories and director automation more clear and fixes missing `IfW-StableRepository` installation command entry.
Feature: Adds function for easier include/exclude filtering
Adds generic function for easier managing include/exclude filtering for plugins and for cleaning arrays with not wanted content.
Fix: Exceptions on encapsulated PowerShell calls for missing Cmdlets
Fixes errors on encapsulated PowerShell calls for missing Cmdlets `Write-IcingaConsoleError` and `Optimize-IcingaForWindowsMemory`, while trying to restart services or appling configurations which require a new PowerShell session.
Feature: Adds test and repair for the Icinga Agent state file
Adds new Cmdlets to test and repair the Icinga Agent state file, in case the file is corrupt.
The `Test-IcingaAgent` will now check by default of the state is present and in case it is, if the file is healthy or corrupted.
A repair command `Repair-IcingaStateFile` will remove the corrupted files afterwards to ensure the Icinga Agent can be started as service again.
Feature: Adds developer mode for components
Adds support for the developer mode to now include the modules as well and ensure, that available cache files are overwritten with the template again.
This ensures that we can develop new features and test them on the fly, without having to manipulate cache files manually.
Features: Adds developer mode to prevent cache overwrite
Adds new developer mode for `icinga` command and improved cache handling, to ensure within `-DeveloperMode` and inside a VS Code environment, the framework cache file is never overwritten, while still all functions are loaded and imported.
Feature: Adds support for service recovery
Adds support to set service recovery for the Icinga Agent and Icinga for Windows service, to restart them in case of a crash or error
Fix: Missing component import func on dev tools
Adds missing Import-IcingaPowerShellComponent function while creating new components by using the developer tools
Fix: Missing loading for Icinga for Windows modules
Fixes missing loading of Icinga for Windows modules, which is required to ensure an Icinga for Windows environment is providing all commands and variables to a session, allowing other modules to access these information
Features: Adds module isolation support
Improves writing and publishing of modules, by ensuring that only certain functions are exported and modules have an own compilation file for loading.
This reduces load times, execution time and in addition allows modules to be isolated from each other, making it impossible to hijack certain code for not exported functions.