Monitoring

With Azure cdn from Microsoft, you can monitor resources in the following ways to help you troubleshoot, track, and debug issues.

  • 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.
  • 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.
  • Alert, which allows customer to set up alert for key metrics
  • 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.

Sign in to Azure

Configuration – Azure portal

To configure Raw logs for your Azure CDN from Microsoft profile:

Configuration – Azure PowerShell

Retention data is defined by the -RetentionInDays option in the command.

Raw logs properties

Azure CDN from Microsoft Service currently provides Raw logs. Raw logs provide individual API requests with each entry having the following schema:

The raw log property isSentToOriginShield has been deprecated and replaced by a new field isReceivedFromClient. Use the new field if you’re already using the deprecated field.

Raw logs include logs generated from both CDN edge (child POP) and origin shield. Origin shield refers to parent nodes that are strategically located across the globe. These nodes communicate with origin servers and reduce the traffic load on origin.

For every request that goes to origin shield, there are 2-log entries:

  • One for edge nodes
  • One for origin shield.

To differentiate the egress or responses from the edge nodes vs. origin shield, you can use the field isReceivedFromClient to get the correct data.

If the value is false, then it means the request is responded from origin shield to edge nodes. This approach is effective to compare raw logs with billing data. Charges aren’t incurred for egress from origin shield to the edge nodes. Charges are incurred for egress from the edge nodes to clients.

Kusto query sample to exclude logs generated on origin shield in Log Analytics.

AzureDiagnostics | where OperationName == "Microsoft.Cdn/Profiles/AccessLog/Write" and Category == "AzureCdnAccessLog" | where isReceivedFromClient == true 

Metrics

Azure CDN from Microsoft is integrated with Azure Monitor and publishes four CDN metrics to help track, troubleshoot, and debug issues.

The Metrics are displayed in charts and accessible via PowerShell, CLI, and API. The CDN metrics are free of charge.

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.

Metrics supported by Azure CDN from Microsoft

*Bytes Hit Ration = (egress from edge – egress from origin)/egress from edge

Scenarios excluded in bytes hit ratio calculation:

  • You explicitly configure no cache either through Rules Engine or Query String caching behavior.
  • You explicitly configure cache-control directive with no-store or private cache.

You can setup alerts on Microsoft CDN by selecting Monitoring >> Alerts.

Select New alert rule for metrics listed in Metrics section:

Alert will be charged based on Azure Monitor. For more information about alerts, see Azure Monitor alerts.

You can enable additional metrics using Azure Log Analytics and raw logs for an additional cost.

Next Steps

In this article, you enabled HTTP raw logs for the Microsoft CDN service.

For more information on Azure CDN and the other Azure services mentioned in this article, see:

原文链接:https://docs.microsoft.com/en-us/azure/cdn/monitoring-and-access-log

原创文章,作者:优速盾-小U,如若转载,请注明出处:https://www.cdnb.net/bbs/archives/210

(0)
上一篇 2022年8月2日
下一篇 2022年8月2日

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

优速盾注册领取大礼包www.cdnb.net
/sitemap.xml