mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes performance data output for single checks
This commit is contained in:
parent
6cb7bd4414
commit
06b7c0cdd5
2 changed files with 9 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ function New-IcingaCheckresult()
|
||||||
$this.check.Compile($TRUE) | Out-Null;
|
$this.check.Compile($TRUE) | Out-Null;
|
||||||
|
|
||||||
if ([int]$this.check.exitcode -ne [int]$IcingaEnums.IcingaExitCode.Unknown -And -Not $this.noperfdata) {
|
if ([int]$this.check.exitcode -ne [int]$IcingaEnums.IcingaExitCode.Unknown -And -Not $this.noperfdata) {
|
||||||
Write-IcingaPluginPerfData -PerformanceData ($this.check.GetPerfData().perfdata) -CheckCommand $CheckCommand;
|
Write-IcingaPluginPerfData -PerformanceData ($this.check.GetPerfData()) -CheckCommand $CheckCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this.check.exitcode;
|
return $this.check.exitcode;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,14 @@ function Write-IcingaPluginPerfData()
|
||||||
$CheckCommand
|
$CheckCommand
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($PerformanceData.package -eq $FALSE) {
|
||||||
|
$PerformanceData = @{
|
||||||
|
$PerformanceData.label = $PerformanceData;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$PerformanceData = $PerformanceData.perfdata;
|
||||||
|
}
|
||||||
|
|
||||||
$CheckResultCache = Get-IcingaCacheData -Space 'sc_daemon' -CacheStore 'checkresult' -KeyName $CheckCommand;
|
$CheckResultCache = Get-IcingaCacheData -Space 'sc_daemon' -CacheStore 'checkresult' -KeyName $CheckCommand;
|
||||||
|
|
||||||
if ($global:IcingaDaemonData.FrameworkRunningAsDaemon -eq $FALSE) {
|
if ($global:IcingaDaemonData.FrameworkRunningAsDaemon -eq $FALSE) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue