WMI Health State

Microsoft.SQLServer.Windows.Monitor.LocalDBEngine.WmiHealth (UnitMonitor)

This monitor checks the WMI health state in the context of access to namespaces and classes used for proper monitoring of SQL Server instances.

Knowledge Base article:

Summary

This monitor checks the WMI health state in the context of access to namespaces and classes used in the management pack.

Configuration

If any of the namespaces are inaccessible under the current Run As account, the monitor produces an alert and changes its operational state to 'Critical'. A list of inaccessible namespaces is provided in the alert description.

The following namespaces should be accessible under the current Run As account:

Causes

The monitor produces an alert in cases when there is no access to any of the above namespaces.

Resolutions

Check the status of the computer containing the affected namespaces and classes. Make sure that all corresponding access rights are granted.

For more information about the required WMI classes and namespaces, see WMI Health State Monitor.

Overridable Parameters

Name

Description

Default Value

Alert Priority

Defines Alert Priority.

Normal

Alert Severity

Defines Alert Severity.

Error

Enabled

Enables or disables the workflow.

Yes

Generates Alerts

Defines whether the workflow generates an Alert.

Yes

Interval (seconds)

The recurring interval of time in seconds in which to run the workflow.

3600

Number of samples

Indicates how many times the monitor should get the bad WMI health state for all namespaces and classes before the monitor's state is changed.

2

Synchronization Time

The synchronization time specified by using a 24-hour format. May be omitted.

 

Timeout (seconds)

Specifies the time the workflow is allowed to run before being closed and marked as failed.

300

Element properties:

TargetMicrosoft.SQLServer.Windows.LocalDBEngine
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.Windows.MonitorType.LocalDBEngine.WmiHealth
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL on Windows: WMI Health State has errors
The WMI Health State on computer "{3}" has errors. {2}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.Windows.Monitor.LocalDBEngine.WmiHealth" Accessibility="Public" Enabled="true" Target="SqlDiscW!Microsoft.SQLServer.Windows.LocalDBEngine" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.Windows.MonitorType.LocalDBEngine.WmiHealth" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Windows.Monitor.LocalDBEngine.WmiHealth.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='WmiState']$</AlertParameter3>
<AlertParameter4>$Target/Property[Type="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine"]/PrincipalName$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="GoodState" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="BadState" HealthState="Error"/>
</OperationalStates>
<Configuration>
<PrincipalName>$Target/Property[Type="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine"]/PrincipalName$</PrincipalName>
<Cluster>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Cluster$</Cluster>
<InstanceVersion>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Version$</InstanceVersion>
<IntervalSeconds>3600</IntervalSeconds>
<SyncTime/>
<NumSamples>2</NumSamples>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>