Fixed NoPerfData handling for Check Result function

This commit is contained in:
Lord Hepipud 2019-07-22 09:02:33 +02:00
parent 4392714da3
commit 824dde7518

View file

@ -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()));
}