icinga-powershell-framework/lib/icinga/plugin/Get-IcingaThresholdCache.psm1

25 lines
503 B
PowerShell
Raw Normal View History

function Get-IcingaThresholdCache()
{
param (
[string]$CheckCommand = $null
);
if ([string]::IsNullOrEmpty($CheckCommand)) {
return $null;
}
if ($null -eq $Global:Icinga) {
return $null;
}
if ($Global:Icinga.ContainsKey('ThresholdCache') -eq $FALSE) {
return $null;
}
if ($Global:Icinga.ThresholdCache.ContainsKey($CheckCommand) -eq $FALSE) {
return $null;
}
return $Global:Icinga.ThresholdCache[$CheckCommand];
}