{"name":"Percentage of used log space","description":"This metric measures the percentage of used space for transaction log files (LDF files).","tsql":"-- create result holder\r\nDECLARE\t@result TABLE\r\n\t(\r\n\t  [Database_Name] VARCHAR(150) ,\r\n\t  [Log_Size] FLOAT ,\r\n\t  [Log_Space] FLOAT ,\r\n\t  [Status] VARCHAR(100)\r\n\t) \r\n\r\nINSERT\tINTO @result\r\n\t\tEXEC ( 'DBCC sqlperf(LOGSPACE) WITH NO_INFOMSGS'\r\n\t\t\t)\r\n\r\n-- only return for the DB in context, rounding it \r\nSELECT\tROUND([Log_Space], 2)\r\nFROM\t@result\r\nWHERE\t[Database_Name] = DB_NAME()\r\n","instances":true,"frequency":300,"databases":{"mode":0},"rateofchange":false,"metricenabled":true,"alertname":"Free log space decreased","alertdescription":"This alert is raised when the percentage of used space in the log transaction files (LDF) exceeds the specified thresholds. ","aboveorbelow":"above","collections":1,"alertenabled":true,"_thresholds_high":{"selected":true,"value":90},"_thresholds_medium":{"selected":true,"value":80},"_thresholds_low":{"selected":false},"targetentitytype":0}