icinga-powershell-framework/lib/daemons/ServiceCheckDaemon/Get-IcingaRegisteredServiceChecks.psm1
Lord Hepipud 4ef55bddb4 Fixes lots of code styling, spelling and script analyzer
Disabling UseConsistentIndentation because it is not
properly working for multi-line commands with arguments
and array/hashtable objects
2022-01-14 22:26:53 +01:00

19 lines
602 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;
}