Service Provider Foundation VMM 웹 끝점 모니터

Microsoft.SystemCenter.SPF.Monitor.VMMEndpointGet (UnitMonitor)

SPF VMM 웹 끝점의 작동 상태를 모니터링합니다.

Knowledge Base article:

요약

SPF 웹 서버에서 VMM 웹 인터페이스의 액세스 기능 및 작동 기능을 모니터링합니다. 테스트 웹 인터페이스 호출을 정기적으로 실행하여 클라우드 리소스를 검색하는 방법으로 모니터링합니다.

원인

이 모니터가 오류 상태인데 다른 연결 모니터는 오류 상태가 아닌 경우 패브릭 구성 오류 또는 권한 오류가 원인이 될 수 있습니다. 모니터를 구성하는 방법에 대한 자세한 내용은 구성 섹션을 참조하십시오.

해결 방법

클라우드 리소스의 패브릭 구성에 대한 대상 VMM 서버를 확인하고 관리자 계정에 액세스 권한이 부여되었는지 확인하십시오. 모니터에 대한 보안이 제대로 구성되었는지 확인하십시오.

구성

이 모니터가 제대로 작동하려면 VMM 서버의 클라우드 리소스에 액세스할 수 있는 관리자 권한을 보유해야 합니다. VMM 웹 끝점에 대해 지정된 앱 풀 계정과 동일한 권한을 사용하거나 보유하는 실행 계정을 만들어 Microsoft Service Provider Foundation VMM 계정이라는 실행 프로필에 추가하십시오.

이 모니터에 대해 구성할 수 있는 옵션:

옵션

정의

기본값

경고 상태

경고를 생성하는 모니터의 상태입니다.

모니터가 위험 상태에 있습니다.

경고 우선 순위

이 모니터에 대해 생성된 경고의 우선 순위입니다.

높음

경고 심각도

이 모니터에 대해 생성된 경고의 우선 순위입니다.

위험

경고 자동 해결

모니터가 정상 상태로 돌아올 경우 경고가 자동으로 해결되는지 여부를 지정합니다.

True

사용

모니터를 실행할지 여부를 지정합니다.

True

경고 생성

경고 또는 위험 상태로 변경될 때 모니터에서 경고를 생성할지 여부를 지정합니다.

True

간격

모니터가 실행되는 시간 사이의 초 수입니다.

300

Element properties:

TargetMicrosoft.SystemCenter.SPF.SpfServer
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.ServiceProviderFoundation.PowerShellModule.TwoStateMonitorType.PropertyBag
RemotableTrue
AccessibilityInternal
Alert Message
AlertIfCantAccessVMMEndpoint
Service Provider Foundation VMM 웹 끝점에 액세스할 수 없습니다.
RunAsMicrosoft.SystemCenter.SPF.VmmEndpointAccount

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.SPF.Monitor.VMMEndpointGet" Accessibility="Internal" Enabled="true" Target="Microsoft.SystemCenter.SPF.SpfServer" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Microsoft.SystemCenter.ServiceProviderFoundation.PowerShellModule.TwoStateMonitorType.PropertyBag" ConfirmDelivery="false" RunAs="Microsoft.SystemCenter.SPF.VmmEndpointAccount">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.SPF.Monitor.VMMEndpointGet.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='StatusCode']$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
<OperationalState ID="Success" MonitorTypeStateID="Success" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<ScriptName>HealthOfSpfServer.ps1</ScriptName>
<ScriptBody><Script>param
(
$PortNumber
)

$oAPI = new-object -comObject "MOM.ScriptAPI"
$propertyBag = $oAPI.CreatePropertyBag()

$errorActionSetting = $ErrorActionPreference

$downVmmServers = $null
$res = $null

try
{
$ErrorActionPreference = "Stop"

[Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

$req = [System.Net.WebRequest]::Create("https://localhost:$PortNumber/SC2012R2/VMM/Microsoft.Management.OData.svc/Clouds")
$req.UseDefaultCredentials = $true
$res = $req.GetResponse()
$int = [int]$res.StatusCode
if($int -eq 200)
{
$propertyBag.AddValue("Result", "Success")
}
else
{
$propertyBag.AddValue("Result", "Failure")
}

$propertyBag.AddValue("StatusCode", $int)

}
catch
{
$propertyBag.AddValue("Result", "Failure")
$propertyBag.AddValue("StatusCode", $_.Exception.Message)
}
finally
{
$ErrorActionPreference = $errorActionSetting
if($res -ne $null)
{
$res.Close()
}
$propertyBag
}
</Script></ScriptBody>
<Parameters>
<Parameter>
<Name>PortNumber</Name>
<Value>$Target/Property[Type="Microsoft.SystemCenter.SPF.SpfServerBase"]/PortNumber$</Value>
</Parameter>
</Parameters>
<TimeoutSeconds>300</TimeoutSeconds>
<ErrorExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Result']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">Success</Value>
</ValueExpression>
</SimpleExpression>
</ErrorExpression>
<SuccessExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Result']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Success</Value>
</ValueExpression>
</SimpleExpression>
</SuccessExpression>
</Configuration>
</UnitMonitor>