Azure automation runbook to install OMS agent to enable OMs monitoring

Azure automation runbook to install OMS agent to enable OMs monitoring.

This script/runbook can help you to install OMs agent on any of VM and enable monitoring for that particular VM instance.

Refer MS gallery for full script – https://gallery.technet.microsoft.com/Enable-OMSMonitoring-91ff316b

Once you have the code downloaded from above link then just create new runbook inside azure automation account and copy that code to runbook as it is and start runbook . Once you click on start the runbook will prompt you for few details like workspace name, vm name, resource group name and then it will connect vm to OMS workspace.

Prerequisites

  • The runbooks work with an Azure Run As account. The Run As account is the preferred authentication method since it uses certificate authentication instead of a password that may expire or change frequently.
  • This solution can only manage VMs that are in the same subscription as where the Automation account resides. but if in case you want to manage vm from another subscription then that is possible , you just need to add another subscription connect asset and have to add code to connect another subscription before get-azurermvm commands
  • This solution must need OMS installed in subscription
  • you must Need AzureRM.OperationalInsights module in azure automation account to perform this operation.

Refer MS gallery for full script – https://gallery.technet.microsoft.com/Enable-OMSMonitoring-91ff316b

(Visited 1,004 times, 1 visits today)
2 Comments

Add a Comment

Facebook