<?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: using dc, showing _raw field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/using-dc-showing-raw-field/m-p/96881#M25050</link>
    <description>&lt;P&gt;exactly what I needed. Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2010 07:51:02 GMT</pubDate>
    <dc:creator>tedder</dc:creator>
    <dc:date>2010-12-01T07:51:02Z</dc:date>
    <item>
      <title>using dc, showing _raw field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-dc-showing-raw-field/m-p/96879#M25048</link>
      <description>&lt;P&gt;This should be easy. I'm building a query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=asdf "search string" | rex field=_raw mode=sed "s/.*foo(.*?)bar/\1/"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Great. Now it returns a portion of the log that I want to see. I need to "count and group" that now.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=asdf "search string" | rex field=_raw mode=sed "s/.*foo(.*?)bar/\1/" | stats count by _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hmm. That just returns raw counts, but not the data. Forcing it causes nothing to return:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=asdf "search string" | rex field=_raw mode=sed "s/.*foo(.*?)bar/\1/" | stats count by _raw as dcount | fields _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, given the first query, can someone add "count and group, sort by top counts" to it? Yes, I know this can theoretically be a field extraction, but I don't want that in this case.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2010 07:25:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-dc-showing-raw-field/m-p/96879#M25048</guid>
      <dc:creator>tedder</dc:creator>
      <dc:date>2010-12-01T07:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: using dc, showing _raw field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-dc-showing-raw-field/m-p/96880#M25049</link>
      <description>&lt;P&gt;The _raw field isn't displayed in the results, because it begins with an underscore. You have to rename it in order to be displayed in the result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=asdf "search string" | rex field=_raw mode=sed "s/.*foo(.*?)bar/\1/" | rename _raw as raw | stats count by raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Dec 2010 07:30:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-dc-showing-raw-field/m-p/96880#M25049</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-12-01T07:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: using dc, showing _raw field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-dc-showing-raw-field/m-p/96881#M25050</link>
      <description>&lt;P&gt;exactly what I needed. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2010 07:51:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-dc-showing-raw-field/m-p/96881#M25050</guid>
      <dc:creator>tedder</dc:creator>
      <dc:date>2010-12-01T07:51:02Z</dc:date>
    </item>
  </channel>
</rss>

