Azure API Management Service - Alerts and Monitoring

MOHAMED BAHARDEEN S 21 Reputation points
2022-08-25T08:14:12.653+00:00

Hello Team,

I have 1 Azure API Management service and have 10 API in this instance.
I enabled alert rule for all the backend response code NOT EQUAL to 200.

I am getting alert but it is not displaying the API name for which it is failing.

can any one help me here to address this issue.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
0 comments No comments
{count} votes

Answer accepted by question author
  1. JananiRamesh-MSFT 29,436 Reputation points Moderator
    2022-08-25T17:31:13.17+00:00

    Hi @MOHAMED BAHARDEEN S Thanks for reaching out. Alert rule scope always applies to the entire APIM service You cannot set up an alert specifically at API level. In order to fetch the API details, you can enable Diagnostic Logging to Log Analytics and then create an alert based on a query you write.

    Reference:
    https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-use-azure-monitor#resource-logs
    https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-unified-log

    Query examples:

    //Get the logs for all backend response code not equal to 200
    // To create an alert for this query, click '+ New alert rule'
    ApiManagementGatewayLogs
    | where TimeGenerated > ago(1d)
    | where BackendResponseCode != 200

    234966-image.png

    please let me know incase of further queries, I would be glad to assist you.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.