You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/api-management-howto-use-azure-monitor.md
+17-18Lines changed: 17 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ author: dlepow
7
7
ms.service: azure-api-management
8
8
ms.custom: engagement-fy23, devdivchpfy22
9
9
ms.topic: tutorial
10
-
ms.date: 08/26/2024
10
+
ms.date: 11/01/2024
11
11
ms.author: danlep
12
12
---
13
13
# Tutorial: Monitor published APIs
@@ -37,24 +37,24 @@ In this tutorial, you learn how to:
37
37
38
38
## View metrics of your APIs
39
39
40
-
API Management emits [metrics](/azure/azure-monitor/essentials/data-platform-metrics) every minute, giving you near real-time visibility into the state and health of your APIs. The following are the most frequently used metrics. For a list of all available metrics, see [supported metrics](/azure/azure-monitor/essentials/metrics-supported#microsoftapimanagementservice).
40
+
API Management emits [metrics](/azure/azure-monitor/essentials/data-platform-metrics) every minute, giving you near real-time visibility into the state and health of your APIs. The following are the most frequently used metrics. For a list of all available metrics, see [supported metrics](/azure/azure-monitor/reference/supported-metrics/microsoft-apimanagement-service-metrics).
41
41
42
42
***Capacity** - helps you make decisions about upgrading/downgrading your API Management services. The metric is emitted per minute and reflects the estimated gateway capacity at the time of reporting. The metric ranges from 0-100 calculated based on gateway resources such as CPU and memory utilization and other factors.
43
43
44
44
> [!TIP]
45
-
> In the [v2 service tiers](v2-service-tiers-overview.md), API Management replaced the capacity metric with separate CPU and memory utilization metrics. These metrics can also be used for scaling decisions and troubleshooting. [Learn more](api-management-capacity.md)
45
+
> In the [v2 service tiers](v2-service-tiers-overview.md), API Management has replaced the capacity metric with separate CPU and memory utilization metrics. These metrics can also be used for scaling decisions and troubleshooting. [Learn more](api-management-capacity.md)
46
46
47
47
***Requests** - helps you analyze API traffic going through your API Management services. The metric is emitted per minute and reports the number of gateway requests with dimensions. Filter requests by response codes, location, hostname, and errors.
48
48
49
49
> [!IMPORTANT]
50
-
> The following metrics have been retired: Total Gateway Requests, Successful Gateway Requests, Unauthorized Gateway Requests, Failed Gateway Requests, Other Gateway Requests. Please migrate to the Requests metric which provides equivalent functionality.
50
+
> The following metrics have been retired: Total Gateway Requests, Successful Gateway Requests, Unauthorized Gateway Requests, Failed Gateway Requests, Other Gateway Requests. Please migrate to the Requests metric which provides closely similar functionality.
51
51
52
52
:::image type="content" source="media/api-management-howto-use-azure-monitor/apim-monitor-metrics-1.png" alt-text="Screenshot of Metrics in API Management Overview":::
53
53
54
54
To access metrics:
55
55
56
56
1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance. On the **Overview** page, on the **Monitor** tab, review key metrics for your APIs.
57
-
1. To investigate metrics in detail, select **Metrics** from the left menu.
57
+
1. To investigate metrics in detail, select **Monitoring** > **Metrics** from the left menu.
58
58
59
59
:::image type="content" source="media/api-management-howto-use-azure-monitor/api-management-metrics-blade.png" alt-text="Screenshot of Metrics item in Monitoring menu in the portal.":::
60
60
@@ -73,15 +73,14 @@ You can receive [alerts](/azure/azure-monitor/alerts/alerts-metric-overview) bas
73
73
To configure an example alert rule based on a request metric:
74
74
75
75
1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance.
76
-
1. Select **Alerts** from the left menu.
76
+
1. Select **Monitoring** > **Alerts** from the left menu.
77
77
78
78
:::image type="content" source="media/api-management-howto-use-azure-monitor/alert-menu-item.png" alt-text="Screenshot of Alerts option in Monitoring menu in the portal.":::
79
79
80
80
1. Select **+ Create** > **Alert rule**.
81
-
1. In the **Select a signal** window on the **Condition** tab:
82
-
1. In **Signal type**, select **Metrics**.
81
+
1. On the **Condition** tab:
83
82
1. In **Signal name**, select **Requests**.
84
-
1. In **Alert logic**, specify a **Threshold value**, which is the number of occurrences after which the alert should be triggered.
83
+
1. In **Alert logic**, review or modify the default values for the alert. For example, update the static **Threshold**, which is the number of occurrences after which the alert should be triggered.
85
84
1. In **Split by dimensions**, in **Dimension name**, select **Gateway Response Code Category**.
86
85
1. In **Dimension values**, select **4xx**, for client errors such as unauthorized or invalid requests. If the dimension value doesn't appear, select **Add custom value** and enter **4xx**.
87
86
1. In **When to evaluate**, accept the default settings, or select other settings to configure how often the rule runs. Select **Next**.
@@ -94,13 +93,13 @@ To configure an example alert rule based on a request metric:
94
93
95
94
1. On the **Details** tab of **Create an alert rule**, enter a name and description of the alert rule and select the severity level.
96
95
1. Optionally configure the remaining settings. Then, on the **Review + create** tab, select **Create**.
97
-
1.Now, test the alert rule by calling the Conference API without an API key. For example:
96
+
1.Optionally test the alert rule by using an HTTP client to simulate a request that triggers the alert. For example, run the following command in a terminal, substituting the API Management hostname with the hostname of your API Management instance:
98
97
99
98
```bash
100
-
curl GET https://apim-hello-world.azure-api.net/conference/speakers HTTP/1.1
99
+
curl GET https://contoso.azure-api.net/non-existent-endpoint HTTP/1.1
101
100
```
102
101
103
-
An alert triggers based on the evaluation period, and it will send email to [email protected].
102
+
An alert triggers based on the evaluation period, and it will send email to [email protected].
104
103
105
104
Alerts also appear on the **Alerts** page for the API Management instance.
106
105
@@ -111,7 +110,7 @@ To configure an example alert rule based on a request metric:
111
110
Activity logs provide insight into the operations on your API Management services. Using activity logs, you can determine the "what, who, and when"for any write operations (PUT, POST, DELETE) taken on your API Management services.
112
111
113
112
> [!NOTE]
114
-
> Activity logs do not include read (GET) operations or operations performed in the Azure portal or using the original Management APIs.
113
+
> Activity logs do not include read (GET) operations or operations performed in the Azure portal.
115
114
116
115
You can access activity logs in your API Management service, or access logs of all your Azure resources in Azure Monitor.
117
116
@@ -136,7 +135,7 @@ Resource logs (Azure Monitor logs) provide rich information about API Management
136
135
To configure resource logs:
137
136
138
137
1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance.
:::image type="content" source="media/api-management-howto-use-azure-monitor/api-management-diagnostic-logs-blade.png" alt-text="Screenshot of Diagnostic settings item in Monitoring menu in the portal.":::
142
141
@@ -155,7 +154,7 @@ To configure resource logs:
155
154
156
155
For more information, see [Create diagnostic settings to send platform logs and metrics to different destinations](/azure/azure-monitor/essentials/diagnostic-settings).
157
156
158
-
## View diagnostic data in Azure Monitor
157
+
## View logs and metrics in Azure Monitor
159
158
160
159
If you enable collection of logs or metrics in a Log Analytics workspace, it can take a few minutes for data to appear in Azure Monitor.
161
160
@@ -177,7 +176,7 @@ To view the data:
177
176
178
177
For more information about using resource logs for API Management, see:
179
178
180
-
* [Log Analytics tutorial](/azure/azure-monitor/logs/log-analytics-tutorial), or try the [Log Analytics demo environment](https://ms.portal.azure.com/#view/Microsoft_OperationsManagementSuite_Workspace/LogsDemo.ReactView).
0 commit comments