<?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 create a search that lists all fields? (and data validation question) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-lists-all-fields-and-data-validation/m-p/430381#M123072</link>
    <description>&lt;P&gt;hi @mbasharat - Can you give some example mock up based on the _audit index if possible?&lt;BR /&gt;
I am not able to understand your desired output&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2019 18:20:53 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2019-06-20T18:20:53Z</dc:date>
    <item>
      <title>How to create a search that lists all fields? (and data validation question)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-lists-all-fields-and-data-validation/m-p/430378#M123069</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I am looking to create a search that allows me to get a list of all fields in addition to below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE index=ABC by index, source, sourcetype, _time
| fieldformat "_time"=strftime('_time', "%m/%d/%Y %T")
 | sort by _time Desc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I add field name in addition to results below in above SPL and get counts? I want to have an alternate version WITHOUT using tsats as well. So need both versions, with and without tstats.&lt;/P&gt;

&lt;P&gt;Either I am missing a tiny piece above or brain needs some rest at the moment &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks in-advance&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 16:30:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-lists-all-fields-and-data-validation/m-p/430378#M123069</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2019-06-20T16:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search that lists all fields? (and data validation question)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-lists-all-fields-and-data-validation/m-p/430379#M123070</link>
      <description>&lt;P&gt;are you looking for something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE index="_audit" by index, source, sourcetype, _time
| fieldformat "_time"=strftime('_time', "%m/%d/%Y %T")
| sort by _time Desc 
    | appendcols 
    [search index="_audit"
    | table *]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;NOTE - the default  _audit index has been considered here so that you can run the code as is&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 17:28:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-lists-all-fields-and-data-validation/m-p/430379#M123070</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-06-20T17:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search that lists all fields? (and data validation question)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-lists-all-fields-and-data-validation/m-p/430380#M123071</link>
      <description>&lt;P&gt;Is there a field name that I can use below so my results include the field names as well and then respective counts?&lt;/P&gt;

&lt;P&gt;| tstats count WHERE index=ABC by index, source, sourcetype, fieldname (like * or something that gives me list of fields as well), _time&lt;BR /&gt;
| fieldformat "_time"=strftime('_time', "%m/%d/%Y %T")&lt;BR /&gt;
| sort by _time Desc&lt;/P&gt;

&lt;P&gt;In your provided query, appendcols are providing results.  But I want the field names in the header to be in the column with respective event counts &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:59:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-lists-all-fields-and-data-validation/m-p/430380#M123071</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-09-30T00:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search that lists all fields? (and data validation question)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-lists-all-fields-and-data-validation/m-p/430381#M123072</link>
      <description>&lt;P&gt;hi @mbasharat - Can you give some example mock up based on the _audit index if possible?&lt;BR /&gt;
I am not able to understand your desired output&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 18:20:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-lists-all-fields-and-data-validation/m-p/430381#M123072</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-06-20T18:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search that lists all fields? (and data validation question)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-lists-all-fields-and-data-validation/m-p/430382#M123073</link>
      <description>&lt;P&gt;@mbasharat you can try one of my older answers which lists two options that you can try &lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/590143/how-to-dynamically-populate-field-names-in-dropdow.html"&gt;https://answers.splunk.com/answers/590143/how-to-dynamically-populate-field-names-in-dropdow.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2019 06:04:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-lists-all-fields-and-data-validation/m-p/430382#M123073</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-06-23T06:04:08Z</dc:date>
    </item>
  </channel>
</rss>

