DB Space Free (\%)

Microsoft.SQLServer.2005.Database.DBSizePercentMonitor (UnitMonitor)

Monitors for the free space left in the database in percentage terms.

Knowledge Base article:

Summary

This monitor checks the database percentage free space 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.

Causes

An unhealthy state is caused by the database running low on free space. This could be due to 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:

Element properties:

TargetMicrosoft.SQLServer.2005.Database
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2005.DBAndLogSizeMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
DB Space Free (\%)
Database {2} in SQL Server instance {1} on computer {0} is running low on database free space
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2005.Database.DBSizePercentMonitor" Accessibility="Public" Enabled="true" Target="SQL2005Core!Microsoft.SQLServer.2005.Database" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2005.DBAndLogSizeMonitorType" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2005.Database.DBSizePercentMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</AlertParameter2>
<AlertParameter3>$Target/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseName$</AlertParameter3>
</AlertParameters>
</AlertSettings>
<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>
<ObjectName>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/PerformanceCounterObject$:Database</ObjectName>
<CounterName>DB Free Space (%)</CounterName>
<InstanceName>$Data/Property[@Name='Database']$</InstanceName>
<DatabaseName>$Target/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseName$</DatabaseName>
<Value>$Data/Property[@Name='DBPercentFree']$</Value>
<Threshold1>10</Threshold1>
<Threshold2>20</Threshold2>
<AutoGrowSet>$Target/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseAutogrow$</AutoGrowSet>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>