<?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: Help joining multi row search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-joining-multi-row-search/m-p/465479#M131147</link>
    <description>&lt;P&gt;your &lt;CODE&gt;multikv&lt;/CODE&gt; is cool. &lt;/P&gt;</description>
    <pubDate>Thu, 02 Apr 2020 07:46:19 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-04-02T07:46:19Z</dc:date>
    <item>
      <title>Help joining multi row search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-joining-multi-row-search/m-p/465476#M131144</link>
      <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;
I am new to Splunk and still learning.&lt;/P&gt;

&lt;P&gt;Can someone please help me on the below query?&lt;/P&gt;

&lt;H1&gt;My log file:&lt;/H1&gt;

&lt;P&gt;2020-03-30 12:21:45,075 INFO  com.&lt;A href="http://www.yyy.MyClass%5B"&gt;www.yyy.MyClass[&lt;/A&gt; - ] - screen changing to [Select]&lt;BR /&gt;
2020-03-30 12:25:31,574 DEBUG com.&lt;A href="http://www.yyy.Manager%5B"&gt;www.yyy.Manager[&lt;/A&gt; - ] - Service- checking&lt;BR /&gt;
2020-03-30 12:25:31,574 DEBUG com.&lt;A href="http://www.yyy.Manager%5B"&gt;www.yyy.Manager[&lt;/A&gt; - ] - Service- found&lt;BR /&gt;
2020-03-30 12:25:31,663 DEBUG  com.&lt;A href="http://www.yyy.Manager%5B"&gt;www.yyy.Manager[&lt;/A&gt; - ] - All Service took 89 milliseconds&lt;/P&gt;

&lt;H2&gt;my requirement:&lt;/H2&gt;

&lt;P&gt;I want to get the screen name and service took time.&lt;BR /&gt;
 in the above example I need like this: &lt;STRONG&gt;"Select" screen services took 89 milliseconds&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Please help me to get the query. I would really appreciate it! Thank you! &lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 16:08:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-joining-multi-row-search/m-p/465476#M131144</guid>
      <dc:creator>kimberlytrayson</dc:creator>
      <dc:date>2020-04-01T16:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help joining multi row search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-joining-multi-row-search/m-p/465477#M131145</link>
      <description>&lt;P&gt;All these logs should contain a common values to join them together. Assuming [ - ] is the common value in all these logs you can try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "\[(?&amp;lt;common_value&amp;gt;[\w\W]+)\]\s\-\sscreen\schanging\sto\s\[(?&amp;lt;service&amp;gt;\w+)\]" 
| rex "\[(?&amp;lt;common_value&amp;gt;[\w\W]+)\]\s-\sAll\sService\stook\s(?&amp;lt;duration&amp;gt;\d+\smilliseconds)" 
| stats latest(service) as service, latest(duration) as duration by common_value 
| eval output="\"".service."\" screen services took".duration." milliseconds"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="_raw
2020-03-30 12:21:45,075 INFO com.www.yyy.MyClass[ - ] - screen changing to [Select]
2020-03-30 12:25:31,574 DEBUG com.www.yyy.Manager[ - ] - Service- checking
2020-03-30 12:25:31,574 DEBUG com.www.yyy.Manager[ - ] - Service- found
2020-03-30 12:25:31,663 DEBUG com.www.yyy.Manager[ - ] - All Service took 89 milliseconds" 
| multikv forceheader=1 
| fields _raw 
| rex "\[(?&amp;lt;common_value&amp;gt;[\w\W]+)\]\s\-\sscreen\schanging\sto\s\[(?&amp;lt;service&amp;gt;\w+)\]" 
| rex "\[(?&amp;lt;common_value&amp;gt;[\w\W]+)\]\s-\sAll\sService\stook\s(?&amp;lt;duration&amp;gt;\d+\smilliseconds)" 
| stats latest(service) as service, latest(duration) as duration by common_value 
| eval output="\"".service."\" screen services took".duration." milliseconds"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Apr 2020 05:57:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-joining-multi-row-search/m-p/465477#M131145</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-04-02T05:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help joining multi row search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-joining-multi-row-search/m-p/465478#M131146</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw="test
2020-03-30 12:21:45,075 INFO com.www.yyy.MyClass[ - ] - screen changing to [Select]
2020-03-30 12:25:31,574 DEBUG com.www.yyy.Manager[ - ] - Service- checking
2020-03-30 12:25:31,574 DEBUG com.www.yyy.Manager[ - ] - Service- found
2020-03-30 12:25:31,663 DEBUG com.www.yyy.Manager[ - ] - All Service took 89 milliseconds
2020-03-30 13:21:45,075 INFO com.www.yyy.MyClass[ - ] - screen changing to [Select]
2020-03-30 13:25:31,574 DEBUG com.www.yyy.Manager[ - ] - Service- checking
2020-03-30 13:25:31,574 DEBUG com.www.yyy.Manager[ - ] - Service- found
2020-03-30 13:25:31,663 DEBUG com.www.yyy.Manager[ - ] - All Service took 89 milliseconds"
| multikv forceheader=1
| fields _raw
| streamstats current=f count(eval(searchmatch("took"))) as session
| stats values(_raw) as _raw by session
| nomv _raw
| rex "(?ms)^.*\[(?&amp;lt;screen&amp;gt;\w+)\].*took (?&amp;lt;duration&amp;gt;\d+ \w+)"
| eval result="\"".screen."\" services took ".duration
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I make session from &lt;CODE&gt;screen changing&lt;/CODE&gt; to &lt;CODE&gt;took&lt;/CODE&gt;&lt;BR /&gt;
how about this?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 07:45:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-joining-multi-row-search/m-p/465478#M131146</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-02T07:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help joining multi row search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-joining-multi-row-search/m-p/465479#M131147</link>
      <description>&lt;P&gt;your &lt;CODE&gt;multikv&lt;/CODE&gt; is cool. &lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 07:46:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-joining-multi-row-search/m-p/465479#M131147</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-02T07:46:19Z</dc:date>
    </item>
  </channel>
</rss>

