<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Merge Events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710597#M240003</link>
    <description>&lt;P&gt;This can be achieved using props.conf.&amp;nbsp; Try these settings to start with&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[mysourcetype]
```The "Great Eight" settings```
SHOULD_LINEMERGE = false
```Break lines only between a line ending and a date (year)```
LINE_BREAKER = ([\r\n]+)\d{4}
TIME_PREFIX = ^
TIME_FORMAT = %Y-%m-%d %H:%M:%S.%4N
MAX_TIMESTAMP_LOOKAHEAD = 30
TRUNCATE = 10000
```Two settings for UFs```
EVENT_BREAKER_ENABLE = true
EVENT_BREAKER = ([\r\n]+)\d{4}&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 04 Feb 2025 15:31:35 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2025-02-04T15:31:35Z</dc:date>
    <item>
      <title>Merge Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710568#M239994</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Some of my events doesn't have an timestamp and its has been written as multiple line items in the log.&lt;BR /&gt;&lt;BR /&gt;I want to merge the&amp;nbsp;multiple line items into previous line item&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Below are the examples, i want to merge the line items which doesn't have a timestamp, need to add it with previous line&amp;nbsp;&lt;/P&gt;&lt;P&gt;2024-05-24 14:11:51.7212|INFO|Services.Voice.VoiceManager|Wake word detected. hey_mentor&lt;BR /&gt;2024-05-24 14:11:51.7212|INFO|Services.Sound.SoundManager|Playing Sound.VoiceStart_TEMP&lt;BR /&gt;2024-05-24 14:11:53.9271|INFO|Services.Voice.VoiceManager|Received command&lt;BR /&gt;Spoken text: hey mentor turn off L E D&lt;BR /&gt;Intent Name: ChangeImageTransformOnOff&lt;BR /&gt;Intent Value: turn { OnOff off } { ImageTransformsOnOff L E D }&lt;BR /&gt;Slot 1: OnOff=off&lt;BR /&gt;Slot 2: ImageTransformsOnOff=L E D&lt;BR /&gt;2024-05-24 14:11:53.9271|INFO|NotificationService|Notify: [Illumination set to Off]&lt;BR /&gt;2024-05-24 14:11:59.5010|INFO|Services.Voice.VoiceManager|Wake word detected. hey_mentor&lt;BR /&gt;2024-05-24 14:11:59.5010|INFO|Services.Sound.SoundManager|Playing Sound.VoiceStart_TEMP&lt;BR /&gt;2024-05-24 14:12:01.8935|INFO|Services.Voice.VoiceManager|Received command&lt;BR /&gt;Spoken text: hey mentor turn on L E D&lt;BR /&gt;Intent Name: ChangeImageTransformOnOff&lt;BR /&gt;Intent Value: turn { OnOff on } { ImageTransformsOnOff L E D }&lt;BR /&gt;Slot 1: OnOff=on&lt;BR /&gt;Slot 2: ImageTransformsOnOff=L E D&lt;BR /&gt;2024-05-24 14:12:01.8935|INFO|NotificationService|Notify: [Illumination set to On]&lt;BR /&gt;2024-05-24 14:12:01.8935|INFO|Services.Sound.SoundManager|Playing Sound.VoiceStop_TEMP&lt;BR /&gt;2024-05-24 14:12:06.7081|INFO|Controls.Live.LiveModel|IsReady=True, Pause &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;-------&lt;/P&gt;&lt;P&gt;Could any please help me how to write a query to achieve this.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 10:34:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710568#M239994</guid>
      <dc:creator>ckarthikin</dc:creator>
      <dc:date>2025-02-04T10:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710570#M239995</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/266377"&gt;@ckarthikin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;where do your logs come from? which technology?&lt;/P&gt;&lt;P&gt;did you used a standard add-on or not?&lt;/P&gt;&lt;P&gt;it seems to be a parsing error.&lt;/P&gt;&lt;P&gt;youshould try adding to your sourcetype SHOULD_LINEMERGE = True, in this way you configure a multiline sourcetype.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 11:41:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710570#M239995</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-02-04T11:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710571#M239996</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Giuseppe,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for the response. Its coming from one of our device and these logs has been already uploaded to splunk and indexed already . now i want to write SPL query to merge the line items&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 12:01:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710571#M239996</guid>
      <dc:creator>ckarthikin</dc:creator>
      <dc:date>2025-02-04T12:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710572#M239997</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Giuseppe,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for the response. Its coming from one of our device and these logs has been already uploaded to splunk and indexed already . now i want to write SPL query to merge the line items&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 12:02:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710572#M239997</guid>
      <dc:creator>ckarthikin</dc:creator>
      <dc:date>2025-02-04T12:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710576#M239998</link>
      <description>&lt;P&gt;The events will have a value for _time. If you sort by this, are these events in the order you showed?&lt;/P&gt;&lt;P&gt;Your events which do have timestamps in the event seem to have the same timestamp for the events either side of the events without timestamps. Is this always the case?&lt;/P&gt;&lt;P&gt;For the events without timestamps, is each line in a different event of multiple events?&lt;/P&gt;&lt;P&gt;Please provide more detail so we can see what needs to be done and work out a solution for you.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 13:30:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710576#M239998</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-02-04T13:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710582#M240001</link>
      <description>&lt;P&gt;Hi, Thanks for the response.&lt;/P&gt;&lt;P&gt;we don't have _time but we have Time column (Indexed time - it will be same for all events so we cant use Time column). My expectation is without timestamp events need to be merged with previous events using any logic&amp;nbsp; need not save results and it will be used for some calculation and then it will be saved in saved search)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ckarthikin_0-1738678410620.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/34359iC0071A0BC7B038B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ckarthikin_0-1738678410620.png" alt="ckarthikin_0-1738678410620.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ckarthikin_1-1738678497422.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/34360i9CF0068E2D7CA6C4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ckarthikin_1-1738678497422.png" alt="ckarthikin_1-1738678497422.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Yes always this is the case for all logs, so i need to write a query to transform this, Please help on this&amp;nbsp; and share your comments&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 14:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710582#M240001</guid>
      <dc:creator>ckarthikin</dc:creator>
      <dc:date>2025-02-04T14:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710597#M240003</link>
      <description>&lt;P&gt;This can be achieved using props.conf.&amp;nbsp; Try these settings to start with&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[mysourcetype]
