Open lukayeh opened 3 months ago
The "usual suspect" when aws_tag_select
doesn't work is a mismatch between the ARN format (which the exporter gets back when asking for tags) and the resource ID dimension. According to this page, the broker ARN ends in broker:MyBroker:b-1234a5b6-78cd-901e-2fgh-3i45j6k178l9
while the exporter, by default, looks for anything after the last :
. I am guessing that in this case, the Broker
dimension would be MyBroker
, so maybe try something like arn_resource_id_regexp: 'broker:([^:]*):[^:]*$'
?
Using arn_resource_id_regexp: 'broker:([^:]*):[^:]*$'
doesn't seem to work...
The brokers have a -1
or -2
suffix because they're active/standby instances so the resource name in the ARN doesn't quite match the Broker
dimension in Cloudwatch. AWS Docs for reference
An example is an ARN like:
broker:test-broker:b-1234a5b6-78cd-901e-2fgh-3i45j6k178l9
and this is both instances of the broker represented in Cloudwatch:
aws cloudwatch list-metrics --namespace AWS/AmazonMQ --metric-name NetworkIn
{
"Metrics": [
{
"Namespace": "AWS/AmazonMQ",
"MetricName": "NetworkIn",
"Dimensions": [
{
"Name": "Broker",
"Value": "test-broker-1"
}
]
},
{
"Namespace": "AWS/AmazonMQ",
"MetricName": "NetworkIn",
"Dimensions": [
{
"Name": "Broker",
"Value": "test-broker-2"
}
]
}
]
}
Any thoughts on how to work around the suffixes?
Context information
When running Cloudwatch exporter with
aws_tag_select
enabled for services like RDS and Elasticache I get metrics returned, however when doing the same for MSK and MQ it does not return any metrics.We know this works
This does not:
This also does not work ❌:
For Kafka I've tried this but this also refuses to retrieve metrics:
Exporter logs
```log WARNING: (listDimensions) ignoring metric AWS/AmazonMQ:MessageCount due to dimensions mismatch ``` ### What do you expect to happen? Metrics return when using `aws_tag_select` ### What happened instead? No metrics are returned due to `dimensions mismatch`