Skip to content
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]: Not able to fetch metrics when tagging enabled. #574

Closed
shubhadaR opened this issue Sep 5, 2023 · 5 comments
Closed

[bug]: Not able to fetch metrics when tagging enabled. #574

shubhadaR opened this issue Sep 5, 2023 · 5 comments
Labels

Comments

@shubhadaR
Copy link

shubhadaR commented Sep 5, 2023

we tried to use AWS tag select feature However we only got aws_resource_info with tags but not aws resource metric.

config.yaml

region: ap-south-1
delay_seconds: 10
use_get_metric_data: false
metrics:
- aws_namespace: AWS/ELB
   use_get_metric_data: false
   aws_metric_name: RequestCount
   aws_dimensions: [AvailabilityZone, LoadBalancerName]
   aws_tag_select:
     tag_selections:
       Monitoring: ["enabled"]
     resource_type_selection: "elasticloadbalancing:loadbalancer"
     resource_id_dimension: LoadBalancerName
   aws_statistics: [Sum]
- aws_namespace: AWS/ELB
   use_get_metric_data: false
   aws_metric_name: RequestCount
   aws_dimensions: [AvailabilityZone, LoadBalancerName]
   aws_statistics: [Sum]
@shubhadaR shubhadaR added the bug label Sep 5, 2023
@klubi
Copy link

klubi commented Sep 5, 2023

I believe I'm seeing similar issue with apigateway.

config:

metrics:
  - aws_namespace: AWS/ApiGateway
    aws_metric_name: 5XX
    aws_statistics: [Sum]
    aws_dimensions: [ApiId]
    aws_tag_select:
      tag_selections:
        Product: ["ABC"]
      resource_type_selection: "apigateway:apis"
      resource_id_dimension: ApiId

Then only aws_resource_info metric is returned. But that metric seems to have incorrect api_id label.
Because it does not have only api gateway Id as value, but also apis prefix:

aws_resource_info{job="aws_apigateway",instance="",arn="arn:aws:apigateway:us-east-1::/apis/XXX",api_id="apis/XXX",tag_Product="ABC"} 1.0

@JesusFrontelo
Copy link

@shubhadaR take a look here.

@matthiasr
Copy link
Contributor

Interesting, so we've started getting prefixes in the ID dimension during tag selection, but the would need to strip them out when fetching the metrics?

@matthiasr
Copy link
Contributor

matthiasr commented Mar 3, 2024

#571 has an explanation how to work around this. #648 is also related to the tag format issues, although I don't fully understand whether it will address the need for the workaround.

@JesusFrontelo
Copy link

@matthiasr i think this issue can be closed, because seems to be a configuration understanding.

@matthiasr matthiasr closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants