Configuring a Runbook action in OMS consists of the following steps:
- Create a new Azure Automation Runbook in the Azure portal
- Define any necessary credential assets if the Runbook will run on a hybrid worker group
- Create an OMS search query and use the query in an alert rule
- Use the automation solution and invoke the Runbook in the OMS alert rule
For illustration, we will create an alert rule that is based on a search query which looks for Nagios alert records indicating that an on-premises server is down. The alert rule will then make use of a runbook action run on a hybrid worker to determine the state of the virtual machine and restart it if necessary.