Runbook Job - how to alert on error?

AConfusedUser 66 Reputation points
2021-01-07T21:49:48.457+00:00

Using Automation I created a runbook and scheduled it to run.

The job runs and if there is an error in the "Errors" tab, I do not get any sort of notification.

The job status is completed but inside the job (Output, Errors, Warnings, All Logs, Exception) I want to be alerted when an Error entry is captured.

How can I accomplish this?

Thank you

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,161 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 99,551 Reputation points MVP
    2021-01-07T22:01:21.49+00:00

    Maybe this is helpful to create alerts on failed Azure Automation Runbooks:
    https://learn.microsoft.com/en-us/azure/automation/automation-alert-metric

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten


  2. Andreas Baumgarten 99,551 Reputation points MVP
    2021-01-07T22:17:12.997+00:00

    Than maybe this might be an option:
    https://learn.microsoft.com/en-us/azure/automation/automation-manage-send-joblogs-log-analytics#find-all-jobs-that-have-completed-with-errors

    Based on Log Analytics queries it's possible to fire an alert:
    https://learn.microsoft.com/en-us/azure/azure-monitor/platform/alerts-log

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    0 comments No comments