Merge pull request #266 from Icinga:fix/only_add_maximum_if_set

Fix: Perf data should only add maximum if it was set before
This commit is contained in:
Lord Hepipud 2021-05-31 15:26:27 +02:00 committed by GitHub
commit 67a8908cb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}
}