From 08f951a79d7433965f454c00f95c01f1a50818a2 Mon Sep 17 00:00:00 2001 From: bewshy <11207338+bewshy@users.noreply.github.com> Date: Thu, 11 Jun 2026 12:53:28 -0700 Subject: [PATCH 1/2] fix for ThresholdInterval_throws_StackOverflowException --- lib/icinga/plugin/New-IcingaCheck.psm1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/icinga/plugin/New-IcingaCheck.psm1 b/lib/icinga/plugin/New-IcingaCheck.psm1 index 14702afa..cc56451a 100644 --- a/lib/icinga/plugin/New-IcingaCheck.psm1 +++ b/lib/icinga/plugin/New-IcingaCheck.psm1 @@ -529,10 +529,11 @@ function New-IcingaCheck() param ($ThresholdObject, $State); if ($ThresholdObject.HasError) { - $this.SetUnknown() | Out-Null; - $this.__ThresholdObject = $ThresholdObject; - $this.__FixedState = $TRUE; - $this.__SetCheckOutput($this.__ThresholdObject.Message); + $this.__HandleAsNoticeObject = $FALSE; + $this.__ThresholdObject = $ThresholdObject; + $this.__CheckState = $IcingaEnums.IcingaExitCode.Unknown; + $this.__FixedState = $TRUE; + $this.__SetCheckOutput($this.__ThresholdObject.Message); $this.__LockState(); return; } From bacedb0d2be3da60dce285c203817489c2a1a901 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Fri, 19 Jun 2026 14:10:10 +0200 Subject: [PATCH 2/2] Update New-IcingaCheck.psm1 Fixes code styling --- lib/icinga/plugin/New-IcingaCheck.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/icinga/plugin/New-IcingaCheck.psm1 b/lib/icinga/plugin/New-IcingaCheck.psm1 index cc56451a..1b71aa8d 100644 --- a/lib/icinga/plugin/New-IcingaCheck.psm1 +++ b/lib/icinga/plugin/New-IcingaCheck.psm1 @@ -529,11 +529,11 @@ function New-IcingaCheck() param ($ThresholdObject, $State); if ($ThresholdObject.HasError) { - $this.__HandleAsNoticeObject = $FALSE; + $this.__HandleAsNoticeObject = $FALSE; $this.__ThresholdObject = $ThresholdObject; $this.__CheckState = $IcingaEnums.IcingaExitCode.Unknown; - $this.__FixedState = $TRUE; - $this.__SetCheckOutput($this.__ThresholdObject.Message); + $this.__FixedState = $TRUE; + $this.__SetCheckOutput($this.__ThresholdObject.Message); $this.__LockState(); return; }