Fix perf data to add maximum if set only

This commit is contained in:
Lord Hepipud 2021-05-31 15:24:53 +02:00
parent 3cce6caed1
commit 6537277d89

View file

@ -195,7 +195,7 @@ function New-IcingaCheck()
$this.Maximum = $this.__ThresholdObject.BaseValue;
}
if ($this.Value -gt $this.Maximum) {
if ($this.Value -gt $this.Maximum -And [string]::IsNullOrEmpty($this.Maximum) -eq $FALSE) {
$this.Maximum = $this.__ThresholdObject.RawValue;
}
}