Removed perf data output for unknown return codes

This commit is contained in:
Lord Hepipud 2019-07-19 20:02:41 +02:00
parent a05a41ca86
commit a32ec4f17c

View file

@ -20,7 +20,9 @@ function New-IcingaCheckresult()
# Compile the check / package if not already done # Compile the check / package if not already done
$this.check.Compile() | Out-Null; $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; return $this.check.exitcode;
} }