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

15 lines
400 B
PowerShell
Raw Normal View History

function Write-IcingaPluginOutput()
{
param(
$Output
);
if ($global:IcingaDaemonData.FrameworkRunningAsDaemon -eq $FALSE) {
Write-IcingaConsolePlain $Output;
} else {
if ($global:IcingaDaemonData.IcingaThreadContent.ContainsKey('Scheduler')) {
$global:IcingaDaemonData.IcingaThreadContent['Scheduler']['PluginCache'] += $Output;
}
}
}