Azure – First look into “Event Grid Subscriptions”

This blog takes a first look at the “Event Grid” service by Azure. Microsoft announced this service in August 2017. This is still in public preview as of writing this blog.

Azure Event Grid allows you to easily build applications with event-based architectures. You select the Azure resource you would like to subscribe to and give the event handler or WebHook endpoint to send the event to. Event Grid has built-in support for events coming from Azure services, like storage blobs and resource groups. Event Grid also has custom support for application and third-party events, using custom topics and custom webhooks.

You can use filters to route specific events to different endpoints, multicast to multiple endpoints, and make sure your events are reliably delivered. Event Grid also has built in support for custom and third-party events.

event-grid-functional-model

We shall create a simple “Event Grid Subscription” which comes under Event Grid. This Event Subscription will monitor one of Azure Resource Group for events. Trigger an Azure automation runbook, in case if any event occurs on the resource group.

Below is the event types that the event subscription will monitor:

RG_Event_Types.jpg

  1. Search for the “Event Subscription”search_event_subscription
  2. Fill in the required details and click on CREATE. Enter your Azure Automation Runbook’s webhook under the “Subscriber Endpoint”. Thus, your runbook will be triggered when ever any event under the specified runbook occurs.create_event_sub
  3. Once the “Event Subscription” is created. Create a simple resource (like public IP), and we can see that our runbook is triggered. [Open JOBS pane under the runbook to verify that the runbook has run]trigger_runbook

 

Follow this link, if you are looking for Azure APIs to create Event Subscriptions.

Follow this link for more information about Azure Event Grid.

 

Looking for free PowerShell scripts? Check out my Powershell Contributions under Microsoft Technet Script Centre

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s