icinga-powershell-framework/lib/icinga/plugin/Write-IcingaPluginOutput.psm1

17 lines
470 B
PowerShell
Raw Normal View History

function Write-IcingaPluginOutput()
{
param (
$Output
);
2021-08-06 12:12:27 -04:00
if ($global:IcingaDaemonData.FrameworkRunningAsDaemon -eq $FALSE -And $global:IcingaDaemonData.JEAContext -eq $FALSE) {
if ($null -ne $global:Icinga -And $global:Icinga.Minimal) {
Clear-Host;
}
Write-IcingaConsolePlain $Output;
} else {
# New behavior with local thread separated results
$global:Icinga.CheckResults += $Output;
}
}