<?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: Combine stats across multiline events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Combine-stats-across-multiline-events/m-p/174446#M50059</link>
    <description>&lt;P&gt;Thank you, Martin!  mvexpand is magical.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Mar 2014 18:57:41 GMT</pubDate>
    <dc:creator>hulahoop</dc:creator>
    <dc:date>2014-03-05T18:57:41Z</dc:date>
    <item>
      <title>Combine stats across multiline events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combine-stats-across-multiline-events/m-p/174444#M50057</link>
      <description>&lt;P&gt;How can I get stats by author if I have multiline events like the below?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Project: /a/b/c
  loc=100 author=aaa@foo.com
  loc=100 author=bbb@foo.com
  loc=100 author=ccc@foo.com

Project: /a/b/c
  loc=200 author=aaa@foo.com
  loc=200 author=ccc@foo.com
  loc=200 author=ddd@foo.com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Given the 2 events above, am looking for a results table like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Project   Author         Total Lines of Code (loc)
-------------------------------------------------
/a/b/c    aaa@foo.com    300
          bbb@foo.com    100 
          ccc@foo.com    300
          ddd@foo.com    200
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Mar 2014 08:18:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combine-stats-across-multiline-events/m-p/174444#M50057</guid>
      <dc:creator>hulahoop</dc:creator>
      <dc:date>2014-03-05T08:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Combine stats across multiline events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combine-stats-across-multiline-events/m-p/174445#M50058</link>
      <description>&lt;P&gt;You could do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "Project:\s+(?&amp;lt;project&amp;gt;\S+)" | rex max_match=0 "(?&amp;lt;loc_author&amp;gt;loc=\d+\s+author=\S+)" | mvexpand loc_author | rex field=loc_author "loc=(?&amp;lt;loc&amp;gt;\d+)\s+author=(?&amp;lt;author&amp;gt;\S+)" | stats sum(loc) by project author
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Make sure that doesn't clash with a potentially auto-extracted first set of loc/author fields.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 08:33:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combine-stats-across-multiline-events/m-p/174445#M50058</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-05T08:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Combine stats across multiline events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combine-stats-across-multiline-events/m-p/174446#M50059</link>
      <description>&lt;P&gt;Thank you, Martin!  mvexpand is magical.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 18:57:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combine-stats-across-multiline-events/m-p/174446#M50059</guid>
      <dc:creator>hulahoop</dc:creator>
      <dc:date>2014-03-05T18:57:41Z</dc:date>
    </item>
  </channel>
</rss>

