<?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 How to merge messages into a single event using one timestamp and remove the other timestamps? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-merge-messages-into-a-single-event-using-one-timestamp/m-p/231922#M45186</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;Relative newbie here. I have a host that is splitting large messages into multiple syslog messages. The beginning of the message contains two timestamps, but the trailing messages only contain one. The messages arrive like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;May  5 08:12:16 myhost.company.com 05/05/16 08:12:16.392 [part1]
May  5 08:12:16 myhost.company.com [part2]
May  5 08:12:16 myhost.company.com [part3]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Miraculously, I somehow managed to get the messages combined into a single by editing the props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;NO_BINARY_CHECK = true
MAX_EVENTS=50000
SHOULD_LINEMERGE = false
MAX_TIMESTAMP_LOOKAHEAD = 25
TIME_PREFIX = ^
TRUNCATE = 0
LINE_BREAKER = ([\r\n]+)\w+\s+\d+\s+\d+:\d+:\d+\s+\w+\.\w+\.\w+\.\w+\s\d+\/\d+\/\d+\s+\d+:\d+:\d+\.\d+
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And this seems to work fine, but what I noticed is that the timestamps from the two trailing messages are also included in the combined event, kind of like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;May  5 08:12:16 myhost.company.com 05/05/16 08:12:16.392 [part1]May  5 08:12:16 myhost.company.com [part2]May  5 08:12:16 myhost.company.com [part3]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there a way to break the events based on the second timestamp in the first message, but strip out the timestamps from the following two messages?&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2016 13:35:22 GMT</pubDate>
    <dc:creator>_smp_</dc:creator>
    <dc:date>2016-05-05T13:35:22Z</dc:date>
    <item>
      <title>How to merge messages into a single event using one timestamp and remove the other timestamps?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-merge-messages-into-a-single-event-using-one-timestamp/m-p/231922#M45186</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;Relative newbie here. I have a host that is splitting large messages into multiple syslog messages. The beginning of the message contains two timestamps, but the trailing messages only contain one. The messages arrive like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;May  5 08:12:16 myhost.company.com 05/05/16 08:12:16.392 [part1]
May  5 08:12:16 myhost.company.com [part2]
May  5 08:12:16 myhost.company.com [part3]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Miraculously, I somehow managed to get the messages combined into a single by editing the props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;NO_BINARY_CHECK = true
MAX_EVENTS=50000
SHOULD_LINEMERGE = false
MAX_TIMESTAMP_LOOKAHEAD = 25
TIME_PREFIX = ^
TRUNCATE = 0
LINE_BREAKER = ([\r\n]+)\w+\s+\d+\s+\d+:\d+:\d+\s+\w+\.\w+\.\w+\.\w+\s\d+\/\d+\/\d+\s+\d+:\d+:\d+\.\d+
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And this seems to work fine, but what I noticed is that the timestamps from the two trailing messages are also included in the combined event, kind of like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;May  5 08:12:16 myhost.company.com 05/05/16 08:12:16.392 [part1]May  5 08:12:16 myhost.company.com [part2]May  5 08:12:16 myhost.company.com [part3]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there a way to break the events based on the second timestamp in the first message, but strip out the timestamps from the following two messages?&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 13:35:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-merge-messages-into-a-single-event-using-one-timestamp/m-p/231922#M45186</guid>
      <dc:creator>_smp_</dc:creator>
      <dc:date>2016-05-05T13:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge messages into a single event using one timestamp and remove the other timestamps?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-merge-messages-into-a-single-event-using-one-timestamp/m-p/231923#M45187</link>
      <description>&lt;P&gt;You should be able to use this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-strip_last_two_timestamps = s/\s+\d+\/\d+\/\d+\s+\d+:\d+:\d+\.\d+//g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Put this on your indexers and restart Splunk and it should strip them out.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 16:50:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-merge-messages-into-a-single-event-using-one-timestamp/m-p/231923#M45187</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-05T16:50:04Z</dc:date>
    </item>
  </channel>
</rss>

