VMM-webeindpuntmonitor voor Service Provider Foundation

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

Bewaakt de werkingsstatus van het VMM-webeindpunt van SPF.

Knowledge Base article:

Samenvatting

Bewaakt de toegankelijkheid en werking van de VMM-webinterface vanaf de SPF-webservers. Dit gebeurt door periodiek een testaanroep voor de webinterface te plaatsen voor het ophalen van cloudresources.

Oorzaken

Als deze monitor een foutstatus heeft en er geen andere connectiviteitsmonitors met een foutstatus zijn, wordt dit probleem mogelijk veroorzaakt door een fabric-configuratiefout of een machtigingsfout. Zie de sectie Configuratie meer informatie over het configureren van de monitor.

Oplossing

Controleer de doel-VMM-server voor de fabric-configuratie voor cloudresources en zorg ervoor dat er toegangsrechten zijn verleend voor het Administrator-account. Zorg ervoor dat de beveiliging voor de monitor correct is geconfigureerd.

Configuratie

Deze monitor werkt alleen correct als deze een Administrator-machtiging heeft voor toegang tot cloudresources op VMM-servers. Maak een Run As-account dat gebruikmaakt van of beschikt over een zelfde machtiging als het toepassingsgroepaccount dat is opgegeven voor het VMM-webeindpunt en voeg dit toe aan het Run As-profiel voor het VMM-account van Microsoft Service Provider Foundation.

De volgende opties kunnen voor deze monitor worden geconfigureerd:

Optie

Definitie

Standaard

Waarschuwen over status

Status van de monitor die een waarschuwing genereert.

De monitor heeft een kritieke status

Waarschuwingsprioriteit

Prioriteit van de voor deze monitor gegenereerde waarschuwing.

Hoog

Ernst van waarschuwing

Prioriteit van de voor deze monitor gegenereerde waarschuwing.

Kritiek

Waarschuwing automatisch oplossen

Geeft aan of de waarschuwing automatisch moet worden opgelost wanneer de monitor weer een normale status heeft.

Waar

Ingeschakeld

Geeft aan of de monitor actief moet zijn.

Waar

Genereert waarschuwing

Geeft aan of de monitor een waarschuwing moet genereren wanneer er sprake is van een waarschuwingsstatus of een kritieke status.

Waar

Interval

Aantal seconden tussen keren dat de monitor wordt uitgevoerd.

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
Het VMM-webeindpunt van Service Provider Foundation is niet toegankelijk.
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>