icinga-powershell-framework/lib/core/thread/Get-IcingaThreadPool.psm1

15 lines
324 B
PowerShell
Raw Normal View History

2021-12-09 11:42:06 -05:00
function Get-IcingaThreadPool()
{
param (
[string]$Name
);
if ($Global:Icinga.Public.ThreadPools.ContainsKey($Name)) {
return $Global:Icinga.Public.ThreadPools[$Name];
}
Write-IcingaEventMessage -Namespace 'Framework' -EventId 1401 -Objects $Name;
return (New-IcingaThreadPool);
}