Subscribe to events raised by Azure Resource Notifications - Health Resources system topic (Preview)
Article
This article explains the steps needed to subscribe to events published by Azure Resource Notifications - Health Resources. For detailed information about these events, see Azure Resource Notifications - Health Resources events.
In the search bar, type Event Grid System Topics, and select it from the drop-down list.
On the Event Grid system topics page, select + Create on the toolbar.
On the Create Event Grid System Topic page, select Azure Resource Notifications - Health events for Topic type.
Select the resource group in which you want to create the system topic.
Enter a name for the system topic.
Select Review + create
On the Review + create page, select Create.
On the successful deployment page, select Go to resource to navigate to the page for your system topic. You see the details about your system topic on this page.
If you don't specify included-event-types, all the event types are included by default.
To filter events from a specific resource, use the --subject-begins-with parameter. The example shows how to subscribe to AvailabilityStatusChanged events for resources in a specified resource group.
If you don't specify IncludedEventType, all the event types are included by default.
To filter events from a specific resource, use the -SubjectBeginsWith parameter. The example shows how to subscribe to AvailabilityStatusChanged events from resources in a specified resource group.
On the Event Grid System Topic page, select + Event Subscription on the toolbar.
Confirm that the Topic Type, Source Resource, and Topic Name are automatically populated.
Enter a name for the event subscription.
For Filter to event types, select the event, for example, Availability status changed or Resource annotated.
Select endpoint type.
Configure event handler based no the endpoint type you selected. In the following example, an Azure event hub is selected.
Select the Filters tab to provide subject filtering and advanced filtering. For example, to filter for events from resources in a specific resource group, follow these steps:
Select Enable subject filtering.
In the Subject Filters section, for Subject begins with, provide the value of the resource group in this format: /subscriptions/{subscription-id}/resourceGroups/{resourceGroup-id}.
Then, select Create to create the event subscription.
In the search bar, type Event Grid System Topics, and press ENTER.
Select the system topic.
On the Event Grid System Topic page, select Delete on the toolbar.
Filtering examples
Subscribe to Platform Initiated annotations belonging to Unplanned category.
You might want to filter to events that require an action. Near real-time alerts are critical in enabling quick mitigation actions. By filtering to Azure initiated and unplanned activity, you can become instantly aware of unanticipated activity across the workloads that requires immediate attention. You might want to redeploy or trigger communication to your end-users to notify the impact.
In the Filters tab of the event subscription, choose the following advanced filters.
- Key = data.resourceInfo.properties.context
- Operator = StringEndsWith
- Value = Platform Initiated
AND
- Key = data.resourceInfo.properties.category
- Operator = StringEndsWith
- Value = Unplanned
Subscribe to annotations scoped to a particular target type
Having the ability to filter to the resource types that require attention or mitigation upon impact can enable you to focus on what matters. Even within VMs, perhaps you only care when health of the parent or entire virtual machine scale set is affected versus when an instance in a virtual machine scale set is affected. This filter allows you to precisely hone in on the type of resources for which you want the near real-time alerts.
In the Filters tab of the event subscription, choose the following advanced filters.
Key = data.resourceInfo.properties.targetResourceType
Operator = String contains
Value = Microsoft.Compute/virtualMachines
Contact us
If you have any questions or feedback on this feature, don't hesitate to reach us at arnsupport@microsoft.com.
To better assist you with specific feedback about a certain event, provide the following information:
For missing events:
System topic type name
Approximate timestamp in UTC when the operation was executed
Base resource ID for which the notification was generated
Navigate to your resource in Azure portal and select JSON view at the far right corner. Resource ID is the first field on the JSON view page.
Expected event type
Operation executed (for example, VM started or stopped, Storage account created etc.)
Description of issue encountered (for example, VM started and no Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged event generated)
If possible, provide the correlation ID of operation executed
For event that was delayed or has unexpected content
System topic type name
Entire contents of the notification excluding data.resourceInfo.properties
Description of issue encountered and impacted field values
Ensure that you aren't providing any end user identifiable information while you're sharing this data.