Showing results for 
Search instead for 
Did you mean: 
Create Post

Custom Metric - Index Fragmentation


This custom metric will track the fragmentation of an index


To create the custom metric, click on Options > Custom Resource Metrics and configure the metric similar to this:

Database Versions: <no limitations>

Display Name: Index Fragmentation

Description: <add your own description>

Category: <add to whatevfer category you like or create a new one>

Units: %

Metric Type: Single Value

Frequency: 900

Timeout: 50

SQL Statement:

Use [Database]

SELECT round(avg_fragmentation_in_percent, 0) FROM sys.dm_db_index_physical_stats(DB_ID(N'Database'), Object_ID(N'Database.Table'), INDEXPROPERTY(OBJECT_ID('Database.Table'), 'Index_Name', 'IndexID'), NULL , NULL)

Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎11-04-2019 04:19 PM
Updated by: