Metrics install automatically if you have Redgate Monitor installed.
If you are using Redgate’s SQL Server monitoring tool, Redgate Monitor, you can instantly install and run this metric on your servers.
This metric tells you if a specific SQL Server Agent job that runs at the same time every day has overrun. The metric is useful when a job can have negative effects on other processes if it overruns.
For example, you may have a series of consecutive jobs that run for 1 minute each, starting at 9am. It’s important for the first job to finish by 9:01, so the second one can begin, and so on. If the job runs for longer than expected, an alert is raised.
Important: You’ll need to edit the T-SQL with the job’s name and the expected start and finish hour and minute. In this query, the job is called ‘TestJob’, it starts at 17:00, and it should finish by 17:02.
Metric definition
Name
'TestJob' overran
Description
This checks if a specific job has not finished by the expected time.
- If 0 is returned, the job either:
- - hasn't started,
- - is running during the expected time, or
- - has finished running.
- If 1 is returned, the job is running beyond the expected finish time.
The T-SQL query that will collect data
Instances to collect from
Select all
Databases to collect from
msdb
Collection frequency
60
Use collected or calculated values
Leave the Use a calculated rate of change between collections check box unchecked
Metric collection
Enabled
Alert definition
Alert name
'TestJob' overran
Description
Raise an alert when the metric value goes
Above the defined threshholds
Default threshold values
High: | Leave unchecked |
Medium: | 0 |
Low: | Leave unchecked |
Raise an alert when the threshold is passed for
1 collection
Alert is
Enabled