mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
23 lines
742 B
PowerShell
23 lines
742 B
PowerShell
function Read-IcingaCheckResultStore()
|
|
{
|
|
param (
|
|
$CheckCommand
|
|
);
|
|
|
|
$LoadedCacheData = Get-IcingaCacheData -Space 'sc_daemon' -CacheStore 'checkresult_store' -KeyName $CheckCommand;
|
|
|
|
if ($null -ne $LoadedCacheData) {
|
|
foreach ($entry in $LoadedCacheData.PSObject.Properties) {
|
|
$Global:Icinga.Private.Scheduler.CheckData[$CheckCommand]['results'].Add(
|
|
$entry.name,
|
|
@{ }
|
|
);
|
|
foreach ($item in $entry.Value.PSObject.Properties) {
|
|
$Global:Icinga.Private.Scheduler.CheckData[$CheckCommand]['results'][$entry.name].Add(
|
|
$item.Name,
|
|
$item.Value
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|