Alert on SQL Job Failure when SQL Agent Job Discovery is Enabled

Customer was asking why they were not getting alerts for SQL Agent Job failures.  They had enabled individual SQL Agent Job Discoveries that is talked about in Kevin’s post.

By default the Last Run Status monitor does not alert.  So they created an override to enable Generates Alert.



Problem was no alerts came through.  Looking at Alert severity it says “Critical” and Alert on State it says “The monitor is in a critical health state”.  Looks good to me.

But still no alerts.

Lets take a look at the monitor.  The monitor is in a warning state.  That is weird I thought Alert severity is “Critical” from the above screenshot.



Lets take a look at the monitor.  I right click and go to monitor properties.  There is no Critical Health State, only Warning and Healthy for this monitor.  Looks like a bug to me or bad MP practices.


If I look back at my Overrides I can see that this monitor will only Alert On State if “Alert if it is in a Critical Health State”



Well it will never go into a “Critical Health state” because it doesn’t exist.   There is no way to override the monitors health.  This is not usually an issue because most monitors are either two state Health and Critical, or three state, Healthy, Warning, and Critical.

So what to do?

The only way to get the monitor to alert is to create an override so that Alert on State is changed to Warning.


Now when the monitor changes to a “Warning state” I get an Alert.



But why is it a “Warning”?  Not really sure.  The default behavior is Alert severity is “Critical”

If I create another override for “Alert severity” Critical



Now I get a critical alert.




But the monitor is still in a warning state and could be confusing to the end user.



I will file a bug to get this changed.







2 Responses to Alert on SQL Job Failure when SQL Agent Job Discovery is Enabled

  1. Eduard November 20, 2015 at 8:48 am #

    Yes!!!! Thank you very much!!!!

  2. Anthony August 18, 2016 at 11:15 pm #

    Thanks, this helped me out. This also happens in SQL 2016 (MP version

Leave a Reply