How to trigger an Azure Automation Script when a Job Status change

Calderara Serge 46 Reputation points
2021-08-03T08:18:38.04+00:00

Dear all,

Is there a way to get a script in Azure automation which is trigger when a given Job status change ?
That script will call an external Jira API which will then update a status inside a Jira issue

Thanks for help
regards

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

Accepted answer
  1. Stanislav Zhelyazkov 24,686 Reputation points MVP
    2021-08-03T11:00:04.637+00:00

    Hi,
    If I understand correctly (correct me if I am wrong) you want to trigger something when a runbook job status is changed. By default, there is no such thing but here are some suggestions:

    • have some custom script/code that runs periodically and checks for changes. There is a job API for Azure Automation jobs. Of course, this requires some custom code to accommodate to the logic for what you are trying to achieve.
    • Automation account has diagnostic logs for jobs. You can send those to Event Hub/Log Analytics/ Storage account. For any of those you will have to do some custom integration to achieve the desired effect. Log Analytics have alerts which trough action groups trigger webhook, some Azure services or built-in notifications. If you can create Log Alert based on Kusto query language that achieve the desired result you can use that.

    With any of the options you will have to have some custom code in order to interact with the Jira API.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.