Reputation: 2026
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)?
Upvotes: 0
Views: 2129
Reputation: 377
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.
Upvotes: 2