# Filebeat 6.4 not sorting the keys in ascending for json formatted log lines

**URL:** <https://discuss.elastic.co/t/filebeat-6-4-not-sorting-the-keys-in-ascending-for-json-formatted-log-lines/192701>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 29, 2019, 1:21pm UTC](https://discuss.elastic.co/t/filebeat-6-4-not-sorting-the-keys-in-ascending-for-json-formatted-log-lines/192701 "2019-07-29T13:21:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![er.navalgupta](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@er.navalgupta](https://discuss.elastic.co/u/er.navalgupta)\
**Post date:** [July 29, 2019, 1:21pm UTC](https://discuss.elastic.co/t/filebeat-6-4-not-sorting-the-keys-in-ascending-for-json-formatted-log-lines/192701/1 "2019-07-29T13:21:38Z")

</div>

we were having filebeat running on 5.6 and it was working perfectly fine reading JSON formatted logs and this 5.6 version was sorting keys in each and every log line by default.  
But 6.4 is not doing this, its not sorting the keys. What can be wrong? Do we need to make some chnages in filebeat.yml for 6.4 version?

## 5.6 version publishing log line as json line with all keys being sorted;

{"@timestamp":"2019-06-26T23:15:51.651Z","beat":{"hostname":"abc","name":"abc","version":"5.6.5"},"contextID":"sdfsffsf","directive":"NewCont","directiveExit":"","duration":1434,"eTime":"20190626T231544.364","input\_type":"log","occurrence":1,"offset":7837,"source":"/abc/xyz/d-exit.log","sTime":"20190626T231542.930","type":"dExit"}

## 6.4 version publishing json object with keys in random order:

{"@timestamp":"2019-07-15T20:51:56.995Z","@metadata":{"beat":"filebeat","type":"doc","version":"6.4.3","topic":"d-exit"},"beat":{"name":"xyz","hostname":"xyz","version":"6.4.3"},"duration":424,"contextID":"dada","type":"dExit","offset":58322,"dExit":"","directive":"GDest","sTime":"20190715T205147.834","eTime":"20190715T205148.258","occurrence":2,"source":"/abc/xyzapplogs/d-exit.log"}

---

<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 26, 2019, 1:21pm UTC](https://discuss.elastic.co/t/filebeat-6-4-not-sorting-the-keys-in-ascending-for-json-formatted-log-lines/192701/2 "2019-08-26T13:21:51Z")

</div>

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