# I'm unable to create fields and unable to parse the below logs with split filter please suggest me the correct logstash input

**URL:** <https://discuss.elastic.co/t/im-unable-to-create-fields-and-unable-to-parse-the-below-logs-with-split-filter-please-suggest-me-the-correct-logstash-input/294682>\
**Category:** Logstash\
**Created:** [January 18, 2022, 10:45am UTC](https://discuss.elastic.co/t/im-unable-to-create-fields-and-unable-to-parse-the-below-logs-with-split-filter-please-suggest-me-the-correct-logstash-input/294682 "2022-01-18T10:45:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aravindpatel](https://avatars.discourse-cdn.com/v4/letter/a/3ab097/32.png) [@aravindpatel](https://discuss.elastic.co/u/aravindpatel)\
**Post date:** [January 18, 2022, 10:45am UTC](https://discuss.elastic.co/t/im-unable-to-create-fields-and-unable-to-parse-the-below-logs-with-split-filter-please-suggest-me-the-correct-logstash-input/294682/1 "2022-01-18T10:45:29Z")

</div>

log file  
{  
"id": "AAA",  
"num": "-17.3595",  
"num": "-145.494",  
"name": "Anaa",  
"author": "Anaaauthor",  
"place": "Tuamotu-Gambier",  
"landmark": "French Polynesia",  
"spcid": "12512819",  
"target": "Pacific/Midway",  
"mob": "",  
"type": "plats",  
"email": "",  
"url": "",  
"length": "4646",  
"emev": "7",  
"isma": "NTGA",  
"move": "2",  
},  
{  
"id": "AAA",  
"num": "-17.3595",  
"num": "-145.494",  
"name": "Anaa",  
"author": "Anaaauthor",  
"place": "Tuamotu-Gambier",  
"landmark": "French Polynesia",  
"spcid": "12512819",  
"target": "Pacific/Midway",  
"mob": "",  
"type": "plats",  
"email": "",  
"url": "",  
"length": "4646",  
"emev": "7",  
"isma": "NTGA",  
"move": "2",  
},  
{  
"id": "AAA",  
"num": "-17.3595",  
"num": "-145.494",  
"name": "Anaa",  
"author": "Anaaauthor",  
"place": "Tuamotu-Gambier",  
"landmark": "French Polynesia",  
"spcid": "12512819",  
"target": "Pacific/Midway",  
"mob": "",  
"type": "plats",  
"email": "",  
"url": "",  
"length": "4646",  
"emev": "7",  
"isma": "NTGA",  
"move": "2",  
},  
.... and more

filebeat input

type: log  
processors:  
- add\_tags:  
tags: [jsonLogs]  
- decode\_json\_fields:  
fields: ["message"]  
target: "data"  
enabled: true # Change to true to enable this input configuration.  
paths:  
- C:\elk\jenkins\Json\* # Paths that should be crawled and fetched. Glob based paths.  
multiline.type: pattern  
multiline.pattern: '^{'  
multiline.negate: true  
multiline.match: after  
multiline.max\_lines: 1000000

logstash input

input {  
beats {  
port =\> 5044  
codec =\> "json"  
}  
}

filter {  
if "jsonLogs" in [tags] {

```
json {
	source => "message"
}

```

split {  
field =\> "message"  
}   
output {

```
	elasticsearch {
		hosts => ["localhost:9200"]
		index => "jsonlog"
	}

stdout { codec => rubydebug }
```

---

<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:** [February 15, 2022, 10:46am UTC](https://discuss.elastic.co/t/im-unable-to-create-fields-and-unable-to-parse-the-below-logs-with-split-filter-please-suggest-me-the-correct-logstash-input/294682/2 "2022-02-15T10:46:17Z")

</div>

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