diff --git a/lib/core/tools/Convert-IcingaPluginThresholds.psm1 b/lib/core/tools/Convert-IcingaPluginThresholds.psm1 index faedd4b..2249a28 100644 --- a/lib/core/tools/Convert-IcingaPluginThresholds.psm1 +++ b/lib/core/tools/Convert-IcingaPluginThresholds.psm1 @@ -170,7 +170,7 @@ function Convert-IcingaPluginThresholds() if ([string]::IsNullOrEmpty($Value) -eq $FALSE -And $Value.Contains(':') -eq $FALSE) { if ((Test-Numeric $Value)) { - $RetValue.Value = $Value; + $RetValue.Value = [decimal]$Value; return $RetValue; } } diff --git a/lib/icinga/plugin/Compare-IcingaPluginThresholds.psm1 b/lib/icinga/plugin/Compare-IcingaPluginThresholds.psm1 index 16bfac3..3bc5d49 100644 --- a/lib/icinga/plugin/Compare-IcingaPluginThresholds.psm1 +++ b/lib/icinga/plugin/Compare-IcingaPluginThresholds.psm1 @@ -255,9 +255,11 @@ function Compare-IcingaPluginThresholds() if ((Test-Numeric ($rangeMin.Replace('@', '').Replace('~', '')))) { $IcingaThresholds.MinRangeValue = [decimal]($rangeMin.Replace('@', '').Replace('~', '')); + [decimal]$rangeMin = [decimal]$rangeMin; } if ((Test-Numeric $rangeMax)) { $IcingaThresholds.MaxRangeValue = [decimal]$rangeMax; + [decimal]$rangeMax = [decimal]$rangeMax; } if ($IsNegating -eq $FALSE -And (Test-Numeric $rangeMin) -And (Test-Numeric $rangeMax)) {