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-12-09 11:42:06 -05:00
|
|
|
if ($Global:Icinga.Protected.RunAsDaemon -eq $FALSE -And $Global:Icinga.Protected.JEAContext -eq $FALSE) {
|
|
|
|
|
if ($Global:Icinga.Protected.Minimal) {
|
2021-04-23 06:55:05 -04:00
|
|
|
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
|
2022-05-24 10:44:52 -04:00
|
|
|
[array]$Global:Icinga.Private.Scheduler.CheckResults += $Output;
|
2019-10-05 16:01:15 -04:00
|
|
|
}
|
2019-09-28 15:45:59 -04:00
|
|
|
}
|