<?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: Search on this Key Value pair to display PricingInfo / PricingCount in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178131#M51226</link>
    <description>&lt;P&gt;You may get the needed information with something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats count by PricingInfo
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 17 Mar 2015 23:59:15 GMT</pubDate>
    <dc:creator>bjoernjensen</dc:creator>
    <dc:date>2015-03-17T23:59:15Z</dc:date>
    <item>
      <title>Search on this Key Value pair to display PricingInfo / PricingCount</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178128#M51223</link>
      <description>&lt;P&gt;How can i search on this Key Value pair to display PricingInfo / PriceCount&lt;/P&gt;

&lt;P&gt;An example log entry may look like the below.&lt;BR /&gt;&lt;BR /&gt;
1001=25, 1011=10&lt;/P&gt;

&lt;P&gt;Made up of these values:&lt;/P&gt;

&lt;P&gt;PricingInfo             PricingCount &lt;BR /&gt;
0000                    Contains an int from 0-99&lt;BR /&gt;
0001                    Contains an int from 0-99&lt;BR /&gt;
0010                Contains an int from 0-99&lt;BR /&gt;
0011                Contains an int from 0-99&lt;BR /&gt;
0100                Contains an int from 0-99&lt;BR /&gt;
0101                Contains an int from 0-99&lt;BR /&gt;
0110                Contains an int from 0-99&lt;BR /&gt;
0111                Contains an int from 0-99&lt;BR /&gt;
1000                Contains an int from 0-99&lt;BR /&gt;
1001                Contains an int from 0-99&lt;BR /&gt;
1010                Contains an int from 0-99&lt;BR /&gt;
1011                Contains an int from 0-99&lt;BR /&gt;
1100                Contains an int from 0-99&lt;BR /&gt;
1101                Contains an int from 0-99&lt;BR /&gt;
1110                Contains an int from 0-99&lt;BR /&gt;
1111                Contains an int from 0-99&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2015 10:23:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178128#M51223</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2015-03-17T10:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Search on this Key Value pair to display PricingInfo / PricingCount</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178129#M51224</link>
      <description>&lt;P&gt;give more detail&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2015 10:50:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178129#M51224</guid>
      <dc:creator>tachifelix</dc:creator>
      <dc:date>2015-03-17T10:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Search on this Key Value pair to display PricingInfo / PricingCount</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178130#M51225</link>
      <description>&lt;P&gt;I have some Splunk logging that has a field (key) that represents a bitmask, and a value.  There's a fixed number of bitmask combinations as listed in the PricingInfo column above.    I need to do some counting of the values and have been unable to do so with the way the field is constructed.  We would need to add a field to represent the bitmask values, and a field for the count such as above.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2015 13:06:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178130#M51225</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2015-03-17T13:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Search on this Key Value pair to display PricingInfo / PricingCount</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178131#M51226</link>
      <description>&lt;P&gt;You may get the needed information with something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats count by PricingInfo
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Mar 2015 23:59:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178131#M51226</guid>
      <dc:creator>bjoernjensen</dc:creator>
      <dc:date>2015-03-17T23:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Search on this Key Value pair to display PricingInfo / PricingCount</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178132#M51227</link>
      <description>&lt;P&gt;But it just looks like this in Splunk 1100=4:&lt;/P&gt;

&lt;P&gt;Timestamp=2015-03-18 07:07:31, Level=INFO, EventId=16007, ReqID=bcacbafd-bddb-49d4-8d36-a7445daf0fc6, 1100=4 &lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2015 14:15:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178132#M51227</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2015-03-18T14:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Search on this Key Value pair to display PricingInfo / PricingCount</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178133#M51228</link>
      <description>&lt;P&gt;I think search time field extraction will help you:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Managesearch-timefieldextractions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Managesearch-timefieldextractions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Two approaches:&lt;/P&gt;

&lt;H1&gt;1&lt;/H1&gt;

&lt;P&gt;first extract &lt;STRONG&gt;two&lt;/STRONG&gt; fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "(?&amp;lt;PricingInfo&amp;gt;[0-1]{4})=(?&amp;lt;PricingCount&amp;gt;\d{0,1})" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After this you can search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | PricingInfo="1100" PricingCount="4" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;H1&gt;2&lt;/H1&gt;

&lt;P&gt;extract &lt;STRONG&gt;one&lt;/STRONG&gt; field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "(?&amp;lt;PricingField&amp;gt;[0-1]{4}=\d{0,1})" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After this you can search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | PricingField="1100=4" | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Mar 2015 16:19:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178133#M51228</guid>
      <dc:creator>bjoernjensen</dc:creator>
      <dc:date>2015-03-18T16:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Search on this Key Value pair to display PricingInfo / PricingCount</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178134#M51229</link>
      <description>&lt;P&gt;Great thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2015 14:48:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-on-this-Key-Value-pair-to-display-PricingInfo/m-p/178134#M51229</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2015-03-19T14:48:03Z</dc:date>
    </item>
  </channel>
</rss>

