# How to create a logstash pipeline to create json type log

**URL:** https://discuss.elastic.co/t/how-to-create-a-logstash-pipeline-to-create-json-type-log/198527
**Category:** Logstash
**Created:** [September 7, 2019, 9:59pm UTC](https://discuss.elastic.co/t/how-to-create-a-logstash-pipeline-to-create-json-type-log/198527 "2019-09-07T21:59:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Fosiul\_Alam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fosiul_alam/32/43335_2.png) [@Fosiul\_Alam](https://discuss.elastic.co/u/Fosiul_Alam)
#### Post date: [September 7, 2019, 9:59pm UTC](https://discuss.elastic.co/t/how-to-create-a-logstash-pipeline-to-create-json-type-log/198527/1 "2019-09-07T21:59:15Z")

</div>

Hi,  
i been told that, by using logstash pipeline i can re-create a log format(i.e JSON) when entering into elasticsearch. but not understanding how to do it .  
i.e the original log file is like this

"message": "21:33:42,004 DEBUG [LOG] (default-threads - 100) (1.2.3.4)(410)\>[TIMESTAMP:Sat Sep 07 21:33:42 UTC 2019],[TEST:123456],[CMD:INFO],[STATUS:true],[INFO:true],[SIGNAL:false],[ABC:0],[DEF:0],[GHK:1111],[SERIAL:0006]"

but when entering into Elastic search i want to have it like JSON format

"message": {  
"TIMESTAMP": "Sat Sep 07 21:33:42 UTC 2019",  
"TEST": "123456",  
"CMD":INFO,  
"STATUS":true,  
"INFO":true,  
"SIGNAL":false,  
"ABC":0,  
"DEF":0,  
"GHK":0,  
"GHK":1111  
}

Can this be done ? if yes how ?  
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: [October 5, 2019, 9:59pm UTC](https://discuss.elastic.co/t/how-to-create-a-logstash-pipeline-to-create-json-type-log/198527/2 "2019-10-05T21:59:18Z")

</div>

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