0
votes

I'm very new to the Azure Event Grid and have a question on how to do something. I'd like to be able to register to receive events about VM activities (start/deallocate, etc) in a c#/.Net application in order to be able to react to certain VM events.

Has anyone done something like this? All the c# Azure Event Grid examples I can find seem to deal with getting notifications about items being removed from/added to blob storage in Azure.

1
According to Azure Event Grid official document, it seems that VM service is not supported by Azure Event Grid now. urrently, the following Azure services have built-in publisher support for event grid:+ Azure Subscriptions (management operations), Custom Topics, Event Hubs, Resource Groups (management operations), Storage Blob - Tom Sun - MSFT

1 Answers

0
votes

You can check this tutorial, it explains how to monitor VM changes:

In a nutshell:

  • Create a logic app with an eventgrid trigger.
  • Specify the resource group and resource (VM) name.
  • Filter the events you're interested in based on the operationname: @equals(triggerBody()?['data']['operationName'], 'Microsoft.Compute/virtualMachines/write')