How to do it...

Configuring a Runbook action in OMS consists of the following steps:

  1. Create a new Azure Automation Runbook in the Azure portal
  2. Define any necessary credential assets if the Runbook will run on a hybrid worker group
  3. Create an OMS search query and use the query in an alert rule
  4. 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.

Get Microsoft Operations Management Suite Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.