Customizing Alert notification email in Azure monitoring

Premier Developer

Premier

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:

ParameterVariableDescription
AlertRuleName#alertrulenameName of the alert rule.
Severity#severitySeverity set for the fired log alert.
AlertThresholdOperator#thresholdoperatorThreshold operator for the alert rule. Greater than or Less than.
AlertThresholdValue#thresholdvalueThreshold value for the alert rule.
LinkToSearchResults#linktosearchresultsLink to Analytics portal that returns the records from the query that created the alert.
ResultCount#searchresultcountNumber of records in the search results.
Search Interval End time#searchintervalendtimeutcEnd time for the query in UTC, format – mm/dd/yyyy HH:mm:ss AM/PM.
Search Interval#searchintervalTime window for the alert rule, format – HH:mm:ss.
Search Interval StartTime#searchintervalstarttimeutcStart time for the query in UTC, format – mm/dd/yyyy HH:mm:ss AM/PM..
SearchQuery#searchqueryLog search query used by the alert rule.
SearchResults“IncludeSearchResults”: trueRecords 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#workspaceidID of your Log Analytics workspace.
Application ID#applicationidID of your Application Insight app.
Subscription ID#subscriptionidID of your Azure Subscription used with Application Insights.

 

Here are few examples of custom Json payload:

Example 1

Example 2

Premier Developer
Premier Developer

Premier Support for Developers

Follow Premier   

4 comments

  • A G
    A G

    Hi, I don’t see the above-mentioned options in my Azure account. Is this feature is still in development or something with my license to do? Only options I see are “Alert rule name” and “Description. Thanks

    • Avatar
      Adel Ghabboun

      Hi AG – you get this feature whenever you try to create an alert based on custom log search. Please find the below steps and we will update the blog to add more instructions very soon
      1- If you go to Alerts
      2- Add Condition (based on custom log search)
      3- Click on Done
      4- When you go back to the Alert blade, you will find the Customized Actions appeared .

      • Avatar
        Chris Clancy

        “we will update the blog to add more instructions very soon”

        Any idea when that will be -as this comment is from April.

Leave a comment