<?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: Create a sourcetype to index map in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Create-a-sourcetype-to-index-map/m-p/368664#M108660</link>
    <description>&lt;P&gt;It's possible you have sourcetypes being changed at search time, which would result in different sourcetypes being indexed than shown at search time.  Look in your &lt;CODE&gt;props.conf&lt;/CODE&gt; for any mention of the &lt;CODE&gt;rename&lt;/CODE&gt; configuration:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rename = &amp;lt;string&amp;gt;
* Renames [&amp;lt;sourcetype&amp;gt;] as &amp;lt;string&amp;gt; at search time
* With renaming, you can search for the [&amp;lt;sourcetype&amp;gt;] with
  sourcetype=&amp;lt;string&amp;gt;
* To search for the original source type without renaming it, use the
  field _sourcetype.
* Data from a a renamed sourcetype will only use the search-time
  configuration for the target sourcetype. Field extractions
  (REPORTS/EXTRACT) for this stanza sourcetype will be ignored.
* Defaults to empty.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You may try &lt;CODE&gt;bin/splunk btool props list --debug | grep rename&lt;/CODE&gt; to get a quick "do I see this anywhere" answer.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Dec 2017 18:13:38 GMT</pubDate>
    <dc:creator>micahkemp</dc:creator>
    <dc:date>2017-12-29T18:13:38Z</dc:date>
    <item>
      <title>Create a sourcetype to index map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-sourcetype-to-index-map/m-p/368663#M108659</link>
      <description>&lt;P&gt;I am exploring an unfamiliar Splunk Enterprise deployment.&lt;/P&gt;

&lt;P&gt;Normally I use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |tstats values(sourcetype) WHERE index=* by index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to get a quick reference map of sourcetype to index, but it only shows a few indexes.... (4 total)&lt;/P&gt;

&lt;P&gt;When I run; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* |stats values(sourcetype) by index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get more (24 total).&lt;/P&gt;

&lt;P&gt;When I run:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|metadata type=sourcetypes index=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get  sourcetypes  but not index values in a column&lt;/P&gt;

&lt;P&gt;Please advise what I might use to get a comprehensive list of indexes and sourcetypes.&lt;BR /&gt;
Any explanation for the different results is much appreciated too.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 18:07:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-sourcetype-to-index-map/m-p/368663#M108659</guid>
      <dc:creator>Log_wrangler</dc:creator>
      <dc:date>2017-12-29T18:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create a sourcetype to index map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-sourcetype-to-index-map/m-p/368664#M108660</link>
      <description>&lt;P&gt;It's possible you have sourcetypes being changed at search time, which would result in different sourcetypes being indexed than shown at search time.  Look in your &lt;CODE&gt;props.conf&lt;/CODE&gt; for any mention of the &lt;CODE&gt;rename&lt;/CODE&gt; configuration:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rename = &amp;lt;string&amp;gt;
* Renames [&amp;lt;sourcetype&amp;gt;] as &amp;lt;string&amp;gt; at search time
* With renaming, you can search for the [&amp;lt;sourcetype&amp;gt;] with
  sourcetype=&amp;lt;string&amp;gt;
* To search for the original source type without renaming it, use the
  field _sourcetype.
* Data from a a renamed sourcetype will only use the search-time
  configuration for the target sourcetype. Field extractions
  (REPORTS/EXTRACT) for this stanza sourcetype will be ignored.
* Defaults to empty.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You may try &lt;CODE&gt;bin/splunk btool props list --debug | grep rename&lt;/CODE&gt; to get a quick "do I see this anywhere" answer.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 18:13:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-sourcetype-to-index-map/m-p/368664#M108660</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2017-12-29T18:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create a sourcetype to index map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-sourcetype-to-index-map/m-p/368665#M108661</link>
      <description>&lt;P&gt;Thank you for the reply.  I will check the props.conf when I am granted access.  &lt;/P&gt;

&lt;P&gt;I can get by with &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* |stats values(sourcetype) by index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but I forgot how to write the code to count the number sourcetypes per index, (not the events per sourcetype)...   any advice is greatly appreciated.  I have  multiple sourcetypes per index and at least 24 so far.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 18:43:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-sourcetype-to-index-map/m-p/368665#M108661</guid>
      <dc:creator>Log_wrangler</dc:creator>
      <dc:date>2017-12-29T18:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create a sourcetype to index map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-sourcetype-to-index-map/m-p/368666#M108662</link>
      <description>&lt;P&gt;I came up with this&lt;BR /&gt;
    index=* |stats values(sourcetype) dc(sourcetype) by index&lt;/P&gt;

&lt;P&gt;Please let me know if there is a better way... &lt;/P&gt;

&lt;P&gt;to clarify I want to see a count unique sourcetypes per index, for example  main has sourcetype A B C D E, so the count would be 5.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 18:57:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-sourcetype-to-index-map/m-p/368666#M108662</guid>
      <dc:creator>Log_wrangler</dc:creator>
      <dc:date>2017-12-29T18:57:31Z</dc:date>
    </item>
  </channel>
</rss>

