GCP Ops agent metrics not working #9280
Unanswered
zahidadeel-zazmic
asked this question in
GCP
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I am trying to use the following policy with a GCP project to discover the percent usage of disks using ops agent metrics
agent.googleapis.com/disk/percent_used
. When I execute the following policy, it doesn't show me anything except an empty list.The same metrics work fine for me in
Metrics Explorer
on GCP.As per my observation, the
metric-key
value is not correct. I just started exploring Cloud Custodian, so I am not quite sure about the usage ofmetric-key
.I looked into
c7n_gcp.client.ServiceClient.execute_query
code. For the mentioned policy, I observed that the constructed request URL looks like below:If I debug and remove the metric-key based filter from the request URL, it can fetch the metric results and the modified request URL looks like below.
Does it mean, the written metrics are fine but the
metric-key
is not correct?I wonder why this
metric-key
is required and how to use it properly.any help would be much appreciated.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions