MSSQL 2008: 收集剩余的数据库文件组已分配空间(MB)

Microsoft.SQLServer.2008.DBFileGroup.FileGroupAllocatedSpaceLeftMB.Collection (Rule)

针对此文件组的所有文件中的剩余空间量(MB)。不包括在启用了自动增长的情况下在托管文件的介质上剩余的空间。

Knowledge Base article:

摘要

针对此文件组的所有文件中的剩余空间量(MB)。不包括在启用了自动增长的情况下在托管文件的介质上剩余的空间。

可替代参数

名称

说明

默认值

已启用

启用或禁用工作流。

间隔(秒)

要运行工作流的重复时间间隔(秒)。

900

同步时间

使用 24 小时格式指定的同步时间。可以忽略。

 

超时(秒)

指定允许工作流在被关闭并标记为失败之前运行的时间。

300

Element properties:

TargetMicrosoft.SQLServer.2008.DBFileGroup
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2008.DBFileGroupSizeRawPerfProvider Default
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.SQLServer.2008.DBFileGroup.FileGroupAllocatedSpaceLeftMB.Collection" Target="SQL2008Core!Microsoft.SQLServer.2008.DBFileGroup" Enabled="true">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2008.DBFileGroupSizeRawPerfProvider">
<IntervalSeconds>900</IntervalSeconds>
<SyncTime/>
<ConnectionString>$Target/Host/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ConnectionString$</ConnectionString>
<ServerName>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ServerName>
<SqlInstanceName>$Target/Host/Host/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</SqlInstanceName>
<ObjectName>SQL DB File Group</ObjectName>
<CounterName>DB File Group Allocated Space Left (MB)</CounterName>
<InstanceName/>
<DatabaseName>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseName$</DatabaseName>
<DBFileGroupId>$Target/Property[Type="SQL!Microsoft.SQLServer.DBFileGroup"]/GroupID$</DBFileGroupId>
<Value>$Data/Property[@Name='FreeSpaceAutoGrowMB']$</Value>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>