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
15 lines
264 B
PowerShell
15 lines
264 B
PowerShell
Import-IcingaLib core\tools;
|
|
Import-IcingaLib provider\enums;
|
|
|
|
function ConvertTo-ServiceStatusCode()
|
|
{
|
|
param (
|
|
$Status
|
|
)
|
|
|
|
if (Test-Numeric $Status) {
|
|
return [int]$Status
|
|
}
|
|
|
|
return [int]($ProviderEnums.ServiceStatus.$Status);
|
|
}
|