Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Customizing Alert notification email in Azure monitoring

Premier Developer Consultant Adel Ghabboun explorers how to setup Alert notification email using Azure monitoring.


A new feature was added recently which gives you the ability to customize your monitoring alerts email notification. And this feature is currently located in the alert component right under the Action Groups with the name “Customize Actions” Let’s take a quick peek over this feature’s main actions:

1- Email Subject. Allows you to override the email subject

2- Include custom Json payload for webhook. Custom payload to send with the webhook

an1

Below is the list of all the available Parameters and variables:

Parameter

Variable

Description

AlertRuleName

#alertrulename

Name of the Alert Rule.

Severity

#severity

Severity set for the fired log alert.

AlertThresholdOperator

#thresholdoperator

Threshold operator for the alert rule. Greater than or Less than.

AlertThresholdValue

#thresholdvalue

Threshold value for the alert rule.

LinkToSearchResults

#linktosearchresults

Link to Analytics portal that returns the records from the query that created the alert.

ResultCount

#searchresultcount

Number of records in the search results.

Search Interval End time

#searchintervalendtimeutc

End time for the query in UTC, format - mm/dd/yyyy HH:mm:ss AM/PM.

Search Interval

#searchinterval

Time window for the alert rule, format - HH:mm:ss.

Search Interval StartTime

#searchintervalstarttimeutc

Start time for the query in UTC, format - mm/dd/yyyy HH:mm:ss AM/PM..

SearchQuery

#searchquery

Log search query used by the alert rule.

SearchResults

"IncludeSearchResults": true

Records returned by the query as a JSON Table, limited to the first 1,000 records; if "IncludeSearchResults": true is added in custom JSON webhook definition as a top-level property.

WorkspaceID

#workspaceid

ID of your Log Analytics workspace.

Application ID

#applicationid

ID of your Application Insight app.

Subscription ID

#subscriptionid

ID of your Azure Subscription used with Application Insights.


Here are few examples of custom Json payload:

Example 1

{

"alertname":"#alertrulename",

"IncludeSearchResults":true

}

Example 2

{

"text":"#alertrulename fired with #searchresultcount over threshold of #thresholdvalue."

}

Share the post

Customizing Alert notification email in Azure monitoring

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×