From a32ec4f17ccc19ccca3e152c43bdaf7418bf2a14 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Fri, 19 Jul 2019 20:02:41 +0200 Subject: [PATCH] Removed perf data output for unknown return codes --- lib/icinga/checkresult/New-IcingaCheckResult.psm1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/icinga/checkresult/New-IcingaCheckResult.psm1 b/lib/icinga/checkresult/New-IcingaCheckResult.psm1 index 97550e0..eff9d2f 100644 --- a/lib/icinga/checkresult/New-IcingaCheckResult.psm1 +++ b/lib/icinga/checkresult/New-IcingaCheckResult.psm1 @@ -20,7 +20,9 @@ function New-IcingaCheckresult() # Compile the check / package if not already done $this.check.Compile() | Out-Null; - Write-Host ([string]::Format('| {0}', $this.check.GetPerfData())); + if ([int]$this.check.exitcode -ne [int]$IcingaEnums.IcingaExitCode.Unknown) { + Write-Host ([string]::Format('| {0}', $this.check.GetPerfData())); + } return $this.check.exitcode; }