Database Connection

Microsoft.SystemCenter.ServiceManagementAutomation.2012R2.Monitor.DatabaseConnectionWeb (UnitMonitor)

Monitors connectivity between the Runbook Web service and the database.

Knowledge Base article:

Summary

Monitors database connectivity from Runbook Web servers. This is done by periodically making a test connection to the Service Management Automation database.

Causes

If this monitor is in error, then either the database is not available from the server or the security for the monitor is not configured correctly. See the Configuration section for details on configuring the monitor.

If the monitor is configured correctly and the monitor is in error then the database is offline or the database server is inaccessible to the Service Management Automation server.

Resolution

Check the status of the Service Management Automation database and the database server.

Configuration

For this monitor to work correctly, it must have permission to read the Service Management Automation database. Create a Run As Account that has read permissions to the database and add it to the Run As Profile called Microsoft Service Management Automation Database Account.

The following options can be configured on this monitor:

Option

Definition

Default

Alert On State

Health state for the monitor that generates an alert.

The monitor is in a critical health state

Alert Priority

Priority of the alert generated for this monitor.

Medium

Alert Severity

Priority of the alert generated for this monitor.

Critical

Auto-Resolve Alert

Specifies whether the alert should automatically be resolved when the monitor returns to a healthy state.

True

Enabled

Specifies whether the monitor should run.

True

Generates Alert

Specifies whether the monitor should generate an alert when changing to a warning or critical state.

True

Interval

Number of seconds between times that the monitor is run.

300

Element properties:

TargetMicrosoft.SystemCenter.ServiceManagementAutomation.2012R2.Server.Web
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.ServiceManagementAutomation.2012R2.MonitorType.DatabaseConnection
RemotableTrue
AccessibilityPublic
Alert Message
Service Management Automation Runbook Web service could not connect to database.
The Service Management Automation web service could not connect to the database.
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.ServiceManagementAutomation.2012R2.Monitor.DatabaseConnectionWeb" Accessibility="Public" Enabled="true" Target="Microsoft.SystemCenter.ServiceManagementAutomation.2012R2.Server.Web" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Low" TypeID="Microsoft.SystemCenter.ServiceManagementAutomation.2012R2.MonitorType.DatabaseConnection" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.ServiceManagementAutomation.2012R2.Monitor.DatabaseConnectionWeb.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ConnectionFailure" MonitorTypeStateID="ConnectionFailure" HealthState="Error"/>
<OperationalState ID="NoConnectionFailure" MonitorTypeStateID="NoConnectionFailure" HealthState="Success"/>
</OperationalStates>
<Configuration>
<Interval>300</Interval>
<DatabaseServer>$Target/Property[Type="SMA!Microsoft.SystemCenter.ServiceManagementAutomation.Server"]/DatabaseServerName$</DatabaseServer>
<DatabaseInstance>$Target/Property[Type="SMA!Microsoft.SystemCenter.ServiceManagementAutomation.Server"]/DatabaseServerInstance$</DatabaseInstance>
<DatabaseName>$Target/Property[Type="SMA!Microsoft.SystemCenter.ServiceManagementAutomation.Server"]/DatabaseName$</DatabaseName>
</Configuration>
</UnitMonitor>