<?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: Why do variations in sourcetype appear? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9884#M220</link>
    <description>&lt;P&gt;The behavior for csv is pretty much identical to iis with the same cause.  It's how our AutoHeader / CHECK_FOR_HEADER logic works.  Again, you can mitigate with rename=original_souretype in the autogenerated sourcetypes.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:11:09 GMT</pubDate>
    <dc:creator>jrodman</dc:creator>
    <dc:date>2020-09-28T09:11:09Z</dc:date>
    <item>
      <title>Why do variations in sourcetype appear?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9878#M214</link>
      <description>&lt;P&gt;I have an Splunk indexer that receives IIS input from several sources.  Why is the sourcetype set to "iis.1" instead of "iis"?&lt;/P&gt;

&lt;P&gt;How can I ensure that all the IIS input is labeled with the same sourcetype ("iis")?&lt;/P&gt;

&lt;P&gt;I do not want my users to have to specify sourcetype="iis*" in their searches.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2010 10:51:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9878#M214</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2010-02-24T10:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Why do variations in sourcetype appear?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9879#M215</link>
      <description>&lt;P&gt;If the sourcetype is not explicitly set when a data input is created, Splunk tries to automatically assign a sourcetype.  In observation, it sometimes uses the file name followed by a sequence number, which may explain why you see &lt;CODE&gt;iis.1&lt;/CODE&gt; as the sourcetype.&lt;/P&gt;

&lt;P&gt;To ensure the data is sourcetyped as you want it, always set the sourcetype.  This can be done in a number of ways.&lt;/P&gt;

&lt;P&gt;If the data input is being added via the Manager, then choose a sourcetype from the list of pre-configured sourcetypes or set it manually using a custom name.&lt;/P&gt;

&lt;P&gt;If adding data via inputs.conf, ensure the &lt;CODE&gt;sourcetype&lt;/CODE&gt; parameter is defined for the input stanza.  For example:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;&lt;CODE&gt;[monitor:///.../iis.log]&lt;/CODE&gt;&lt;BR /&gt;
  &lt;CODE&gt;sourcetype = iis&lt;/CODE&gt;&lt;BR /&gt;
  &lt;CODE&gt;disabled = false&lt;/CODE&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;For flexible sourcetyping use props.conf and wildcards, for example:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;&lt;CODE&gt;[source::.../iis.log]&lt;/CODE&gt;&lt;BR /&gt;
  &lt;CODE&gt;sourcetype = iis&lt;/CODE&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;IMHO, getting the sourcetyping right is one of the essential tasks in any Splunk implementation so that you don't need to have users search with &lt;CODE&gt;sourcetype=iis*&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2010 06:33:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9879#M215</guid>
      <dc:creator>hulahoop</dc:creator>
      <dc:date>2010-03-10T06:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why do variations in sourcetype appear?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9880#M216</link>
      <description>&lt;P&gt;It's certainly true that if splunk encounters 'someapp.log' without configuration, likely to create a new sourcetype called 'someapp'.  Later, as the file rolls, splunk may not be able to correctly guess that the new rolled files are the same, and create a new sourcetype 'someapp-1', and then 2 and so on, as you say.&lt;/P&gt;

&lt;P&gt;However, IIS gets these sourcetypes for another reason.  IIS is a sourcetype with positional field names in a header at the top of the file. However, since each file lists the fields present, Splunk assumes that not all files of this type will necessarily have the same list of fields.  Therefore a new sourcetype is generated whenever the list of fields must be stored, and the list is inserted into a field extraction configuration for each sourcetype in turn.&lt;/P&gt;

&lt;P&gt;This works fine in a simple splunk environment, although it does look a bit confusing.  However, because it creates configuration at index time intended to be used at search time it can break in distributed search environments, or in situations where data is forwarded after it is parsed.&lt;/P&gt;

&lt;P&gt;Incidentally we have a proposal to make searches work for all 'sourcetype=iis' which is to add the configuration 'rename=iis' to each of the autogenerated sourcetypes.  This can be done manually for now, but I hope this starts happening automatically in a release in the near future.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2010 17:03:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9880#M216</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-03-11T17:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why do variations in sourcetype appear?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9881#M217</link>
      <description>&lt;P&gt;I agree: getting the sourcetype right is key.  But there is apparently  a particular issue with IIS that persists even when sourcetype=iis is specified!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2010 03:00:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9881#M217</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2010-03-12T03:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why do variations in sourcetype appear?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9882#M218</link>
      <description>&lt;P&gt;Will try using rename=iis&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2010 03:01:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9882#M218</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2010-03-12T03:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why do variations in sourcetype appear?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9883#M219</link>
      <description>&lt;P&gt;What's the fix of this behaviour in non iis sourcetypes?&lt;BR /&gt;
I've seen this happen with a external script pushing a csv file monitored by splunk. Although i think upon every push the headers might have been getting cutoff, so the sourcetype read after each new script push was getting assigned somefile-1, somefile-2. Not sure root cause.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2010 00:31:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9883#M219</guid>
      <dc:creator>Chris_R_</dc:creator>
      <dc:date>2010-03-18T00:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why do variations in sourcetype appear?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9884#M220</link>
      <description>&lt;P&gt;The behavior for csv is pretty much identical to iis with the same cause.  It's how our AutoHeader / CHECK_FOR_HEADER logic works.  Again, you can mitigate with rename=original_souretype in the autogenerated sourcetypes.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:11:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9884#M220</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2020-09-28T09:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why do variations in sourcetype appear?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9885#M221</link>
      <description>&lt;P&gt;I think given there are multiple versions of IIS being run in the data center, it isn't as easy as the pull down auto-sourcetyping splunk provides for "IIS".  In cases where W3C exists, there is also normally W3SVC1 as well.  So, first define your problem.  Do you have IIS6, IIS7 and/or IIS7.5 as you would in 2008 environments.  Each of these look a little different: IIS for 6.0 and  IIS-n, or IIS-n+1 when auto-sourcetyped for IIS 7.0 or IIS 7.5.&lt;/P&gt;

&lt;P&gt;For example - here is IIS7.0 logging example:
2010-01-08 03:28:31 W3SVC1 WS1  GET /favicon.ico - 80 - 10.3.200.2 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.1;+en-US;+rv:1.9.1.6)+Gecko/20091201+Firefox/3.5.6 - - 10.20.100.10 404 0 2 1405 356 15
2010-01-08 03:28:31 W3SVC1 WS1  GET /favicon.ico - 80 - 10.3.200.2 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.1;+en-US;+rv:1.9.1.6)+Gecko/20091201+Firefox/3.5.6 - - 10.20.100.10 404 0 2 1405 356 31
2010-01-08 03:28:31 W3SVC1 WS1  GET /favicon.ico - 80 - 10.3.200.2 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.1;+en-US;+rv:1.9.1.6)+Gecko/20091201+Firefox/3.5.6 - - 10.20.100.10 404 0 2 1405 356 31&lt;/P&gt;

