<?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: Summing multiple matches with rex command in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Summing-multiple-matches-with-rex-command/m-p/549191#M8997</link>
    <description>&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="RandomStuff|LoginCount=5|RandomStuff|LoginCount=3|More RandomStuff|LoginCount=4|YetMoreRandomStuff
RandomStuff|LoginCount=6|RandomStuff|LoginCount=7|More RandomStuff|LoginCount=3|YetMoreRandomStuff"
| multikv noheader=t
| fields _*



| rex max_match=0 "LoginCount=(?&amp;lt;logincount&amp;gt;\d+)"
| streamstats count as row
| eventstats sum(logincount) as logincount by row
| fields - row&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 23 Apr 2021 20:57:19 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-04-23T20:57:19Z</dc:date>
    <item>
      <title>Summing multiple matches with rex command</title>
      <link>https://community.splunk.com/t5/Reporting/Summing-multiple-matches-with-rex-command/m-p/549187#M8995</link>
      <description>&lt;P&gt;I have a pattern of text that appears in a log statement multiple times.&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RandomStuff|LoginCount=5|RandomStuff|LoginCount=3|More RandomStuff|LoginCount=4|YetMoreRandomStuff&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I use the rex command to get a sum of all the LoginCount values (which would total 12 in this example)?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 20:43:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Summing-multiple-matches-with-rex-command/m-p/549187#M8995</guid>
      <dc:creator>jbrenner</dc:creator>
      <dc:date>2021-04-23T20:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Summing multiple matches with rex command</title>
      <link>https://community.splunk.com/t5/Reporting/Summing-multiple-matches-with-rex-command/m-p/549189#M8996</link>
      <description>&lt;P&gt;I forgot to mention that I don't know how many times LoginCount will appear in any particular log statement. The number of instances will vary.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 20:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Summing-multiple-matches-with-rex-command/m-p/549189#M8996</guid>
      <dc:creator>jbrenner</dc:creator>
      <dc:date>2021-04-23T20:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Summing multiple matches with rex command</title>
      <link>https://community.splunk.com/t5/Reporting/Summing-multiple-matches-with-rex-command/m-p/549191#M8997</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="RandomStuff|LoginCount=5|RandomStuff|LoginCount=3|More RandomStuff|LoginCount=4|YetMoreRandomStuff
RandomStuff|LoginCount=6|RandomStuff|LoginCount=7|More RandomStuff|LoginCount=3|YetMoreRandomStuff"
| multikv noheader=t
| fields _*



| rex max_match=0 "LoginCount=(?&amp;lt;logincount&amp;gt;\d+)"
| streamstats count as row
| eventstats sum(logincount) as logincount by row
| fields - row&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 23 Apr 2021 20:57:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Summing-multiple-matches-with-rex-command/m-p/549191#M8997</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-04-23T20:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Summing multiple matches with rex command</title>
      <link>https://community.splunk.com/t5/Reporting/Summing-multiple-matches-with-rex-command/m-p/549867#M9034</link>
      <description>&lt;P&gt;Thank you! This is exactly what I needed!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 15:12:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Summing-multiple-matches-with-rex-command/m-p/549867#M9034</guid>
      <dc:creator>jbrenner</dc:creator>
      <dc:date>2021-04-29T15:12:04Z</dc:date>
    </item>
  </channel>
</rss>

