Fragmentation alert – setup a limit on Page Count

by Jul 10, 2017

Can I know if there is a way to set a Page Count limit for Fragmentation alerts?

Right now I have a table with "image' field in it and a clustered index.

When I run dm_db_index_physical_stats to get the fragmentation details, I get the following

IndexName     –alloc_unit_type_desc   —— avg_fragmentation_in_percent   page_count
PK_TableName– IN_ROW_DATA           ——- 83.3333333333333     ———- 6
PK_TableName– LOB_DATA                  ——- 0                                  ———- 2602

Now, I receive Critical alert for this index where the Page Count is just 6.

I want to set a page_count limit to at least 2000, so alerts are fired only if the page_count is >2000. How do I configure this?