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; }