Multiple dimensions not able to display under AWS/EC2 namespace
Hi Team,
Multiple dimensions not able to display under AWS/EC2 namespace. Below parameters are not working... Please find the code i'm using on it. Please help me on the same to sort our issue. Thanks..
- aws_dimensions: [InstanceType, InstanceId ]
aws_metric_name: EBSWriteBytes
aws_namespace: AWS/EC2
aws_statistics:
- Average
We able to get only these metrics
# TYPE aws_ec2_ebswrite_bytes_average gauge
aws_ec2_ebswrite_bytes_average{job="aws_ec2",instance="",instance_type="r5d.xlarge",} 276992.0 1646919780000
Can anyone help me on this issue. Thanks.
I have the same issue, did you manage to figure it out?
@ravik1176 the issue is a little incomplete. Is what you shared the complete configuration or just a part of it? Please try to update to the latest version of the tool, it might emit helpful logs: https://github.com/prometheus/cloudwatch_exporter/pull/436
Any updates on this issue?
I would like to dig into this deeper, since it seems to be a recurring issue.
What results are you getting? What results do you expect? What differences are there between the instances that show up and those that don't? In particular, are they on Basic or Detailed monitoring?
I've been playing around with aws cloudwatch get-metric-statistics --namespace AWS/EC2 --metric-name EBSWriteBytes --dimensions Name=InstanceId,Value=$instanceId, what results do you get when you plug in an instance that you do or don't get in metrics? One thing I noticed is that (with an instance on basic monitoring), I get data points every 5 minutes even if I plug in a period of 60 seconds (which is the exporter default). I wonder if this confuses the exporter. I am also getting weirdly different alignment depending on the period in the request. If I specify a period of 60, I get samples aligned on 5-minute-boundaries, but if I specify a period of 300, I don't 😕
collapsed because it's long
❯ aws cloudwatch get-metric-data --cli-input-json "$(cat <<EOF
{
"MetricDataQueries": [
{
"Id": "ebs",
"MetricStat": {
"Metric": {
"Namespace": "AWS/EC2",
"MetricName": "EBSWriteBytes",
"Dimensions": [
{
"Name": "InstanceId",
"Value": "$instanceId"
}
]
},
"Period": 60,
"Stat": "Sum",
"Unit": "Bytes"
},
"ReturnData": true
}
],
"StartTime": "2023-09-25T16:13:00Z",
"EndTime": "2023-09-25T16:23:00Z"
}
EOF
)"
{
"MetricDataResults": [
{
"Id": "ebs",
"Label": "EBSWriteBytes",
"Timestamps": [
"2023-09-25T16:20:00+00:00",
"2023-09-25T16:15:00+00:00"
],
"Values": [
1171161088.0,
2212270080.0
],
"StatusCode": "Complete"
}
],
"Messages": []
}
❯ aws cloudwatch get-metric-data --cli-input-json "$(cat <<EOF
{
"MetricDataQueries": [
{
"Id": "ebs",
"MetricStat": {
"Metric": {
"Namespace": "AWS/EC2",
"MetricName": "EBSWriteBytes",
"Dimensions": [
{
"Name": "InstanceId",
"Value": "$instanceId"
}
]
},
"Period": 300,
"Stat": "Sum",
"Unit": "Bytes"
},
"ReturnData": true
}
],
"StartTime": "2023-09-25T16:13:00Z",
"EndTime": "2023-09-25T16:23:00Z"
}
EOF
)"
{
"MetricDataResults": [
{
"Id": "ebs",
"Label": "EBSWriteBytes",
"Timestamps": [
"2023-09-25T16:18:00+00:00",
"2023-09-25T16:13:00+00:00"
],
"Values": [
1171161088.0,
2212270080.0
],
"StatusCode": "Complete"
}
],
"Messages": []
}