mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
20 lines
601 B
PowerShell
20 lines
601 B
PowerShell
|
|
function Get-IcingaRegisteredServiceChecks()
|
||
|
|
{
|
||
|
|
$Services = Get-IcingaPowerShellConfig -Path 'BackgroundDaemon.RegisteredServices';
|
||
|
|
[hashtable]$Output = @{};
|
||
|
|
|
||
|
|
foreach ($service in $Services.PSObject.Properties) {
|
||
|
|
$Content = @{
|
||
|
|
'Id' = $service.Name;
|
||
|
|
'CheckCommand' = $service.Value.CheckCommand;
|
||
|
|
'Arguments' = $service.Value.Arguments;
|
||
|
|
'Interval' = $service.Value.Interval;
|
||
|
|
'TimeIndexes' = $service.Value.TimeIndexes;
|
||
|
|
};
|
||
|
|
|
||
|
|
$Output.Add($service.Name, $Content);
|
||
|
|
}
|
||
|
|
|
||
|
|
return $Output;
|
||
|
|
}
|