監視 SPF VMM Web 端點的操作健全狀況。
監視從 SPF 網頁伺服器存取及操作 VMM 網頁介面的能力。方式是定期發出測試網頁介面呼叫來擷取雲端資源。
如果此監視處於錯誤狀態,而其他連線監視並未處於錯誤狀態,則可能的原因是網狀架構設定錯誤或權限錯誤。請參閱<設定>一節,瞭解設定監視的詳細資料。
檢查目標 VMM 伺服器用於雲端資源的網狀架構設定,並確認已授與存取權給系統管理員帳戶。請確認監視的安全性設定是否正確。
要讓此監視正確運作,它必須有存取 VMM 伺服器上雲端資源的系統管理員權限。請建立執行身分帳戶,讓此帳戶使用或擁有與指定給 VMM Web 端點之應用程式帳戶相同的權限,並將它新增到名為 Microsoft Service Provider Foundation VMM 帳戶的執行身分設定檔。
您可以在此監視上設定下列選項:
選項 | 定義 | 預設值 |
警示開啟狀態 | 產生警示之監視的健全狀況狀態。 | 監視處於重大的健全狀況狀態 |
警示優先順序 | 此監視所產生之警示的優先順序。 | 高 |
警示嚴重性 | 此監視所產生之警示的優先順序。 | 重大 |
自動解決警示 | 指定當監視恢復狀況良好狀態時,是否應自動解除警示。 | True |
已啟用 | 指定監視是否應執行。 | True |
產生警示 | 指定當變更為警告或重大狀態時,監視是否應產生警示。 | True |
間隔 | 執行監視的間隔秒數。 | 300 |
Target | Microsoft.SystemCenter.SPF.SpfServer | ||
Parent Monitor | System.Health.AvailabilityState | ||
Category | AvailabilityHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SystemCenter.ServiceProviderFoundation.PowerShellModule.TwoStateMonitorType.PropertyBag | ||
Remotable | True | ||
Accessibility | Internal | ||
Alert Message |
| ||
RunAs | Microsoft.SystemCenter.SPF.VmmEndpointAccount |
<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> 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
}
</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>