cloudwatch_exporter
cloudwatch_exporter copied to clipboard
Unable to use aws_tag_select for Autoscaling group
Hello,
I am trying to use aws_tag_select to select few asg's I have tried the below config
- aws_namespace: AWS/AutoScaling
aws_metric_name: GroupDesiredCapacity
aws_dimensions: [ AutoScalingGroupName ]
aws_statistics: [ Maximum ]
aws_tag_select:
tag_selections:
Name: ["xxxxxxx"]
resource_type_selection: "autoscaling:autoScalingGroup"
resource_id_dimension: AutoScalingGroupName
I have replaced resource_type_selection with the below values and none of them worked for me
autoScaling:autoScalingGroup
autoScaling:autoScalingGroupName
autoScalingGroup:autoScalingGroupName
autoscaling:autoScalingGroup
autoscaling:autoScalingGroupName
Can you provide me some info , how to fetch the information?
Regards Ashish
Unfortunately I am as lost as you are on this. From the service:resourceType
format, based on the ARN format for autoscaling, I would expect autoscaling:autoScalingGroup
to work, but apparently it does not.
This StackOverflow answer suggests that the resource groups tagging API does not support autoscaling, but this page lists it.
Maybe the problem is with something else? In the examples, the statistic is Average
and not all metrics support all statistics.
@ashishvaishno Have you tried putting everything lowercase in the resource type section? something like: autoscaling:autoscalinggroupname
I managed to make it work like this:
aws_tag_select:
resource_type_selection: "autoscaling"
resource_id_dimension: AutoScalingGroupName
hope it helps
Awesome, thank you!
no results with
region: us-east-1
metrics:
- aws_dimensions:
- AutoScalingGroupName
aws_metric_name: GroupDesiredCapacity
aws_namespace: AWS/AutoScaling
aws_statistics:
- Average
aws_tag_select:
tag_selections:
Name: ["myasgname"]
resource_type_selection: "autoscaling"
resource_id_dimension: AutoScalingGroupName
ideas? Thanks
Do you have a tag called Name
? Some AWS objects (like EC2 instances) handle names that way, but it seems like ASGs have the name as a first-class parameter (as evidenced by the resource_id_dimension
). What does
aws autoscaling describe-tags --filters 'Name=key,Values=Name'
give?
Should you be using aws_dimension_select
instead, like
aws_dimension_select:
AutoScalingGroupName: [myasgname]
similar to the load balancer example?