<?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: How to parse a raw msg using rex then get the stats count by that field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434222#M167047</link>
    <description>&lt;P&gt;@493669 &lt;BR /&gt;
I think one of the issue is our Prod defaulting the view to "List" view instead of raw view.  This is one of the reason that I might not getting the actual hit or  stats based on the query we both have.&lt;/P&gt;

&lt;P&gt;Any idea on how I can indicate that I should be in "raw" result mode?&lt;/P&gt;

&lt;P&gt;Below is a sample list view as default mode coming up to our prod splunk - picture that value with processingStatus field.&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/storage/temp/256156-json.jpg"&gt;https://answers.splunk.com/storage/temp/256156-json.jpg&lt;/A&gt; &lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5954iE33DE8AA93687085/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Oct 2018 17:16:49 GMT</pubDate>
    <dc:creator>elheffe</dc:creator>
    <dc:date>2018-10-19T17:16:49Z</dc:date>
    <item>
      <title>How to parse a raw msg using rex then get the stats count by that field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434218#M167043</link>
      <description>&lt;P&gt;I've read a few posts here already but hoping to clarify some items that I have. I need regex (rex) a raw or list msg then perform a "stats count by field" on that field found. &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;When i login to splunk the view is defaulted to "&lt;STRONG&gt;List&lt;/STRONG&gt;" results vs &lt;STRONG&gt;Raw&lt;/STRONG&gt; results.  Is this the default in spunk-cloud?  Not that it matters to me but probably it matters when I create my Search in my Dashboard?&lt;/LI&gt;
&lt;LI&gt;When I try to perform rex, I can't get the exact field that I need to do a stats count by that field and value that I need&lt;/LI&gt;
&lt;LI&gt;The field that I need is "processingStatus”:”BIDDING_STARTED” then do stats count on this key, value.  I think the List vs Raw view is throwing off the way rex is used?  Any other recommendations?&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Do I need to set something to stick to a certain view?&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;LIST VIEW:&lt;/STRONG&gt; (with escape characters)&lt;BR /&gt;
\"processingStatus\":\"BIDDING_STARTED\"&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;RAW VIEW:&lt;/STRONG&gt;&lt;BR /&gt;
msg: 2018-10-11 15:32:07.973 INFO 14 --- [aaa-8080-exec-6] a.b.c.shoppingCartController : Response = [{"resourceId”:”f133b31e0-1234-1234-1234-rt1204bf8122”,”customerId":4194562,"consumerKey":"f133b31e0-1234-1234-1234-rt1204bf8122","externalId":"SHOEX:201810090738498037101234: 201810090738498037101234","shoes":{"relativeId":"f133b31e0-1234-1234-1234-rt1204bf8122","externalId":"SHOEX:521900”,”name":"VaporFly","gender":"MALE","year":1,"birthDate":{"year”:2018,”month”:9,”day":1},"classification":{"model":"Runnning","brand":"NIKE","environment":"Road"},"classifications":{"model":"Runnning","brand":"NIKE","environment":"Road"}},"person":{"relativeId":"5e3b69e5-8586-4bbf-99fd-a42f38609c0b","externalId":"SHOEX:568156","name":{"first":"Kipchoge","last":"Eliud"},"postalAddresses":[{"parentResourceId":"5e3b69e5-8586-4bbf-99fd-a42f38609c0b","streetAddress":["123 INTERNATIONA PKWY"],"city":"New York","state":{"name":"New York","code”:”NY”},”postalCode”:”12345”,”country":{"name":"UNITED STATES","iso2code":"US","iso3code":"USA","system":"&lt;A href="http://abc-open.org/iso/3166/%22%7D%7D%5D,%22electronicAddresses%22:%5B%7B%22parentResourceId%22:%22f133b31e0-1234-1234-1234-rt1204bf8122%22,%22address%22:%22Kipchoge1@gmail.com%22%7D%5D,%22phoneNumbers%22:%5B%7B%22parentResourceId%22:%22f133b31e0-1234-1234-1234-rt1204bf8122%22,%22countryCallingCode%22:%221%22,%22number%E2%80%9D:%E2%80%9D1232131234%E2%80%9D,%E2%80%9Dextension%22:%22%22,%22capabilities%22:%7B%22fax%22:false,%22voice%22:true,%22text%22:false%7D%7D%5D%7D,%22practitioner%22:%7B%22relativeId%22:%22f133b31e0-1234-1234-1234-rt1204bf8122%22,%22externalId%22:%22SHOEX:1%22,%22name%22:%7B%22first%E2%80%9D:%E2%80%9DPATRICK%E2%80%9D,%E2%80%9Dlast%E2%80%9D:%E2%80%9DEVANS%E2%80%9D%7D,%E2%80%9DclinicName%22:%22SHOEX%22,%22phoneNumbers%22:%5B%7B%22countryCallingCode%22:%221%22,%22number%E2%80%9D:%E2%80%9D1231231234%E2%80%9D,%E2%80%9Dextension%22:%22%22,%22capabilities%22:%7B%22fax%22:false,%22voice%22:true,%22text%22:false%7D%7D%5D%7D,%22shopping%22:%7B%22relativeId%22:%22f133b31e0-1234-1234-1234-rt1204bf8122%22,%22shippingMethod%22:%22STANDARD%22%7D,%22prescription%22:%7B%22relativeId%22:%22f133b31e0-1234-1234-1234-rt1204bf8122%22,%22product%E2%80%9D:%7B%E2%80%9Caac%E2%80%9D:%E2%80%9D0987778769%E2%80%9D,%E2%80%9DconsumerSku%22:%222976672%E2%80%9D,%E2%80%9DshoeModelNumber%E2%80%9D:%E2%80%9D12308474%E2%80%9D,%E2%80%9DcartIndicator%E2%80%9D:false%7D,%22quantity%22:%7B%22value%E2%80%9D:%E2%80%9D253%E2%80%9D,%E2%80%9Dunits%E2%80%9D:%E2%80%9D1%E2%80%9D%7D,%E2%80%9Dinvoice%22:%7B%22invoiceNbr%E2%80%9D:%E2%80%9D12345678901%E2%80%9D,%E2%80%9DaisleNumber%E2%80%9D:%E2%80%9D1%E2%80%9D%7D%7D,%E2%80%9DshoeProfile%E2%80%9D:%7B%E2%80%9CrelativeId%E2%80%9D:%E2%80%9Daoej23094-h4h4h4-h4h4h-h3h45-123oje092384jd%E2%80%9D,%E2%80%9Dstyles%22:%5B%7B%22effectivePeriod%22:%7B%22start%22:%7B%22date%22:%7B%22year%22:2018,%22month%22:10,%22day%22:9%7D,%22time%22:%7B%22hour%22:14,%22minute%22:48,%22second%22:4,%22nano%22:687000000%7D%7D%7D,%22styleStatus%22:%22Registered%22,%22styleType%22:%7B%22codings%22:%5B%7B%22code%E2%80%9D:%E2%80%9D123456-7%E2%80%9D,%E2%80%9Ddisplay%E2%80%9D:%E2%80%9DShoe"&gt;http://abc-open.org/iso/3166/"}}],"electronicAddresses":[{"parentResourceId":"f133b31e0-1234-1234-1234-rt1204bf8122","address":"Kipchoge1@gmail.com"}],"phoneNumbers":[{"parentResourceId":"f133b31e0-1234-1234-1234-rt1204bf8122","countryCallingCode":"1","number”:”1232131234”,”extension":"","capabilities":{"fax":false,"voice":true,"text":false}}]},"practitioner":{"relativeId":"f133b31e0-1234-1234-1234-rt1204bf8122","externalId":"SHOEX:1","name":{"first”:”PATRICK”,”last”:”EVANS”},”clinicName":"SHOEX","phoneNumbers":[{"countryCallingCode":"1","number”:”1231231234”,”extension":"","capabilities":{"fax":false,"voice":true,"text":false}}]},"shopping":{"relativeId":"f133b31e0-1234-1234-1234-rt1204bf8122","shippingMethod":"STANDARD"},"prescription":{"relativeId":"f133b31e0-1234-1234-1234-rt1204bf8122","product”:{“aac”:”0987778769”,”consumerSku":"2976672”,”shoeModelNumber”:”12308474”,”cartIndicator”:false},"quantity":{"value”:”253”,”units”:”1”},”invoice":{"invoiceNbr”:”12345678901”,”aisleNumber”:”1”}},”shoeProfile”:{“relativeId”:”aoej23094-h4h4h4-h4h4h-h3h45-123oje092384jd”,”styles":[{"effectivePeriod":{"start":{"date":{"year":2018,"month":10,"day":9},"time":{"hour":14,"minute":48,"second":4,"nano":687000000}}},"styleStatus":"Registered","styleType":{"codings":[{"code”:”123456-7”,”display”:”Shoe&lt;/A&gt; Weight","system":{"identifier":"&lt;A href="http://shoe%E2%80%9D,%E2%80%9Dname%E2%80%9D:%E2%80%9DVAPORFLY"&gt;http://shoe”,”name”:”VAPORFLY&lt;/A&gt; FLYKNIT”,”version":"V2”}}],”text":"Weight"},"value":{"quantity”:7.9,”uncertainty":0.0,"units":{"symbol":"lb","unitSystem”:”METRIC”}}}]},”createdDateTime":{"date":{"year":2018,"month”:10,”day”:1},”time":{"hour":14,"minute":48,"second":5,"nano”:124000000}},"updatedDateTime":{"date":{"year":2018,"month":10,"day":9},"time":{"hour":14,"minute":48,"second":11,"nano":377000000}},"status":"Processed",&lt;STRONG&gt;"processingStatus”:”BIDDING_STARTED”&lt;/STRONG&gt;,”links":[{"rel":"self","href":"&lt;A href="https://coding.io/v1/ShoppingCarts/a47b31e0-7443-48a9-8d98-ac3204bf824a%22,%22template%22:%7B%22variables%22:%7B%22variables%22:%5B%5D%7D,%22baseUri%22:%22https://coding.io/v1/ShoppingCarts/a47b31e0-7443-48a9-8d98-ac3204bf824a%22%7D%7D%5D%7D"&gt;https://coding.io/v1/ShoppingCarts/a47b31e0-7443-48a9-8d98-ac3204bf824a","template":{"variables":{"variables":[]},"baseUri":"https://coding.io/v1/ShoppingCarts/a47b31e0-7443-48a9-8d98-ac3204bf824a"}}]}&lt;/A&gt;] &lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 00:04:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434218#M167043</guid>
      <dc:creator>elheffe</dc:creator>
      <dc:date>2018-10-15T00:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse a raw msg using rex then get the stats count by that field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434219#M167044</link>
      <description>&lt;P&gt;Try this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex "processingStatus”:”(?&amp;lt;processingStatus&amp;gt;[^\”]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Oct 2018 17:46:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434219#M167044</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-10-15T17:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse a raw msg using rex then get the stats count by that field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434220#M167045</link>
      <description>&lt;P&gt;Rex seems to be ok but I'm &lt;STRONG&gt;not seeing any results parsed or when I add the stats count after&lt;/STRONG&gt;?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;|rex "processingStatus”:”(?[^\”]+)" | stats count by processingStatus&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 18:19:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434220#M167045</guid>
      <dc:creator>elheffe</dc:creator>
      <dc:date>2018-10-15T18:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse a raw msg using rex then get the stats count by that field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434221#M167046</link>
      <description>&lt;P&gt;@elheffe, try exactly same command what I shown with &lt;CODE&gt;&amp;lt;processingStatus&amp;gt;&lt;/CODE&gt;  so that it will store extracted value in field name  processingStatus then you can try stats command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex "processingStatus”:”(?&amp;lt;processingStatus&amp;gt;[^\”]+)"| stats count by processingStatus 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Oct 2018 13:41:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434221#M167046</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-10-16T13:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse a raw msg using rex then get the stats count by that field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434222#M167047</link>
      <description>&lt;P&gt;@493669 &lt;BR /&gt;
I think one of the issue is our Prod defaulting the view to "List" view instead of raw view.  This is one of the reason that I might not getting the actual hit or  stats based on the query we both have.&lt;/P&gt;

&lt;P&gt;Any idea on how I can indicate that I should be in "raw" result mode?&lt;/P&gt;

&lt;P&gt;Below is a sample list view as default mode coming up to our prod splunk - picture that value with processingStatus field.&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/storage/temp/256156-json.jpg"&gt;https://answers.splunk.com/storage/temp/256156-json.jpg&lt;/A&gt; &lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5954iE33DE8AA93687085/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 17:16:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434222#M167047</guid>
      <dc:creator>elheffe</dc:creator>
      <dc:date>2018-10-19T17:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse a raw msg using rex then get the stats count by that field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434223#M167048</link>
      <description>&lt;P&gt;on above i am not able to find &lt;CODE&gt;processingStatus&lt;/CODE&gt; field..&lt;BR /&gt;
and secondly if you want statistics and not raw event then click on statistics tab or you can search your query in smart mode instead of verbose mode.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 18:18:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-a-raw-msg-using-rex-then-get-the-stats-count-by/m-p/434223#M167048</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-10-19T18:18:07Z</dc:date>
    </item>
  </channel>
</rss>

