icinga-powershell-framework/lib/provider/services/Get-IcingaServiceCheckName.psm1
Lord Hepipud 93951cd607 Updated Services Provider, Enums and Helper functions
* Added new function to get Service Name for Check output
* Added missing Service State enums
* Updated Service Status Code function to use existing Test-Numeric
* Update Service Check with new Cmdlets
2019-07-24 14:28:53 +02:00

20 lines
404 B
PowerShell

function Get-IcingaServiceCheckName()
{
param (
[string]$ServiceInput,
$Service
);
if ($null -eq $Service) {
return [string]::Format(
'Service "{0}"',
$ServiceInput
);
}
return [string]::Format(
'Service "{0} ({1})"',
$Service.Values.metadata.DisplayName,
$Service.Values.metadata.ServiceName
);
}