1

I'm using the following monitoring query to get the current maximum vCPUs utilization (how many are used).

fetch consumer_quota
| metric 'serviceruntime.googleapis.com/quota/allocation/usage'
| filter
(resource.service == 'compute.googleapis.com') &&
(metric.quota_metric == 'compute.googleapis.com/cpus') 
|group_by 60s, [value_usage : max(value.usage)]

It only returns a number when I increase the time value (from 60s to 24000s), and the result is not accurate.  What should I change in the query in order to get the current usage of vCPUs? i.e- right now all my instances are using 392 vCPUs. Thanks!

Wojtek_B
  • 4,245
  • 1
  • 7
  • 21
  • I was trying to find a suitable metric for that but I was getting wrong numbers. Maybe you can try something like `compute.googleapis.com/instance/cpu/reserved_cores` ? – Wojtek_B Apr 13 '22 at 16:45

0 Answers0