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/cdn/enable-raw-logs.md
+54-18Lines changed: 54 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,9 @@ ms.author: allensu
16
16
With Azure CDN from Microsoft, you can monitor resources in the following ways to help you troubleshoot, track, and debug issues.
17
17
18
18
* Raw logs provide rich information about every request that CDN receives. Raw logs differ from activity logs. Activity logs provide visibility into the operations done on Azure resources.
19
-
* Metrics, which displays 4 key metrics on CDN, including Byte Hit Ratio, Request Count, Response Size and Total Latency. It also provides different dimensions to break down metrics.
20
-
* Alert, which allows customer to setup alert for key metrics
21
-
* Additional metrics, which allows customers to leverage Azure Log Analytics to enable additional metrics of value. We also provide query samples for a few other metrics under Azure Log Analytics.
19
+
* Metrics, which display four key metrics on CDN, including Byte Hit Ratio, Request Count, Response Size and Total Latency. It also provides different dimensions to break down metrics.
20
+
* Alert, which allows customer to set up alert for key metrics
21
+
* Additional metrics, which allow customers to use Azure Log Analytics to enable additional metrics of value. We also provide query samples for a few other metrics under Azure Log Analytics.
22
22
23
23
> [!IMPORTANT]
24
24
> The HTTP raw logs feature is available for Azure CDN from Microsoft.
@@ -202,18 +202,22 @@ AzureDiagnostics
202
202
203
203
204
204
## Metrics
205
-
Azure CDN from Microsoft is integrated with Azure Monitor and publishes 4 CDN metrics to help track, troubleshoot and debug issues. The Metrics are displayed in charts and also accessible via PowerShell, CLI and API. The CDN metrics are free of charge.
205
+
Azure CDN from Microsoft is integrated with Azure Monitor and publishes four CDN metrics to help track, troubleshoot, and debug issues.
206
206
207
-
If there are requests flowing through Azure CDN from Microsoft, it measures and sends its metrics in 60-second intervals and takes up to 3 mins to appear in the portal. For more information, see Azure Monitor metrics.
207
+
The Metrics are displayed in charts and accessible via PowerShell, CLI, and API. The CDN metrics are free of charge.
208
+
209
+
Azure CDN from Microsoft measures and sends its metrics in 60-second intervals. The metrics can take up to 3 mins to appear in the portal.
210
+
211
+
For more information, see [Azure Monitor metrics](https://docs.microsoft.com/azure/azure-monitor/platform/data-platform-metrics).
| Bytes Hit ratio*| The percentage of egress from CDN cache, computed against the total egress. | Endpoint |
214
-
| RequestCount | The number of client requests served by CDN. | Endpoint </br> Client country </br> Client region </br> HTTP status </br> HTTP status group |
215
-
| ResponseSize | The number of bytes sent as responses from CDN edge to clients. |Endpoint </br> Client country </br> Client region </br> HTTP status </br> HTTP status group |
216
-
| TotalLatency | The total time from the client request received by CDN **until the last response byte send from CDN to client**. |Endpoint </br> Client country </br> Client region </br> HTTP status </br> HTTP status group |
218
+
| RequestCount | The number of client requests served by CDN. | Endpoint </br> Client country. </br> Client region. </br> HTTP status. </br> HTTP status group.|
219
+
| ResponseSize | The number of bytes sent as responses from CDN edge to clients. |Endpoint </br> Client country. </br> Client region. </br> HTTP status. </br> HTTP status group.|
220
+
| TotalLatency | The total time from the client request received by CDN **until the last response byte send from CDN to client**. |Endpoint </br> Client country. </br> Client region. </br> HTTP status. </br> HTTP status group.|
217
221
218
222
***Bytes Hit Ration = (egress from edge - egress from origin)/egress from edge**
219
223
@@ -225,27 +229,59 @@ Scenarios excluded in bytes hit ratio calculation:
225
229
### Metrics configuration
226
230
227
231
1. From the Azure portal menu, select **All Resources** >> **\<your-CDN-profile>**.
228
-
2. Under **Monitoring**, select **Metrics**.
232
+
233
+
2. Under **Monitoring**, select **Metrics**:
234
+
235
+
:::image type="content" source="./media/cdn-raw-logs/raw-logs-03.png" alt-text="Metrics for CDN profile." border="true":::
236
+
229
237
3. Select **Add metric**, select the metric to add:
238
+
239
+
:::image type="content" source="./media/cdn-raw-logs/raw-logs-04.png" alt-text="Add and select metric for CDN profile." border="true":::
240
+
230
241
4. Select **Add filter** to add a filter:
242
+
243
+
:::image type="content" source="./media/cdn-raw-logs/raw-logs-05.png" alt-text="Apply filter to metric." border="true":::
244
+
231
245
5. Select **Apply** splitting to see trend by different dimensions:
246
+
247
+
:::image type="content" source="./media/cdn-raw-logs/raw-logs-06.png" alt-text="Apply splitting to the metric." border="true":::
248
+
232
249
6. Select **New chart** to add a new chart:
233
250
234
-
### Alerting
235
-
You can also setup alerts on Microsoft CDN by clicking on **Alert** and **+ New alert rule** for metrics listed in Metrics section. Alert will be charged based on Azure Monitor. For more details about alerts, please refer to Azure Monitor Alert.
251
+
:::image type="content" source="./media/cdn-raw-logs/raw-logs-07.png" alt-text="Add new chart to the metric view." border="true":::
252
+
253
+
### Alerts
254
+
255
+
You can setup alerts on Microsoft CDN by selecting **Monitoring** >> **Alerts**.
256
+
257
+
Select **New alert rule** for metrics listed in Metrics section:
258
+
259
+
:::image type="content" source="./media/cdn-raw-logs/raw-logs-08.png" alt-text="Configure alerts for CDN endpoint." border="true":::
260
+
261
+
Alert will be charged based on Azure Monitor. For more information about alerts, see [Azure Monitor alerts](https://docs.microsoft.com/azure/azure-monitor/platform/alerts-overview).
236
262
237
263
### Additional Metrics
238
-
In addition to default metrics, you can enable additional metrics using Azure Log Analytics and Raw Log for additional cost. For more information about cost, please refer to Azure Monitor.
264
+
You can enable additional metrics using Azure Log Analytics and Raw Log for an additional a cost.
265
+
266
+
1. Follow steps above in enabling diagnostics to send raw log to log analytics.
239
267
240
-
1. Follow steps above in raw log to send raw log to log analytics.
241
-
2. Click on the Log Analytics workspace you created:
242
-
3. Go to Logs under the Log Analytics Workspace, use Kusto query to retrieve different Metrics. You can refer to the Microsoft CDN Kusto query samples in Logs under selected Analytics Workspace and do further analysis on additional metrics. You can refer to Help on the upper right to learn more about Kusto query language.
243
-
4. You can also view data by Chart and click Pin to dashboard.
244
-
5. Setup alerts for Metrics of interest. For example, you want to monitor 4XX error code and receive alerts based on your needs.
245
-
6. Add New alert rule per your needs, you can also choose to send notification via email, SMS and secure webhook, webhook, Function, etc. For more details, please refer to Azure Monitor Alert action groups.
268
+
2. Select the Log Analytics workspace you created:
0 commit comments