mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
* 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
20 lines
404 B
PowerShell
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
|
|
);
|
|
}
|