<?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: Inconsistent sourcetype while indexing CSV files in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16239#M1918</link>
    <description>&lt;P&gt;Are you doing any forwarding?  I believe that &lt;CODE&gt;CHECK_FOR_HEADER&lt;/CODE&gt; doesn't work right when forwarders are involved. (I could be wrong about that.)   I've always ended up making explicit sourcetypes rather than relying on CHECK_FOR_HEADER, for whatever that's worth.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:14:02 GMT</pubDate>
    <dc:creator>Lowell</dc:creator>
    <dc:date>2020-09-28T09:14:02Z</dc:date>
    <item>
      <title>Inconsistent sourcetype while indexing CSV files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16238#M1917</link>
      <description>&lt;P&gt;I'm indexing a CSV file and I just can't get Splunk to extract any fields or apply the proper sourcetype to the events. The desired sourcetype is &lt;STRONG&gt;acs&lt;/STRONG&gt; and what I'm getting is &lt;STRONG&gt;acs-n&lt;/STRONG&gt; where is some number which varies, acs-1, acs-2, etc. &lt;/P&gt;

&lt;P&gt;I saw another answer about this issue which basically stated that it had something to do with the functionality that automatically parses field names from the header. I don't have &lt;STRONG&gt;CHECK_FOR_HEADER = true&lt;/STRONG&gt; and I specify the sourcetype in the inputs.conf stanza so I don't understand what's going on.&lt;/P&gt;

&lt;P&gt;I should mention that I have another CSV file being indexed using the same procedure as below and it works perfectly.&lt;/P&gt;

&lt;P&gt;Has anyone run into this before? &lt;/P&gt;

&lt;P&gt;input file:&lt;BR /&gt;
Date,Time,Message-Type,User-Name,Group-Name,Caller-ID,NAS-Port,NAS-IP-Address&lt;BR /&gt;
04/03/2010,00:00:00,Authen OK,c1tr1x_wds,Network Services,0004.235f.4c1c,c1tr1x_wds,10.6.70.&lt;/P&gt;

&lt;P&gt;inputs.conf:&lt;BR /&gt;
[monitor://\server\logs]&lt;BR /&gt;
sourcetype = acs&lt;BR /&gt;
_whitelist = Failed Attempts.*.csv&lt;/P&gt;

&lt;P&gt;props.conf:&lt;BR /&gt;
[acs]&lt;BR /&gt;
REPORT-acs-fail = acs-fail-fields  &lt;/P&gt;

&lt;P&gt;transforms.conf:&lt;BR /&gt;
[acs-fail-fields]&lt;BR /&gt;
FIELDS = "date", "time", "message-type", "user", "user_group", "message", "junk1", "junk2", "src_mac", "nas-port", "src_ip"&lt;BR /&gt;
DELIMS = ","  &lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2010 03:48:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16238#M1917</guid>
      <dc:creator>erga00</dc:creator>
      <dc:date>2010-06-26T03:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent sourcetype while indexing CSV files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16239#M1918</link>
      <description>&lt;P&gt;Are you doing any forwarding?  I believe that &lt;CODE&gt;CHECK_FOR_HEADER&lt;/CODE&gt; doesn't work right when forwarders are involved. (I could be wrong about that.)   I've always ended up making explicit sourcetypes rather than relying on CHECK_FOR_HEADER, for whatever that's worth.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16239#M1918</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2020-09-28T09:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent sourcetype while indexing CSV files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16240#M1919</link>
      <description>&lt;P&gt;This is the fallout from CHECK_FOR_HEADER. &lt;/P&gt;

&lt;P&gt;There's a bug where CHECK_FOR_HEADER is applied based on filename pattern, despite not being in your sourcetype.  You might be able to work around by declaring CHECK_FOR_HEADER = false explicitly in your sourcetype, or by declaring [source::.../Failed Attempts.*.csv] sourcetype=acs in props.conf, especially if you set a priority value of eg 100.&lt;/P&gt;

&lt;P&gt;The bug is due for fixing in 4.1.4, which will be a few weeks -- we're verifying bugs as fast as we can.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2010 05:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16240#M1919</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-06-26T05:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent sourcetype while indexing CSV files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16241#M1920</link>
      <description>&lt;P&gt;Yes. This is on a forwarder. &lt;/P&gt;

&lt;P&gt;I thought I was setting an explicit sourcetype. Am I not understanding what that means?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2010 22:08:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16241#M1920</guid>
      <dc:creator>erga00</dc:creator>
      <dc:date>2010-06-28T22:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent sourcetype while indexing CSV files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16242#M1921</link>
      <description>&lt;P&gt;Neither explicitly setting CHECK_FOR_HEADER=false or declaring [source::.../Failed Attempts.*.csv] with priority = 100 worked.&lt;BR /&gt;&lt;BR /&gt;
Thanks for the help. I'll open a support case and see if they can track it down.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:14:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16242#M1921</guid>
      <dc:creator>erga00</dc:creator>
      <dc:date>2020-09-28T09:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent sourcetype while indexing CSV files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16243#M1922</link>
      <description>&lt;P&gt;In the dumbest possible case, you can either disable the [source::....csv] sourcetype=csv stanza, or turn off CHECK_FOR_HEADER for the [csv] sourcetype stanza.  Obviously these approaches are a bit more intrusive.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:14:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16243#M1922</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2020-09-28T09:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent sourcetype while indexing CSV files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16244#M1923</link>
      <description>&lt;P&gt;fwiw something similar is happening to me on 4.1.6. But I do need CHECK_FOR_HEADER, so maybe I'm out of luck.  Are there docs about what the "-2" suffixes are trying to do for me?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:25:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16244#M1923</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2020-09-28T09:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent sourcetype while indexing CSV files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16245#M1924</link>
      <description>&lt;P&gt;The expansion of the sourcetype into multiple sourcetypes allows the system to store the list of fields on a per-file basis, since there's no guarantee it doesn't change.  Why the first one is -2, instead of nothing or -1, is some minor internal misbehavior that doesn't really change the situation, since you'll get multiple sourcetypes eventually.   This behavior forces you to account for multiple sourcetypes in your searches manually, by eg folding them back together using eval and such.  It's a pain.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2011 07:47:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inconsistent-sourcetype-while-indexing-CSV-files/m-p/16245#M1924</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2011-03-05T07:47:51Z</dc:date>
    </item>
  </channel>
</rss>

