-
Notifications
You must be signed in to change notification settings - Fork 326
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
[bug]: Failed to scrape ApiGateWay metrics with tags #704
Comments
Unfortunately I cannot test this myself. The most likely culprit is that the exporter makes a mistake when extracting the resource dimension ( It is not entirely clear to me how the API Gateway ARNs map to the CloudWatch dimensions; the documentation on this mentions that
It may be that this whole approach fails because the ApiName doesn't appear anywhere in the ARN except for this special case 😞 Can you share what the format of the ARN (as per the tagging API) and the ApiName are? |
The format ARN is the following (as returned from tagging API): arn="arn:aws:apigateway:us-east-1::/restapis/",api_name="restapis/. The part is just a unique id, not the API name. Is there any workaround to be able to scrape this? I'm wondering why scraping without the tags works, while using tags does not. |
Scraping without tags directly fetches the metrics from CloudWatch, it is agnostic to the structure of the dimensions there. CloudWatch does not know the labels of the underlying resource, so when you ask for tags, the exporter first needs to ask the tag manager for any resources that match the tags, map the ARN to a CloudWatch dimension, and finally request metrics filtered by that dimension. |
What did you do
Getting ApiGateWay metrics using tags failed
What did you expect to see?
Expected to see the metrics exported
Are you currently working around this issue?
Scraping the metrics without tags works.
Looking directly at the metrics exported on /metrics, i can see the tagged apigateway is found:
Right now fetching the data without tags, for all apigateways in the region.
We have many other resources in AWS being pulled with this exact same configuration.
Environment
EKS cluster
Exporter version:
image: quay.io/prometheus/cloudwatch-exporter
tag: v0.15.4
Job
Not working configuration
Working configuration without tags
Working configuration for different resource
Also, tried
resource_type_selection: "apigateway:"
, didn't work as well..Logs
Log shows unconsumed content
/metrics ouput from the exporter
The text was updated successfully, but these errors were encountered: