# Separate Message into different event

**URL:** <https://discuss.elastic.co/t/separate-message-into-different-event/132015>\
**Category:** Logstash\
**Created:** [May 16, 2018, 2:30am UTC](https://discuss.elastic.co/t/separate-message-into-different-event/132015 "2018-05-16T02:30:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterch](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@peterch](https://discuss.elastic.co/u/peterch)\
**Post date:** [May 16, 2018, 2:30am UTC](https://discuss.elastic.co/t/separate-message-into-different-event/132015/1 "2018-05-16T02:30:03Z")

</div>

Dear All,

I tried to forward some log to ELK from a device. I find all event merge into one message. May I know is it possible to separate into different event? here's the log example. Thanks

\<51\>May 16 10:10:35 xp SYServer: abc,,Allowed,C:\Program Files\SY\SY\38\Bin\ccSvcHst.exe,,Begin: 2018-05-16 10:08:54,End: 2018-05-16 10:08:54,Rule: ,3780,C:\PROGRAM FILES\ENTERPRISE\BES\BES.EXE,0,,C:\Program Files\SY\SY \38\Bin\ccSvcHst.exe,User: SYSTEM,Domain: ,Action Type: 10,File size (bytes): ,Device ID:  
\<51\>May 16 10:10:35 XP SYServer: avc,,Allowed,C:\Program Files\SY\SY\38\Bin\ccSvcHst.exe,,Begin: 2018-05-16 09:45:36,End: 2018-05-16 09:45:36,Rule: ,3888,C:\PROGRAM FILES\ENTERPRISE\BES\BES.EXE,0,,C:\Program Files\SY\SY\38\Bin\ccSvcHst.exe,User: SYSTEM,Domain: ,Action Type: 10,File size (bytes): ,Device ID:

---

<div class="post-metadata">

**Author:** ![peterch](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@peterch](https://discuss.elastic.co/u/peterch)\
**Post date:** [May 16, 2018, 3:52am UTC](https://discuss.elastic.co/t/separate-message-into-different-event/132015/2 "2018-05-16T03:52:41Z")

</div>

Dear All,

I know how to solve it using codec=\> line {delimiter =\> "\<51\>"}

BTW, If I want to delimiter based on \<51\> or \<52\>, may I know how to do that.

I tried codec=\> line {delimiter =\> "\<51\>", "\<52\>"} but fail

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 16, 2018, 4:55am UTC](https://discuss.elastic.co/t/separate-message-into-different-event/132015/3 "2018-05-16T04:55:28Z")

</div>

How are you forwarding the events to Logstash? Are you sending via TCP without adding a newline after each record?

---

<div class="post-metadata">

**Author:** ![peterch](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@peterch](https://discuss.elastic.co/u/peterch)\
**Post date:** [May 16, 2018, 5:49am UTC](https://discuss.elastic.co/t/separate-message-into-different-event/132015/4 "2018-05-16T05:49:01Z")

</div>

The log is sent from a system through tcp. The system only can be configured destination ip and protocol (TCP / UDP), cannot add a new line. May I know using UDP can solve the issue?

Now I tried to use codec=\> line {delimiter =\> "\<51\>"} to separate each record and succeed. But I also want to separate each record based on "\<52\>". Can I do like this?

Thanks

---

<div class="post-metadata">

**Author:** ![peterch](https://avatars.discourse-cdn.com/v4/letter/p/e5b9ba/32.png) [@peterch](https://discuss.elastic.co/u/peterch)\
**Post date:** [May 16, 2018, 6:53am UTC](https://discuss.elastic.co/t/separate-message-into-different-event/132015/5 "2018-05-16T06:53:22Z")

</div>

I have solved the issue by changing log line separate from CR to LF .

---

<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:** [June 13, 2018, 7:02am UTC](https://discuss.elastic.co/t/separate-message-into-different-event/132015/6 "2018-06-13T07:02:59Z")

</div>

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