2019-09-28 15:45:59 -04:00
|
|
|
function Write-IcingaPluginOutput()
|
|
|
|
|
{
|
2021-04-23 06:55:05 -04:00
|
|
|
param (
|
2019-09-28 15:45:59 -04:00
|
|
|
$Output
|
|
|
|
|
);
|
|
|
|
|
|
2021-08-06 12:12:27 -04:00
|
|
|
if ($global:IcingaDaemonData.FrameworkRunningAsDaemon -eq $FALSE -And $global:IcingaDaemonData.JEAContext -eq $FALSE) {
|
2021-04-23 06:55:05 -04:00
|
|
|
if ($null -ne $global:Icinga -And $global:Icinga.Minimal) {
|
|
|
|
|
Clear-Host;
|
|
|
|
|
}
|
2020-05-13 10:53:15 -04:00
|
|
|
Write-IcingaConsolePlain $Output;
|
2019-10-05 16:01:15 -04:00
|
|
|
} else {
|
2020-12-16 09:31:39 -05:00
|
|
|
# New behavior with local thread separated results
|
|
|
|
|
$global:Icinga.CheckResults += $Output;
|
2019-10-05 16:01:15 -04:00
|
|
|
}
|
2019-09-28 15:45:59 -04:00
|
|
|
}
|