File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -106,13 +106,17 @@ function Invoke-IcingaCheckMemory()
106106
107107 If ($null -ne $CriticalPercent ) {
108108 if ([string ]::IsNullOrEmpty($Critical )) {
109- $CriticalConverted = (Convert-Bytes ([string ]::Format(' {0}B' , $MemoryData [' Memory Total Bytes' ] / 100 * $CriticalPercent )) - Unit $CalcUnit ).Value;
109+ [string ]$Value = ([string ]::Format(' {0}B' , ($MemoryData [' Memory Total Bytes' ] / 100 * $CriticalPercent )));
110+ $Value = $Value.Replace (' ,' , ' .' );
111+ $CriticalConverted = (Convert-Bytes $Value - Unit $CalcUnit ).Value;
110112 }
111113 }
112114
113115 If ($null -ne $WarningPercent ) {
114116 if ([string ]::IsNullOrEmpty($Warning )) {
115- $WarningConverted = (Convert-Bytes ([string ]::Format(' {0}B' , $MemoryData [' Memory Total Bytes' ] / 100 * $WarningPercent )) - Unit $CalcUnit ).Value;
117+ [string ]$Value = ([string ]::Format(' {0}B' , ($MemoryData [' Memory Total Bytes' ] / 100 * $WarningPercent )));
118+ $Value = $Value.Replace (' ,' , ' .' );
119+ $WarningConverted = (Convert-Bytes $Value - Unit $CalcUnit ).Value;
116120 }
117121 }
118122
You can’t perform that action at this time.
0 commit comments