Alerting on job failures
Closed this issue · 1 comments
Hello!
I was wondering if there is a way to alert on job failures for managed instances? I am aware that you can use email but this uses legacy auth so isn't ideal. Is there a way to adapt https://github.com/dimitri-furman/managed-instance/blob/master/sp_readmierrorlog/sp_readmierrorlog.sql to also filter for failed jobs?
Alternatively, is there a way to use Diagnostic Logging for the Azure MI instances to see failed jobs? My testing so far has made little progress.
Thanks :)
If you cannot use built-in SQL Agent alerting, you will need to create a custom alerting solution that queries the msdb.dbo.sysjobhistory
table and sends email based on results. The instance error log that is returned by sp_readmierrorlog
procedure does not record job failures specifically.