Disk Free Space

Microsoft.SQLServer.2008.DBFile.DiskFreeSpace (UnitMonitor)

Knowledge Base article:

Summary

SQL 2008 Filegroup Disk Free Space monitor. Monitors the min required Disk Free Space per Filegroup.

Configuration

Frequency (Sec) default 3600

Threshold (%) default 5. Min required Disk Free Space in %.

Element properties:

TargetMicrosoft.SQLServer.2008.DBFile
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Instance NameLogicalDisk
Counter Name\% Free Space
Frequency3600
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeSystem.Performance.ThresholdMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Disk Free Space
Database file{3} that is part of database {2} on instance {1} on computer {0} is hosted on a logical disk that is running out of disk space. This could cause a problem if the database needs to grow
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2008.DBFile.DiskFreeSpace" Accessibility="Public" Enabled="true" Target="SQL2008Core!Microsoft.SQLServer.2008.DBFile" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="SystemPerf!System.Performance.ThresholdMonitorType" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2008.DBFile.DiskFreeSpace.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Target/Host/Host/Host/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</AlertParameter2>
<AlertParameter3>$Target/Host/Host/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseName$</AlertParameter3>
<AlertParameter4>$Target/Property[Type="SQL!Microsoft.SQLServer.DBFile"]/FileName$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UnderThreshold" MonitorTypeStateID="UnderThreshold" HealthState="Error"/>
<OperationalState ID="OverThreshold" MonitorTypeStateID="OverThreshold" HealthState="Success"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>% Free Space</CounterName>
<ObjectName>LogicalDisk</ObjectName>
<InstanceName>$Target/Property[Type="SQL!Microsoft.SQLServer.DBFile"]/Drive$</InstanceName>
<Frequency>3600</Frequency>
<Threshold>5</Threshold>
</Configuration>
</UnitMonitor>