In the last post
I showed how to create a monitor runbook using the built in scheduler in Azure Automation. In this post I show how to create a monitor using the Azure Job Scheduler. To do this we need to first create a Webhook on the runbook we want to schedule.
To create a Webhook click on the Webhooks section on the rubook then select add webhook -> create new webhook. When creating it you want to make sure of a few things. First make sure that the webhook is enabled. Second check the expiration date make sure it is as far in the future as you want and keep track of it somewhere. Lastly make sure you copy the URL BEFORE
you finish this is your only chance to get it.
The next step to create the Azure Job Schedualer. You will have to go to the current Azure Portal as this is feature is Coming soon in the new Azure Portal.
Once you are in the old Azure Portal click the New button in the bottom left hand corner and select App Services -> Scheduler -> Custom Create.
If you have not created a job collection before you will be prompted to create a new collection and your job collection name and click the next arrow.
Now that you have a job collection you can create a job. to do this give the job a name. Next select https: for the action type (notice the web hook URL is https). For the method type select GET. then in the URI put the URL from when you created the web hook.
The last step is to create the schedule. Since we are creating a runbook to act as a monitor we will want to create a recurring job. Next in the Recure Every section we will select how often we want the job run (notice you can select minutes). You can then choose to have it start now or on a specific date and that it has an end date (something to keep track of).
Once this has been created your runbook will now run on the schedule you created! In the final post I will show you how to create the monitor in a textual runbook.