mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
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:
commit
67a8908cb2
1 changed files with 1 additions and 1 deletions
|
|
@ -195,7 +195,7 @@ function New-IcingaCheck()
|
||||||
$this.Maximum = $this.__ThresholdObject.BaseValue;
|
$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;
|
$this.Maximum = $this.__ThresholdObject.RawValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue