<?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: How to merge 2 messages into 1 message? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-2-messages-into-1-message/m-p/227421#M67165</link>
    <description>&lt;P&gt;No, there are none!  I was thinking it might be -- take if the first row contains "TestingData" (else first row is set to "NA") and then merge with the next row if it contains "TestingCompleted" (else if second row is missing then set to "NA"), so it would be more like a row count type of thing instead of anything solid like an id field ... but I'm not sure if that's the best way.  &lt;/P&gt;

&lt;P&gt;And I'm not sure how to accomplish the above either, so any help is appreciated.   Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 02 Mar 2016 21:33:52 GMT</pubDate>
    <dc:creator>ceng</dc:creator>
    <dc:date>2016-03-02T21:33:52Z</dc:date>
    <item>
      <title>How to merge 2 messages into 1 message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-2-messages-into-1-message/m-p/227419#M67163</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Is there a way to merge 2 messages into 1 message?  For example I have a sequence of messages:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TestingData numTests=3
TestingCompleted start=10:00am end=3:00pm
TestingData numTest=2
TestingCompleted start=11:00am end=1:00pm
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like this to look like below where 1+2 are merged and 3+4 are merged. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TestingData numTests=3  start=10:00am end=3:00pm
TestingData numTest=2 start=11:00am end=1:00pm
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If either a TestingData or TestingCompleted row was missing then NA for that element of the merged row.  So, if row 1 was missing then we would have below.  The msg sequence order is fairly guaranteed.   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;NA  start=10:00am end=3:00pm
TestingData numTest=2 start=11:00am end=1:00pm
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks! &lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 21:14:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-2-messages-into-1-message/m-p/227419#M67163</guid>
      <dc:creator>ceng</dc:creator>
      <dc:date>2016-03-02T21:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge 2 messages into 1 message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-2-messages-into-1-message/m-p/227420#M67164</link>
      <description>&lt;P&gt;Do your events have any common fields based which they can be merged??&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 21:27:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-2-messages-into-1-message/m-p/227420#M67164</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-02T21:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge 2 messages into 1 message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-2-messages-into-1-message/m-p/227421#M67165</link>
      <description>&lt;P&gt;No, there are none!  I was thinking it might be -- take if the first row contains "TestingData" (else first row is set to "NA") and then merge with the next row if it contains "TestingCompleted" (else if second row is missing then set to "NA"), so it would be more like a row count type of thing instead of anything solid like an id field ... but I'm not sure if that's the best way.  &lt;/P&gt;

&lt;P&gt;And I'm not sure how to accomplish the above either, so any help is appreciated.   Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 21:33:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-2-messages-into-1-message/m-p/227421#M67165</guid>
      <dc:creator>ceng</dc:creator>
      <dc:date>2016-03-02T21:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge 2 messages into 1 message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-2-messages-into-1-message/m-p/227422#M67166</link>
      <description>&lt;P&gt;It would be much easier if you were repeating the numTest on each line (to use a common grouping value)&lt;/P&gt;

&lt;P&gt;You can try to regroup with a transaction at search time.&lt;BR /&gt;
see &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/SearchReference/Transaction"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/SearchReference/Transaction&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;look at the "startswith" and "endswith" options.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 21:40:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-2-messages-into-1-message/m-p/227422#M67166</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2016-03-02T21:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge 2 messages into 1 message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-2-messages-into-1-message/m-p/227423#M67167</link>
      <description>&lt;P&gt;It works with this, thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 22:15:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-2-messages-into-1-message/m-p/227423#M67167</guid>
      <dc:creator>ceng</dc:creator>
      <dc:date>2016-03-02T22:15:17Z</dc:date>
    </item>
  </channel>
</rss>

