<?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 display a list of fields for an index? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/566301#M197363</link>
    <description>&lt;P&gt;Is there a way to display all the fields from a specific index used in all reports?&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/201110"&gt;@niketn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Sep 2021 13:04:14 GMT</pubDate>
    <dc:creator>yvassilyeva</dc:creator>
    <dc:date>2021-09-08T13:04:14Z</dc:date>
    <item>
      <title>How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226548#M66812</link>
      <description>&lt;P&gt;All, &lt;/P&gt;

&lt;P&gt;Is it possble to display a list of fields for an index? &lt;/P&gt;

&lt;P&gt;Something like this? &lt;BR /&gt;
index=java | dedup fields | table fields&lt;/P&gt;

&lt;P&gt;thanks, &lt;BR /&gt;
-Daniel &lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:16:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226548#M66812</guid>
      <dc:creator>daniel333</dc:creator>
      <dc:date>2016-01-14T22:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226549#M66813</link>
      <description>&lt;P&gt;Hi daniel333,&lt;/P&gt;

&lt;P&gt;Yes, this is possible using &lt;CODE&gt;stats&lt;/CODE&gt; - take a look at this run everywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=_internal | stats values(*) AS * | transpose | table column | rename column AS Fieldnames
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will create a list of all field names within index &lt;CODE&gt;_internal&lt;/CODE&gt;. Adopted to your search this should do it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=java | stats values(*) AS * | transpose | table column | rename column AS Fieldnames
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226549#M66813</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-01-14T22:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226550#M66814</link>
      <description>&lt;P&gt;Youre looking for |fieldsummary|table field&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:26:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226550#M66814</guid>
      <dc:creator>ITSX</dc:creator>
      <dc:date>2016-01-14T22:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226551#M66815</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=java | stats dc() as * | transpose
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Make sure there are some time restrictions applied. &lt;/P&gt;

&lt;P&gt;Alternatively take a look at this: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/SearchReference/Fieldsummary"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/SearchReference/Fieldsummary&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:26:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226551#M66815</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-01-14T22:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226552#M66816</link>
      <description>&lt;P&gt;or use the &lt;CODE&gt;fieldsummary&lt;/CODE&gt; command in your search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=java | fieldsummary | table field
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:28:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226552#M66816</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-01-14T22:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226553#M66817</link>
      <description>&lt;P&gt;Simple ..!&lt;/P&gt;

&lt;P&gt;index=java |table *&lt;/P&gt;

&lt;P&gt;Then you can filter whatever fields you don't want.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 13:59:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226553#M66817</guid>
      <dc:creator>477450</dc:creator>
      <dc:date>2017-03-28T13:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226554#M66818</link>
      <description>&lt;P&gt;The search as noted above:&lt;BR /&gt;
    index=java | stats values(*) AS * | transpose | table column | rename column AS Fieldnames&lt;/P&gt;

&lt;P&gt;works, but is there a way to calculate the event coverage as well? fieldsummary doesn't seem to show this&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 19:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/226554#M66818</guid>
      <dc:creator>cgalligan</dc:creator>
      <dc:date>2018-01-23T19:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/523224#M147576</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=m1 sourcetype=m1a 
| head 999
| fieldsummary 
| where count&amp;gt;0 
| table field count distinct_count values&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 15:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/523224#M147576</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2020-10-06T15:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/566301#M197363</link>
      <description>&lt;P&gt;Is there a way to display all the fields from a specific index used in all reports?&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/201110"&gt;@niketn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 13:04:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/566301#M197363</guid>
      <dc:creator>yvassilyeva</dc:creator>
      <dc:date>2021-09-08T13:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/650421#M224858</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So taking these results, how would I join the &lt;FONT face="courier new,courier"&gt;&lt;EM&gt;&lt;STRONG&gt;index&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt; and&lt;FONT face="courier new,courier"&gt; &lt;EM&gt;&lt;STRONG&gt;sourcetype&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt; pair for each field name so I would end up with something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;someIndex.someSourcetype.someFieldname

index=firewall sourcetype=firewall1 

fieldnames: host, source, srcip, dest, etc etc.

firewall.firewall1.srcip

firewall.firewall1.dest

firewall.firewall1.destport

....



index=networkdevices sourcetype=ids1 (sourcetype=ids2...)

networkdevices.ids1.src

networkdevices.ids2.dest

...

networkdevices.router1.src

....



index=someApp sourcetype=someTCPsource 

someApp.someTCPsource.src

someApp.someTCPsource.randomField1

....&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or, alternately, could I take the results of this query and run some modification of the search you proposed to dump the fieldname for&amp;nbsp; each&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;index:sourcetype&lt;/STRONG&gt;&lt;/EM&gt; pair?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats values(field) as Field, count where index=* AND sourcetype=* by index, sourcetype&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 16:04:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/650421#M224858</guid>
      <dc:creator>JohnEGones</dc:creator>
      <dc:date>2023-07-13T16:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/753848#M242794</link>
      <description>&lt;P&gt;I feel like I'm missing something simple here.&amp;nbsp; I've copied/pasted the query and it doesn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried the options listed below and come back with 0.&amp;nbsp; Can anyone think of a reason why that might happen?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 20:27:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/753848#M242794</guid>
      <dc:creator>splunker-wolf</dc:creator>
      <dc:date>2025-10-01T20:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/753854#M242799</link>
      <description>&lt;P&gt;What exactly did you run?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 21:56:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/753854#M242799</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-10-01T21:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/753888#M242805</link>
      <description>&lt;P&gt;I tried the following:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=&amp;lt;myindex&amp;gt; | stats values(*) AS * | transpose | table column | rename column AS Fieldnames&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=&amp;lt;myindex&amp;gt; |table *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=&amp;lt;myindex&amp;gt; fieldsummary | table*&lt;BR /&gt;&lt;BR /&gt;every search comes back as 0 Events and Statistics (0)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Like I said I feel like I'm missing something simple.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 19:12:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/753888#M242805</guid>
      <dc:creator>splunker-wolf</dc:creator>
      <dc:date>2025-10-02T19:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a list of fields for an index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/753908#M242807</link>
      <description>&lt;P&gt;OK. If you put there literally "&amp;lt;myindex&amp;gt;" that obviously won't work.&lt;/P&gt;&lt;P&gt;I'll assume you actually substituted that for the real index name so in case of an internal index that would be&lt;/P&gt;&lt;PRE&gt;index=_internal&lt;BR /&gt;| stats values(*) AS *&lt;BR /&gt;| transpose&lt;BR /&gt;| table column&lt;BR /&gt;| rename column AS fieldnames&lt;/PRE&gt;&lt;P&gt;So actually there are several possible issues with those searches. Transpose has its limits, tabling all events can be resource-intensive...&lt;/P&gt;&lt;P&gt;Actually the best one of those seems to be the fieldsummary one.&lt;/P&gt;&lt;P&gt;But if you're not gettting any results (and no errors) at all that means there's something more to it. Inspect the job, check its log.&lt;/P&gt;&lt;P&gt;Do you have the permissions to the target index? Aren't you trying to search over a longer period than permitted for your role?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 06:48:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-a-list-of-fields-for-an-index/m-p/753908#M242807</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-10-03T06:48:18Z</dc:date>
    </item>
  </channel>
</rss>

