Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ce1a322

Browse files
committedSep 24, 2020
first draft complete of article
1 parent 628cd04 commit ce1a322

File tree

12 files changed

+54
-18
lines changed

12 files changed

+54
-18
lines changed
 

‎articles/cdn/enable-raw-logs.md

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ ms.author: allensu
1616
With Azure CDN from Microsoft, you can monitor resources in the following ways to help you troubleshoot, track, and debug issues.
1717

1818
* 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.
2222

2323
> [!IMPORTANT]
2424
> The HTTP raw logs feature is available for Azure CDN from Microsoft.
@@ -202,18 +202,22 @@ AzureDiagnostics
202202
203203

204204
## 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.
206206

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).
208212

209213
**Metrics supported by Azure CDN from Microsoft**
210214

211215
| Metrics | Description | Dimension |
212216
|-----------------|------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|
213217
| 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. |
217221

218222
***Bytes Hit Ration = (egress from edge - egress from origin)/egress from edge**
219223

@@ -225,27 +229,59 @@ Scenarios excluded in bytes hit ratio calculation:
225229
### Metrics configuration
226230

227231
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+
229237
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+
230241
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+
231245
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+
232249
6. Select **New chart** to add a new chart:
233250

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).
236262

237263
### 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.
239267

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:
246269

270+
:::image type="content" source="./media/cdn-raw-logs/raw-logs-09.png" alt-text="Configure log analytics workspace" border="true":::
247271

272+
3. Select **Logs** under **General** in the log analytics workspace. Then select **Get Started**:
273+
274+
:::image type="content" source="./media/cdn-raw-logs/raw-logs-10.png" alt-text="Configure log analytics workspace" border="true":::
248275

276+
4. Select **CDN Profiles**. Select an example query to RUN or close the example screen to enter a custom query:
277+
278+
:::image type="content" source="./media/cdn-raw-logs/raw-logs-11.png" alt-text="Example query screen" border="true":::
279+
280+
:::image type="content" source="./media/cdn-raw-logs/raw-logs-12.png" alt-text="Query execution" border="true":::
281+
282+
4. To view data by chart, select **Chart**. Select **Pin to dashboard** to pin the chart to the Azure dashboard:
283+
284+
:::image type="content" source="./media/cdn-raw-logs/raw-logs-13.png" alt-text="Pin chart to dashboard" border="true":::
249285

250286
## Next Steps
251287
In this article, you enabled HTTP raw logs for the Microsoft CDN service.
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)