icinga-powershell-framework/lib/provider/services/ConvertTo-ServiceStatusCode.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

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);
}