0

I have a Google Cloud CDN set up for a Google Cloud Storage bucket, and everything seems to be working correctly. When I check "Network services > Cloud CDN in the GCP console, I see my load balancer with the correct backend and a "Cache hit ratio". The cache hit ratio moves about quite a lot and ranges between 0 and 90%. While I understand that this will vary, I would still like to track the hit ratio.

Using Stackdriver, I can monitor the load balancer, but I can't see any metric for "hit ratio" when looking into the load balancer.

Is there a way to see a time series metric for "cache hit ratio" for a specific load balancer using Stackdriver (or any other method)?

JohnGB
  • 1,906
  • 2
  • 20
  • 31

1 Answers1

2

According to 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

I didn't find any option to display percentage of cache hit true to show in Stackdriver Monitoring. I am sharing this document which lets you combine time series based on common statistics like max, mean, std.dev etc.

Md Zubayer
  • 367
  • 1
  • 7
  • This works quite well, so I'm marking it as correct. Do you by any chance know if it's possible to display this as a ration of cache hit = true to total requests? Right now I simply display cache hit true and cache hit false information, but I can't seem to get the % of cache hit true to show. – JohnGB Jun 20 '18 at 16:20