{"name":"Last restore time","description":"Measure the time since the last restore, in minutes.","tsql":"SELECT DATEDIFF(MINUTE, restore_date, GETDATE())\r\n  FROM (SELECT TOP 1 restore_date\r\n          FROM msdb.dbo.restorehistory\r\n          WHERE destination_database_name = DB_NAME()\r\n          ORDER BY restore_date DESC\r\n       ) rd;","instances":false,"frequency":60,"databases":{"mode":1},"rateofchange":false,"metricenabled":true,"alertname":"Log restoration overdue","alertdescription":"The time since the last log restoration is too high - it should have happened already.","aboveorbelow":"above","collections":1,"alertenabled":true,"_thresholds_high":{"selected":true,"value":122},"_thresholds_medium":{"selected":true,"value":65},"_thresholds_low":{"selected":true,"value":32},"thresholds_comment":"Note: These thresholds are intended as guideline values and are based on a log shipping frequency of 30 minutes. If they seem too high or too low in practise, replace them with values that match your log shipping frequency.","targetentitytype":0}