# I want to send json formated logs via filebeat to elasticsearch

**URL:** https://discuss.elastic.co/t/i-want-to-send-json-formated-logs-via-filebeat-to-elasticsearch/249069
**Category:** Beats
**Tags:** filebeat
**Created:** [September 18, 2020, 7:53am UTC](https://discuss.elastic.co/t/i-want-to-send-json-formated-logs-via-filebeat-to-elasticsearch/249069 "2020-09-18T07:53:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![aakash41](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@aakash41](https://discuss.elastic.co/u/aakash41)
#### Post date: [September 18, 2020, 7:53am UTC](https://discuss.elastic.co/t/i-want-to-send-json-formated-logs-via-filebeat-to-elasticsearch/249069/1 "2020-09-18T07:53:12Z")

</div>

Can someone please let me know, if below config is correct. The content of logs in JSON but extension is .log.

- type: log  
paths:
  - /opt/Application.log  
json.keys\_under\_root: true  
json.add\_error\_key: true

Below is the example of log's content

{"@timestamp":"2020-09-17T16:54:47.752+05:30","@version":"1","message":"Dwr classpath scanning detected candidate DTO [com.prospecta.mdo2.hib.hibMODEL.mdoSourcing.RfxHeaderModel] processed by converter type [bean]","logger\_name":"org.directwebremoting.spring.DwrClassPathBeanDefinitionScanner","thread\_name":"ServerService Thread Pool -- 93","level":"INFO","level\_value":20000}  
{"@timestamp":"2020-09-17T16:54:47.758+05:30","@version":"1","message":"Dwr classpath scanning detected candidate DTO [com.prospecta.mdo2.hib.hibMODEL.mdoSourcing.RfxInvitiesModel$QuoteAnalysisStatus] processed by converter type [bean]","logger\_name":"org.directwebremoting.spring.DwrClassPathBeanDefinitionScanner","thread\_name":"ServerService Thread Pool -- 93","level":"INFO","level\_value":20000}  
{"@timestamp":"2020-09-17T16:54:47.761+05:30","@version":"1","message":"Dwr classpath scanning detected candidate DTO [com.prospecta.mdo2.hib.hibMODEL.mdoSourcing.RfxInvitiesModel$RfxInvitiesStatus] processed by converter type [bean]","logger\_name":"org.directwebremoting.spring.DwrClassPathBeanDefinitionScanner","thread\_name":"ServerService Thread Pool -- 93","level":"INFO","level\_value":20000}

---

<div class="post-metadata">

### Author: ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)
#### Post date: [September 18, 2020, 9:43am UTC](https://discuss.elastic.co/t/i-want-to-send-json-formated-logs-via-filebeat-to-elasticsearch/249069/2 "2020-09-18T09:43:33Z")

</div>

Could you please format the post using `code tags`? It would be much easier to go through it.

---

<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: [October 16, 2020, 11:43am UTC](https://discuss.elastic.co/t/i-want-to-send-json-formated-logs-via-filebeat-to-elasticsearch/249069/3 "2020-10-16T11:43:33Z")

</div>

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