<?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: multi pattern string calculation on fields and count the fields value too in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/multi-pattern-string-calculation-on-fields-and-count-the-fields/m-p/148773#M41585</link>
    <description>&lt;P&gt;I think you want to use &lt;STRONG&gt;extract(kv)&lt;/STRONG&gt;. This should give you fields for any dynamic range of files in the counts field&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| rex "Counts=\[(?&amp;lt;Counts&amp;gt;[^\]]+)\]" | field _time Counts|extract pairdelim=","  kvdelim="=" | fields _time 100* | stats count(*) as * by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 30 Jul 2015 23:09:31 GMT</pubDate>
    <dc:creator>bmacias84</dc:creator>
    <dc:date>2015-07-30T23:09:31Z</dc:date>
    <item>
      <title>multi pattern string calculation on fields and count the fields value too</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multi-pattern-string-calculation-on-fields-and-count-the-fields/m-p/148772#M41584</link>
      <description>&lt;P&gt;I have log coming in this format. this value is dynamic and keep changing in terms of Form and numbers&lt;BR /&gt;
Counts=[100A=10,100B=1,100C=2,100D=1,100E=3,100A=20,100B=1,100C=2,100D=1,100E=3]&lt;/P&gt;

&lt;P&gt;I want to calculate &lt;BR /&gt;
100A=30&lt;BR /&gt;
100B=2&lt;BR /&gt;
100C=4&lt;BR /&gt;
100D=2&lt;BR /&gt;
100E=6&lt;/P&gt;

&lt;P&gt;I have ask similar question where I have different requirements &lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/185780/multi-pattern-string-calculation-on-fields.html"&gt;http://answers.splunk.com/answers/185780/multi-pattern-string-calculation-on-fields.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 22:21:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multi-pattern-string-calculation-on-fields-and-count-the-fields/m-p/148772#M41584</guid>
      <dc:creator>sumitnagal</dc:creator>
      <dc:date>2015-07-30T22:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: multi pattern string calculation on fields and count the fields value too</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multi-pattern-string-calculation-on-fields-and-count-the-fields/m-p/148773#M41585</link>
      <description>&lt;P&gt;I think you want to use &lt;STRONG&gt;extract(kv)&lt;/STRONG&gt;. This should give you fields for any dynamic range of files in the counts field&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| rex "Counts=\[(?&amp;lt;Counts&amp;gt;[^\]]+)\]" | field _time Counts|extract pairdelim=","  kvdelim="=" | fields _time 100* | stats count(*) as * by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Jul 2015 23:09:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multi-pattern-string-calculation-on-fields-and-count-the-fields/m-p/148773#M41585</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2015-07-30T23:09:31Z</dc:date>
    </item>
  </channel>
</rss>

