Needing a modified version of Job Failing alert

MarkTampaMarkTampa Posts: 12 New member
edited June 19, 2020 12:13PM in SQL Monitor
I have setup the Job Failing alert to alert us to failed jobs, however, it is alerting us of a LOT of failed jobs.  I know that is a bad thing and that will be addressed soon.  What I want to be notified of is certain jobs failing and not ALL jobs failing.  Like only full and translog backups failing.  I am guessing this comes to a custom metric but I have no idea where to start with this.  Does anyone have any ideas?   OR, Redgate Support staff can I have access to the code that runs the Job Failing alert so I can see if I can modify it?
Tagged:

Best Answer

  • Alex BAlex B Posts: 933 Diamond 3
    Accepted Answer
    I'm just updating here based on further information and discussion from the support ticket you raised.

    If, for example, you only want to be alerted to jobs failing that begin with BACKUP you would customize the alert (at whichever level seemed appropriate, in the case provided it was appropriate at the SQL Server level for the SQL Server with the jobs in question) and you can enter a regular expression to exclude all jobs but those that had names that started with BACKUP (a regular expression like ^(?!BACKUP)​would match things that don't start with BACKUP - given that SQL Monitor's regular expressions are case insensitive).  This is job name rather than the content of the job (highlighted in yellow in the image below).

    Alternatively, you could still use the method I described in my previous email and disable the Job Failing alert at that SQL Server level and then re-enable the alert only for those jobs you want at the job level but depending on the number of jobs one wants to enable still this may be a bit more manual

    For having different job failures alert different email addresses you would customize at the specific job level and set the email address for the alert on the specific job to be the different email address - that portion is at the bottom of the alert configuration (marked in red in the image below):

    Product Support Engineer | Redgate Software

    Have you visited our Help Center?

Answers

  • Hi @MarkTampa,

    If you go to Configuration > Alert settings and then drill into the SQL instance in the hierarchy view at the left you can see the different Jobs and disable the alert at the specific job level.


    Alternatively, as it sounds like there are a lot of jobs and only a few you want to see, you can disable the alert at the All servers level, and then enable it at the specific job level as shown above.  The more specific level of alert configuration takes precedence over the more general.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.