```The "Great Eight" settings```
SHOULD_LINEMERGE = false
```Break lines only between a line ending and a date (year)```
LINE_BREAKER = ([\r\n]+)\d{4}
TIME_PREFIX = ^
TIME_FORMAT = %Y-%m-%d %H:%M:%S.%4N
MAX_TIMESTAMP_LOOKAHEAD = 30
TRUNCATE = 10000
```Two settings for UFs```
EVENT_BREAKER_ENABLE = true
EVENT_BREAKER = ([\r\n]+)\d{4}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 04 Feb 2025 15:31:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710597#M240003</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2025-02-04T15:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710614#M240006</link>
      <description>&lt;P&gt;Assuming your events follow the pattern shown, you could try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "[^\|]+\|(?&amp;lt;time&amp;gt;\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{4})\|"
| streamstats count(time) as eventnumber
| stats values(time) as time list(_raw) as event by eventnumber
| eval _time=strptime(time,"%F %T.%4N")&lt;/LI-CODE&gt;&lt;P&gt;This will also reset the _time timestamp to the same as found in the event data&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 16:35:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710614#M240006</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-02-04T16:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710617#M240007</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/266377"&gt;@ckarthikin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;sorry but the issue is at ingestion level: you have to assign a correctly defined sourcetype (standard or custom) to your data, then you can search your data correctly parsed and aggregated.&lt;/P&gt;&lt;P&gt;so the questions are the ones before:&lt;/P&gt;&lt;P&gt;which technology?&lt;/P&gt;&lt;P&gt;which add-on used for parsing?&lt;/P&gt;&lt;P&gt;if none, you have to create a correct sourcetype and apply it to your data source.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 17:18:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Merge-Events/m-p/710617#M240007</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-02-04T17:18:15Z</dc:date>
    </item>
  </channel>
</rss>

