[Deprecated] DB Space Free (MB)

Microsoft.SQLServer.2008.Database.DBSizeMegabytesMonitor (UnitMonitor)

This monitor is DEPRECATED. Monitors for the free space left in the database in terms of megabytes.

Knowledge Base article:

Summary

This monitor checks the database absolute free space in Megabytes to ensure it is above the defined thresholds. A warning or error alert will be raised if it is below one of the defined thresholds.

Databases that have autogrow set will never generate an alert regardless of the reported free space.

Out of the box, this monitor will never cross a threshold, as soon as both thresholds are set to -1. Monitoring using percentage free space is the default behavior. If it is required to monitor usage of absolute free space, the threshold values for this monitor should be overridden

Causes

Unhealthy state is caused by the database running low on free space. This could be due to a rapid growth, or may have been developing slowly over time. Use the following link to view the historic data for this database:

Database Performance Data

Resolutions

This issue may be resolved by either:

Alternatively, if database size is not a concern for the database:

Overrideable Parameters

Name

Description

Default Value

Enabled

Enables or disables the workflow.

No

Generates Alerts

Defines whether the workflow generates an Alert.

No

Interval (seconds)

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

900

Lower Threshold

The lower threshold for this monitor.

-1

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

Upper Threshold

The upper threshold for this monitor.

-1

Element properties:

TargetMicrosoft.SQLServer.2008.Database
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledFalse
Alert GenerateFalse
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2008.DBAndLogSizeMonitorType
RemotableTrue
AccessibilityPublic
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2008.Database.DBSizeMegabytesMonitor" Accessibility="Public" Enabled="false" Target="SQL2008Core!Microsoft.SQLServer.2008.Database" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2008.DBAndLogSizeMonitorType" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<OperationalStates>
<OperationalState ID="UnderThreshold1" MonitorTypeStateID="UnderThreshold1" HealthState="Error"/>
<OperationalState ID="OverThreshold1UnderThreshold2" MonitorTypeStateID="OverThreshold1UnderThreshold2" HealthState="Warning"/>
<OperationalState ID="OverThreshold2" MonitorTypeStateID="OverThreshold2" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>900</IntervalSeconds>
<SyncTime/>
<ConnectionString>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ConnectionString$</ConnectionString>
<ServerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ServerName>
<SqlInstanceName>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</SqlInstanceName>
<ObjectName>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/PerformanceCounterObject$:Database</ObjectName>
<CounterName>DB Free Space (MB)</CounterName>
<InstanceName>$Data/Property[@Name='Database']$</InstanceName>
<DatabaseName>$Target/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseName$</DatabaseName>
<Value>$Data/Property[@Name='DBSizeMB']$</Value>
<Threshold1>-1</Threshold1>
<Threshold2>-1</Threshold2>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>