Closed zmoog closed 1 year ago
Install the AWS CloudWatch integration and enable the "Collect metrics from CloudWatch" integration:
Quick run with the default configuration to make sure authentication is set up correctly and we're getting data:
The next step is to visit CloudWatch on the AWS console and check Metrics > All Metrics section to check which metrics have values:
AWS has a nice page about Metrics collected by Container Insights that covers both ECS and EKS. For ECS, we can use the Amazon ECS Container Insights metrics page.
With this information, I would start changing the default configuration file and replace EC2 metrics with some ECS/Container Insights metrics:
- namespace: ECS/ContainerInsights
resource_type: ecs
name:
- CpuUtilized
- CpuReserved
statistic:
- Average
- Maximum
# dimensions:
# - name: InstanceId
# value: i-123456
# tags:
# - key: created-by
# value: foo
With this config, I can get some basic metrics that include the aws.dimensions.TaskDefinitionFamily
dimension:
Remember to reload the Discover page if it was already open before Elasticsearch created the data stream; otherwise, it will not have the new fields definition available.
The basic ECS metrics do not have information about ECS tasks. Let's try with the ECS/ContainerInsights metrics.