Adds instance_id label to the three cloudcost_aws_ec2_instance... cost metrics. The intent is to be able to join the cost metrics with aws_ec2_info to be able to extract labels such as team and environments. An example query would be:
sum by (tag_team) (
cloudcost_aws_ec2_instance_total_usd_per_hour
+ on(instance_id) group_right(tag_team)
(
label_replace(aws_ec2_info{}, "instance_id", "$1", "name", ".+/(.+)")
)
)
Adds
instance_id
label to the threecloudcost_aws_ec2_instance...
cost metrics. The intent is to be able to join the cost metrics withaws_ec2_info
to be able to extract labels such as team and environments. An example query would be: