Custom Json Payload For Metric Alert

Sonali Singh (ext) 1 Reputation point

Do we have custom json payload for metric alert .Like the way we have for log alert and log analytics alerts.If there is a way to create custom json payload for metric alert please tell me the documentation i should refer.Please do not tell to follow classic alert . I am using newer alert approach and have to pass custom json payload not the usual one.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,667 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Stanislav Zhelyazkov 19,126 Reputation points MVP

    Metric alerts do not support customizing the json payload. In this cases best is to have signal that starts Azure Automation runbook, Azure Function or Azure Logic App. In one of those you can process the payload to your own liking and send it to the destination you want.

    With that said I believe you can add custom properties to the already defined payload by using properties.actions.webHookProperties. . That allows you to add additional name value pairs to be passed with the action. You will have to test where those appear in the alert schema though.

    P.S. Do not forget to mark this reply as answer.

    0 comments No comments