From 6537277d899500f2c5007bf19024bfa83d674060 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Mon, 31 May 2021 15:24:53 +0200 Subject: [PATCH] Fix perf data to add maximum if set only --- lib/icinga/plugin/New-IcingaCheck.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/icinga/plugin/New-IcingaCheck.psm1 b/lib/icinga/plugin/New-IcingaCheck.psm1 index ea997d3..06a48a4 100644 --- a/lib/icinga/plugin/New-IcingaCheck.psm1 +++ b/lib/icinga/plugin/New-IcingaCheck.psm1 @@ -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; } }