# How to get only the average system metrics from Cloudwatch to Elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-to-get-only-the-average-system-metrics-from-cloudwatch-to-elasticsearch/282488>\
**Category:** Metrics\
**Created:** [August 25, 2021, 1:02pm UTC](https://discuss.elastic.co/t/how-to-get-only-the-average-system-metrics-from-cloudwatch-to-elasticsearch/282488 "2021-08-25T13:02:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![missdoctor](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@missdoctor](https://discuss.elastic.co/u/missdoctor)\
**Post date:** [August 25, 2021, 1:02pm UTC](https://discuss.elastic.co/t/how-to-get-only-the-average-system-metrics-from-cloudwatch-to-elasticsearch/282488/1 "2021-08-25T13:02:13Z")

</div>

Current setup: Cloudwatch collecting metrics from different namespaces and the data gets ingested to Elasticsearch. With the below configuration (i.e AWS/EC2 namespace, metric name: CPUUtilization) Cloudwatch is getting and ingesting all the metrics: min, max, average..etc.

aws.yml:

```auto
- module: aws
  period: 300s
  metricsets:
    - cloudwatch
  metrics:
    - namespace: AWS/EBS
    - namespace: AWS/EC2

```

I followed the instruction [here](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-metricset-aws-cloudwatch.html) to only ingest the average CPUUtilization, after deploying the code below, elasticsearch still shows all the metrics.

Here's what i have tried:

```auto
- namespace: AWS/EC2
  name: ["CPUUtilization"]
  statistics: ["Average"]

```

and also this:

```auto
- namespace: AWS/EC2
  resource_type: ec2:instance
  name: ["CPUUtilization"]
  statistics: ["Average"]
  dimensions:
    - name: InstanceId
      value: instanceId1, instanceId2, instanceId3#also tried only one instance ID here.  

```

Also it is worth noting that we run the metricbeat node on the ECS Fargate.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 22, 2021, 1:02pm UTC](https://discuss.elastic.co/t/how-to-get-only-the-average-system-metrics-from-cloudwatch-to-elasticsearch/282488/2 "2021-09-22T13:02:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
