From 824dde75186e154ad74585398fab3863f71d0f59 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Mon, 22 Jul 2019 09:02:33 +0200 Subject: [PATCH] Fixed NoPerfData handling for Check Result function --- lib/icinga/plugin/New-IcingaCheckResult.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/icinga/plugin/New-IcingaCheckResult.psm1 b/lib/icinga/plugin/New-IcingaCheckResult.psm1 index eff9d2f..bc4dba1 100644 --- a/lib/icinga/plugin/New-IcingaCheckResult.psm1 +++ b/lib/icinga/plugin/New-IcingaCheckResult.psm1 @@ -20,7 +20,7 @@ function New-IcingaCheckresult() # Compile the check / package if not already done $this.check.Compile() | Out-Null; - if ([int]$this.check.exitcode -ne [int]$IcingaEnums.IcingaExitCode.Unknown) { + if ([int]$this.check.exitcode -ne [int]$IcingaEnums.IcingaExitCode.Unknown -And -Not $this.noperfdata) { Write-Host ([string]::Format('| {0}', $this.check.GetPerfData())); }