# Configuring aws ec2 on metricbeat k8 deamonset throws errors

**URL:** https://discuss.elastic.co/t/configuring-aws-ec2-on-metricbeat-k8-deamonset-throws-errors/216370
**Category:** Beats
**Tags:** metricbeat
**Created:** [January 24, 2020, 6:53am UTC](https://discuss.elastic.co/t/configuring-aws-ec2-on-metricbeat-k8-deamonset-throws-errors/216370 "2020-01-24T06:53:10Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![eyesmoker1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyesmoker1/32/54603_2.png) [@eyesmoker1](https://discuss.elastic.co/u/eyesmoker1)
#### Post date: [January 24, 2020, 6:53am UTC](https://discuss.elastic.co/t/configuring-aws-ec2-on-metricbeat-k8-deamonset-throws-errors/216370/1 "2020-01-24T06:53:10Z")

</div>

Running es 7.5 and metricbeat 7.5 helm charts on k8s. Trying to get ec2 dashboard working on kibana but metricbeat throws following errors.

Metricbeat code  
` - module: aws period: 300s metricsets: - ec2 - rds access_key_id: 'XXXXX' secret_access_key: 'XXXX' output.elasticsearch: hosts: '${XXXX:9200}'`

Metricbeat pod logs:  
`"metricset":common.MapStr{"name":"ec2", "period":300000}, "service":common.MapStr{"type":"aws"}}, Private:interface {}(nil), TimeSeries:true}, Flags:0x0} (status=400): {"type":"mapper_parsing_exception","reason":"failed to parse field [aws.tags.kubernetes] of type [keyword] in document with id 'b1okqG8B_OfmuHL1SKga'. Preview of field's value: '{io/cluster/lakeplacid-eksCluster-0a550bd=owned}'","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:365"}}`

Please help.

---

<div class="post-metadata">

### Author: ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)
#### Post date: [January 24, 2020, 9:48pm UTC](https://discuss.elastic.co/t/configuring-aws-ec2-on-metricbeat-k8-deamonset-throws-errors/216370/2 "2020-01-24T21:48:43Z")

</div>

Hi @eyesmoker, thanks for posting your question here. This issue is caused by label/annotation dots ( `.` ) creating hierarchy in Elasticsearch documents. Let me create a github issue to fix this. Thank you!

---

<div class="post-metadata">

### Author: ![eyesmoker1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyesmoker1/32/54603_2.png) [@eyesmoker1](https://discuss.elastic.co/u/eyesmoker1)
#### Post date: [January 24, 2020, 11:13pm UTC](https://discuss.elastic.co/t/configuring-aws-ec2-on-metricbeat-k8-deamonset-throws-errors/216370/3 "2020-01-24T23:13:17Z")

</div>

Thank you very much. Is there a workaround for this? Is this happening only in 7.5.0 and do you recommend 7.5.1?  
Please point me to the GitHub issue.  
This is an important feature requirement for us to see ec2 observability.

---

<div class="post-metadata">

### Author: ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)
#### Post date: [January 25, 2020, 12:06am UTC](https://discuss.elastic.co/t/configuring-aws-ec2-on-metricbeat-k8-deamonset-throws-errors/216370/4 "2020-01-25T00:06:32Z")

</div>

Here is the ticket: [https://github.com/elastic/beats/issues/15843](https://github.com/elastic/beats/issues/15843)  
Unfortunately I don't see a workaround besides not using dot in kubernetes labels. Or if you don't mind collecting metrics without the label, you can use cloudwatch metricset with config:

```auto
- module: aws
  period: 5m
  metricsets:
    - cloudwatch
  metrics:
    - namespace: AWS/EC2

```

I do have a PR in review already to add dedot for tags: [https://github.com/elastic/beats/pull/15844](https://github.com/elastic/beats/pull/15844)

---

<div class="post-metadata">

### Author: ![eyesmoker1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyesmoker1/32/54603_2.png) [@eyesmoker1](https://discuss.elastic.co/u/eyesmoker1)
#### Post date: [February 5, 2020, 5:40am UTC](https://discuss.elastic.co/t/configuring-aws-ec2-on-metricbeat-k8-deamonset-throws-errors/216370/5 "2020-02-05T05:40:49Z")

</div>

Thank you. Will this be part of next release?

---

<div class="post-metadata">

### Author: ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)
#### Post date: [February 5, 2020, 2:03pm UTC](https://discuss.elastic.co/t/configuring-aws-ec2-on-metricbeat-k8-deamonset-throws-errors/216370/6 "2020-02-05T14:03:59Z")

</div>

Yes! This fix will be in 7.6.0 release. Thanks!

---

<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: [March 4, 2020, 2:04pm UTC](https://discuss.elastic.co/t/configuring-aws-ec2-on-metricbeat-k8-deamonset-throws-errors/216370/7 "2020-03-04T14:04:01Z")

</div>

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