Description
Expected Behavior
An argument with negative threshold range should get passed to the check script no matter if Api-Check Forwarder is enabled or not.
Current Behavior
When Api-Check Forwarder is enabled you get the following error message:
Invalid range specified for threshold: InputValue "-0,0299999993294477" and Threshold True
Possible Solution
Steps to Reproduce (for bugs)
- Configure a check using a negative threshold range as an argument. For example Invoke-IcingaCheckTimeSync:
'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' '-NoProfile' '-NoLogo' '-ExecutionPolicy' 'ByPass' '-C' 'try { Use-Icinga -Minimal; } catch { Write-Output '\''The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details'\''; Write-Output '\''Error:'\'' $($_.Exception.Message)Components:
rn$( Get-Module -ListAvailable '\''icinga-powershell-*'\'' )
rn'\''Module-Path:'\''
rn$($Env:PSModulePath); exit 3; }; Exit-IcingaExecutePlugin -Command '\''Invoke-IcingaCheckTimeSync'\'' ' '-Server' 'ntp.example.org' '-Warning' '-10:10' '-Critical' '-20:20' '-Verbosity' '2'
- Ensure that Api-Check Forwarder is enabled
- You get the error message above
- Disable Api-Check Forwarder: the check starts working
- Use a positive threshold range for both -Warning and -Critical -> also working
- Execute Invoke-IcingaCheckTimeSync directly in PowerShell -> works
Context
Your Environment
-
PowerShell Version used (
$PSVersionTable.PSVersion
): 4.0 -
Operating System and version (
Get-IcingaWindowsInformation Win32_OperatingSystem | Select-Object Version, BuildNumber, Caption
): Version: 6.3.9600, BuildNumber 9600, Server 2012 R2
But all version affected including newer systems.