# How to send formatted json logs to logstash?

**URL:** https://discuss.elastic.co/t/how-to-send-formatted-json-logs-to-logstash/250944
**Category:** Logstash
**Created:** [October 5, 2020, 7:55am UTC](https://discuss.elastic.co/t/how-to-send-formatted-json-logs-to-logstash/250944 "2020-10-05T07:55:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nandalapadu\_shamriya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nandalapadu_shamriya/32/74482_2.png) [@nandalapadu\_shamriya](https://discuss.elastic.co/u/nandalapadu_shamriya)
#### Post date: [October 5, 2020, 7:55am UTC](https://discuss.elastic.co/t/how-to-send-formatted-json-logs-to-logstash/250944/1 "2020-10-05T07:55:13Z")

</div>

We are printing the logs in json format in K8 kernel from where the centralized system reading though logstash Agent.  
{"app":"Svc","@timestamp":"2020-10-05T07:25:37.575Z","logger":"com.ljec.service.impl.LjecServiceImpl","level":"ERROR","class":"com.reporting.ljec.service.implLjecServiceImpl","method":"getLjecEntitiesCount","file":"LjecServiceImpl.java","line":640,"thread":"http-nio-8080-exec-1","message":"Error accessing elastic [search","dmzID":"sw.nan@XXX.com](mailto:search%22,%22dmzID%22:%22sw.nan@XXX.com)"}  
The above log coming as a message string in kibana.I want this to be consumed as JSON by logstash agent. Where can i put the json filter to read by logagent as JSON?

---

<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: [November 2, 2020, 7:55am UTC](https://discuss.elastic.co/t/how-to-send-formatted-json-logs-to-logstash/250944/2 "2020-11-02T07:55:28Z")

</div>

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