<?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 Sourcetype would increment? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Sourcetype-would-increment/m-p/18153#M2445</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I found the sourcetype that I've been set was growing with incremental digit. 
e.g.  sourcetype=abc-1, sourcetype=abc-2, sourcetype=abc-3 ...&lt;/P&gt;

&lt;P&gt;Do you know why this happens?&lt;/P&gt;

&lt;P&gt;Thanks!
Philip&lt;/P&gt;</description>
    <pubDate>Tue, 28 Dec 2010 12:36:05 GMT</pubDate>
    <dc:creator>hochit</dc:creator>
    <dc:date>2010-12-28T12:36:05Z</dc:date>
    <item>
      <title>Sourcetype would increment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Sourcetype-would-increment/m-p/18153#M2445</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I found the sourcetype that I've been set was growing with incremental digit. 
e.g.  sourcetype=abc-1, sourcetype=abc-2, sourcetype=abc-3 ...&lt;/P&gt;

&lt;P&gt;Do you know why this happens?&lt;/P&gt;

&lt;P&gt;Thanks!
Philip&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2010 12:36:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Sourcetype-would-increment/m-p/18153#M2445</guid>
      <dc:creator>hochit</dc:creator>
      <dc:date>2010-12-28T12:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sourcetype would increment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Sourcetype-would-increment/m-p/18154#M2446</link>
      <description>&lt;P&gt;Splunk will try to learn your sourcetype automatically.  As a result, similar source files with varying event punctuation may show up with the same name with incremental digits.  &lt;/P&gt;

&lt;P&gt;The correct way to fix this is to explicitly set the sourcetype for your data source.  This can be done within inputs.conf or via the gui.  In some scenarios, you may not be able to explicitly set this as the input source has many sourcetypes.  In that case, you must use a props.conf setting to identify individual sourcetypes (somewhat of an advanced topic).&lt;/P&gt;

&lt;P&gt;If you want to get rid of the automatic sourcetyping, you can disable the learned sourcetypes although that is not recommended.  To do this, you can simply disable the learned app via the UI.   Unfortunately, you cannot go back and change the indexed sourcetype value without re-indexing.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2010 00:36:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Sourcetype-would-increment/m-p/18154#M2446</guid>
      <dc:creator>Simeon</dc:creator>
      <dc:date>2010-12-29T00:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sourcetype would increment?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Sourcetype-would-increment/m-p/18155#M2447</link>
      <description>&lt;P&gt;It isn't so obvious how to force a sourcetype using props.conf.  Here is how we do it:&lt;/P&gt;

&lt;P&gt;In props.conf &lt;EM&gt;on the indexer&lt;/EM&gt; you need to identify the files you want to map to a sourcetype using some sort of expression that looks similar to the inputs.conf expressions:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/my/appserver/path/.../logs/access*]
TRANSFORMS-appserver_access = fix_appserver_access_sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you need to put this in transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[fix_appserver_access_sourcetype]
REGEX = .
FORMAT = sourcetype::appserver_access
DEST_KEY = MetaData:Sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you need to restart the indexer.  All new files that are identified will get the new sourcetype.  The files it has already seen will still get mapped with the old sourcetype.&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;Another note:
   If you want to force the sourcetype on the inputs.conf you do that &lt;EM&gt;on the forwarder&lt;/EM&gt;.&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;You can also tag sources that have already been indexed to give them an sourcetype alias.  This can get really tedious if you have hundreds and hundreds of files that were indexed with the wrong sourcetype.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2010 05:14:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Sourcetype-would-increment/m-p/18155#M2447</guid>
      <dc:creator>rotten</dc:creator>
      <dc:date>2010-12-29T05:14:03Z</dc:date>
    </item>
  </channel>
</rss>

