-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find metric(s) that match type = "alloydb.googleapis.com/instance/cpu/maximum_utilization #4960
Comments
small update the dimension name does not use a metric label but rather a resource label. Therefore we have: [root@sglcl0027 ~]# /usr/lib/centreon/plugins/centreon_gcp_management_stackdriver_api.pl --plugin=cloud::google::gcp::management::stackdriver::plugin --mode=get-metrics --key-file=/opt/centreon/plugins/gcp/test.json --dimension-name='resource.labels.cluster_id' --dimension-operator=equals --dimension-value=cavltg0ew12s00 --metric='instance/cpu/maximum_utilization' --api='alloydb.googleapis.com' --warning-metric='90' --critical-metric='95' --verbose --proxyurl= Use of uninitialized value in string eq at /usr/lib/centreon/plugins/centreon_gcp_management_stackdriver_api.pl line 8947. however now we have an uninitialized value error. |
The api call works in postman so it seems the centreon plugin is not correctly forming the api call. curl --location --request GET 'https://monitoring.googleapis.com/v3/projects/projectname/timeSeries?aggregation.alignmentPeriod=60s&interval.endTime=2024-03-25T15:10:00Z&interval.startTime=2024-03-25T15:00:00Z&filter=metric.type%20=%20%22alloydb.googleapis.com/instance/cpu/maximum_utilization%22%20AND%20resource.labels.cluster_id%20=%20%22cavltg0ew12s00%22' |
Hello :) From what I understand, even if the API allows access to the |
Hello we are trying to access the following alloydb metric on the gcp api however it doesn't seem to find the metric where the dimension name has a specific cluster_id(instance name). Is the alloydb api working?
/usr/lib/centreon/plugins/centreon_gcp_management_stackdriver_api.pl --plugin=cloud::google::gcp::management::stackdriver::plugin --mode=get-metrics --key-file=test.json --instance-key='Instance/instance/cpu/maximum_utilization' --dimension-name='metric.labels.cluster_id' --dimension-operator=equals --dimension-value='cavltg0ew12s00' --metric='instance/cpu/maximum_utilization' --api='alloydb.googleapis.com' --warning-metric='90' --critical-metric='95' --verbose --proxyurl=
http://10.244.5.20:9090
--http-backend='curl' --zeroed --insecure --debug
Cannot find metric(s) that match type = "alloydb.googleapis.com/instance/cpu/maximum_utilization" label = cluster_id. If a metric was created recently, it could take up to 10 minutes to become available. Please try again soon.
As far as we can see from the GCP documentation there is an extra "Instance" in the api, not sure if this is to be added in instance-key:
![image](https://private-user-images.githubusercontent.com/4235359/315977240-56936961-b608-43a2-9806-00dc37eb8115.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI4MTU5NzIsIm5iZiI6MTcyMjgxNTY3MiwicGF0aCI6Ii80MjM1MzU5LzMxNTk3NzI0MC01NjkzNjk2MS1iNjA4LTQzYTItOTgwNi0wMGRjMzdlYjgxMTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgwNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MDRUMjM1NDMyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjcxZTc5YjVhZmVlOTMzY2Y0ZjRmNjJlODM4NmE2MTI0Yzc3M2YxODVhNTE4YzMwYWUwN2IwZjM3Y2MwYWY2MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.knD7ex7QtRSPQIiwZn30Zj-91_4-ryrZV_Tm2QpFI_A)
we have tried different combinations to no avial, can anyone point me in the right direction.
Thanks.
The text was updated successfully, but these errors were encountered: