{"name":"Databases at 80% of max file size","description":"This metric tracks the largest file in a database as a percentage of the maximum file size. If there are 3 files, and 2 are at 50% of the max set (max_usage in sys.database_files), and a third is at 60%, the 60% number is returned.","tsql":"WITH cteSize (PercentAutoGrowth) AS (\r\nSELECT (CAST(size AS NUMERIC(10, 2)) \/ df.max_size) * 100 AS PercentAutoGrowth\r\nFROM sys.database_files AS df\r\nWHERE\r\ndf.type = 0\r\nAND df.max_size > 0\r\n)\r\nSELECT MAX(cteSize.PercentAutoGrowth)\r\nFROM cteSize","instances":true,"databases":{"mode":1},"frequency":3600,"metricenabled":true,"alertname":"Database at 80% of max file size allowed","alertdescription":"At least one file in the database is at 80% of the max file size set.","_thresholds_high":{"selected":true,"value":90},"_thresholds_medium":{"selected":true,"value":80},"alertenabled":true,"frequency_comment":"seconds (collected every hour)","rateofchange":false,"aboveorbelow":"above","_thresholds_low":{"selected":false},"collections":1,"targetentitytype":0}