跟踪 Google 云 CDN 缓存命中率

Tracking Google Cloud CDN cache hit rate

我为 Google 云存储桶设置了 Google 云 CDN,一切似乎都正常工作。当我检查 "Network services > Cloud CDN in the GCP console, I see my load balancer with the correct backend and a " 缓存命中率时”。缓存命中率变化很大,范围在 0 到 90% 之间。虽然我知道这会有所不同,但我仍然想跟踪命中率。

使用 Stackdriver,我可以监控负载均衡器,但在查看负载均衡器时我看不到 "hit ratio" 的任何指标。

有没有办法使用 Stackdriver(或任何其他方法)查看特定负载均衡器 "cache hit ratio" 的时间序列指标?

根据this document Cache Hit get logged using the field "httpRequest.cacheHit=true". You can create a Log-based Metric to use the logs in Stackdriver Monitoring

我没有找到任何选项来显示在 Stackdriver Monitoring 中显示的缓存命中百分比。我正在分享 this document,它可以让您根据最大值、平均值、std.dev 等常见统计数据组合时间序列