# Filebeat 7.2 shipping to elastic cloud .yml - Error Decoding Json logs

**URL:** https://discuss.elastic.co/t/filebeat-7-2-shipping-to-elastic-cloud-yml-error-decoding-json-logs/189533
**Category:** Beats
**Tags:** filebeat
**Created:** [July 9, 2019, 11:30am UTC](https://discuss.elastic.co/t/filebeat-7-2-shipping-to-elastic-cloud-yml-error-decoding-json-logs/189533 "2019-07-09T11:30:23Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![fadil030889](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@fadil030889](https://discuss.elastic.co/u/fadil030889)
#### Post date: [July 9, 2019, 11:30am UTC](https://discuss.elastic.co/t/filebeat-7-2-shipping-to-elastic-cloud-yml-error-decoding-json-logs/189533/1 "2019-07-09T11:30:23Z")

</div>

Hi, we have moved to elastic from our on prem 6.2 version elk cluster. We are currently having some problems into decoding json docker logs and renaming indices. My filebeat.yml test file is as follows:

filebeat.inputs:

- type: log  
paths:  
'/var/lib/docker/containers/_/_.log'  
document\_type: docker  
json.message\_key: log  
json.add\_error\_key: false  
encoding: utf-8

processors:

- add\_docker\_metadata: ~

json.ignore\_decoding\_error: true

cloud.id: XXXXX  
cloud.auth: XXXXX  
index: gamegateway1

before we were going though logstash and renaming the indices were quite easy and flexible. Had to include json.ignore\_decoding\_error: true to cut off those decoding error messages. Can someone please advise?

Thanks

---

<div class="post-metadata">

### Author: ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)
#### Post date: [July 10, 2019, 1:17pm UTC](https://discuss.elastic.co/t/filebeat-7-2-shipping-to-elastic-cloud-yml-error-decoding-json-logs/189533/2 "2019-07-10T13:17:55Z")

</div>

Please format logs and configs using the `</>` button.

There should be no decoding error if the log is using JSON. Have you checked the log files with decoding errors, if they are JSON for real? Do these have very very long lines by any chance?

You'd need to add the `json.ignore_decoding_error: true` to the input configuration block. It has no effect at the place you put it in.

Have you tried the `docker` input?

---

<div class="post-metadata">

### Author: ![fadil030889](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@fadil030889](https://discuss.elastic.co/u/fadil030889)
#### Post date: [July 12, 2019, 6:31am UTC](https://discuss.elastic.co/t/filebeat-7-2-shipping-to-elastic-cloud-yml-error-decoding-json-logs/189533/3 "2019-07-12T06:31:36Z")

</div>

Doing some testings with json only log files and it works, i believe the error was due to other formats of logs, however, still cannot change the index names, its always sending data to filebeat-7.2. Any suggestions?

---

<div class="post-metadata">

### Author: ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)
#### Post date: [July 12, 2019, 1:30pm UTC](https://discuss.elastic.co/t/filebeat-7-2-shipping-to-elastic-cloud-yml-error-decoding-json-logs/189533/4 "2019-07-12T13:30:14Z")

</div>

This is the write alias. Filebeat uses it because you have ILM enabled.

---

<div class="post-metadata">

### Author: ![fadil030889](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@fadil030889](https://discuss.elastic.co/u/fadil030889)
#### Post date: [July 16, 2019, 8:10am UTC](https://discuss.elastic.co/t/filebeat-7-2-shipping-to-elastic-cloud-yml-error-decoding-json-logs/189533/5 "2019-07-16T08:10:44Z")

</div>

Yep managed to fix that. 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: [August 13, 2019, 8:23am UTC](https://discuss.elastic.co/t/filebeat-7-2-shipping-to-elastic-cloud-yml-error-decoding-json-logs/189533/6 "2019-08-13T08:23:55Z")

</div>

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