&lt;P&gt;note the replacement of whitespace with a '+' and also what you don't see here, is additional values attached to the HTTP Status codes: &lt;A href="http://support.microsoft.com/kb/943891" rel="nofollow"&gt;http://support.microsoft.com/kb/943891&lt;/A&gt;
So, don't get frustrated if you find your auto-sourcetyping isn't working in your ~/local/props.conf.  Make sure you are taking into account the new delimiter for each sourcetype.&lt;/P&gt;</description>
      <pubDate>Sat, 22 May 2010 04:54:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9885#M221</guid>
      <dc:creator>SplunkSE</dc:creator>
      <dc:date>2010-05-22T04:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why do variations in sourcetype appear?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9886#M222</link>
      <description>&lt;P&gt;Excellent advice.  Given the environment that evoked the original post, the answer to the question "Do you have IIS6..." is probably "all of the above"&lt;BR /&gt;
Thanks very much for explaining the issue thoroughly.&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2010 04:23:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/9886#M222</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2010-05-27T04:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why do variations in sourcetype appear?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/678041#M113319</link>
      <description>&lt;P&gt;14 years later, I'm coming here to say &lt;STRONG&gt;THANK YOU!&lt;/STRONG&gt; One of my backburner projects has been trying to figure out why we've been getting "cron-2" and "error.log-too_small" type sourcetypes for over a year now. Simply defining the sourcetype for each file, as you suggested, has fixed the issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/47"&gt;@hulahoop&lt;/a&gt;,&amp;nbsp;are a lifesaver.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 06:34:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-variations-in-sourcetype-appear/m-p/678041#M113319</guid>
      <dc:creator>HeavyHats</dc:creator>
      <dc:date>2024-02-20T06:34:19Z</dc:date>
    </item>
  </channel>
</rss>

