SPF Web エンドポイントと SPF データベース間の接続を監視します。
SPF Web サーバーからのデータベース接続を監視します。モニターは、Service Provider Foundation データベースへのテスト接続を定期的に実行することで行われます。
このモニターでエラーが発生する場合、サーバーからデータベースを使用できないか、モニターのセキュリティが正しく構成されていません。モニターの構成の詳細については、「構成」セクションを参照してください。
モニターが正しく構成されているにもかかわらず、モニターでエラーが発生する場合、データベースがオフラインか、データベース サーバーが Service Provider Foundation サーバーにアクセスできていません。
Service Provider Foundation データベースとデータベース サーバーの状態を確認してください。
このモニターが正しく動作するには、モニターに、Service Management Automation データベースを読み取るためのアクセス権限が必要です。このデータベースの読み取りアクセス権限のある実行アカウントを作成し、「Microsoft Service Provider Foundation データベース アカウント」という名前の実行プロファイルに追加します。
このモニターでは次のオプションを構成できます:
オプション | 定義 | 既定 |
アラート状態 | アラートを生成するモニターのヘルス状態。 | モニターのヘルス状態が重大状態にあります |
アラートの優先順位 | このモニターのアラートを生成する優先順位。 | 高 |
アラートの重要度 | このモニターのアラートを生成する優先順位。 | 重大 |
アラートの自動解決 | モニターが正常な状態に戻った時点で自動的にアラートを解決するかどうかを指定します。 | 真 |
有効 | モニターを実行するかどうかを指定します。 | 真 |
アラートの生成 | モニターが警告状態または重大状態に変更されるときにアラートを生成するかどうかを指定します。 | 真 |
間隔 | モニターの実行間隔 (秒)。 | 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.DatabaseAccount |
<UnitMonitor ID="Microsoft.SystemCenter.SPF.Monitor.SpfDatabaseScriptMonitor" 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.DatabaseAccount">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.SPF.Monitor.SpfDatabaseScriptMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
<OperationalState ID="Success" MonitorTypeStateID="Success" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<ScriptName>HealthOfSqlServer.ps1</ScriptName>
<ScriptBody> $oAPI = new-object -comObject "MOM.ScriptAPI"
$propertyBag = $oAPI.CreatePropertyBag()
$errorActionSetting = $ErrorActionPreference
try
{
$ErrorActionPreference = "Stop"
Import-Module "$env:COMMONPROGRAMFILES\Microsoft System Center 2012 R2\Service Provider Foundation\Microsoft.SystemCenter.Foundation.Cmdlet.dll"
$stamps = Get-SCSPFStamp
$propertyBag.AddValue("Result", "Success")
}
catch
{
$propertyBag.AddValue("Result", "Error")
}
finally
{
$ErrorActionPreference = $errorActionSetting
$propertyBag
}
</ScriptBody>
<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>