<?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: CSV Headers appearing as events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/CSV-Headers-appearing-as-events/m-p/325210#M60477</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;if your header is always in line 1, then simply set these options (found in props.conf):&lt;BR /&gt;
Your props.conf is way too oversized for a simple csv import. Don't specify so many options you don't know exactly.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;HEADER_FIELD_LINE_NUMBER = 1
HEADER_FIELD_DELIMITER = ,
FIELD_DELIMITER = ,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not so sure if it is &lt;BR /&gt;
= "," &lt;BR /&gt;
or &lt;BR /&gt;
= ,&lt;BR /&gt;
Just try both.&lt;/P&gt;

&lt;P&gt;Skalli&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2017 11:55:34 GMT</pubDate>
    <dc:creator>skalliger</dc:creator>
    <dc:date>2017-07-20T11:55:34Z</dc:date>
    <item>
      <title>CSV Headers appearing as events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-Headers-appearing-as-events/m-p/325209#M60476</link>
      <description>&lt;P&gt;My events are appearing on Splunk and the fields are getting extracted however the header is appearing as an event every day that the file is updated. So this appears as an event:&lt;/P&gt;

&lt;P&gt;"user_name","name","number","opened_at"&lt;/P&gt;

&lt;P&gt;My data is very standard:&lt;/P&gt;

&lt;P&gt;"user_name","name","number","opened_at"&lt;BR /&gt;
"Bob","Sarah","X10924704","2017-07-18 19:59:18"&lt;BR /&gt;
...&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;I'm fairly new to Splunk but I have researched this problem and haven't found a solution.&lt;/P&gt;

&lt;P&gt;So I used Splunk Web to create a props.conf which is as follows:&lt;/P&gt;

&lt;P&gt;[sourcetype1]&lt;BR /&gt;
DATETIME_CONFIG =&lt;BR /&gt;
INDEXED_EXTRACTIONS = csv&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
category = Custom&lt;BR /&gt;
description = Comma-separated value format. Set header and other settings in "Delimited Settings"&lt;BR /&gt;
disabled = false&lt;BR /&gt;
pulldown_type = true&lt;/P&gt;

&lt;P&gt;On Splunk Web this did not display the headers as events.&lt;/P&gt;

&lt;P&gt;This is on my forwarder and as I said the events are appearing and fields are getting extracted. &lt;/P&gt;

&lt;P&gt;I have tried doing this:&lt;/P&gt;

&lt;P&gt;[sourcetype1]&lt;BR /&gt;
TRANSFORMS-NoHeader = NoHeader&lt;/P&gt;

&lt;P&gt;on your transforms.conf add this:&lt;BR /&gt;
[NoHeader]&lt;BR /&gt;
REGEX = "user_name","name","number","opened_at"&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;Which did not work -- I'm also unsure why it would be necessary. Splunk understands that the data is a CSV so why would it think the headers are events?!&lt;/P&gt;

&lt;P&gt;I'll also put inputs.conf and indexes.conf below (I don't know if it is necessary):&lt;/P&gt;

&lt;P&gt;[index1]&lt;BR /&gt;
homePath = volume:hotData/index1/db&lt;BR /&gt;
coldPath = volume:coldData/index1/colddb&lt;BR /&gt;
thawedPath = $SPLUNK_DB/index1/thaweddb&lt;BR /&gt;
homePath.maxDataSizeMB = 2560&lt;BR /&gt;
coldPath.maxDataSizeMB = 5120&lt;/P&gt;

&lt;P&gt;[monitor://\sever\folder\file]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
followTail = 0&lt;BR /&gt;
index = index1&lt;BR /&gt;
sourcetype = sourcetype1&lt;BR /&gt;
ignoreOlderThan = 5d&lt;/P&gt;

&lt;P&gt;Any help would be appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:01:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-Headers-appearing-as-events/m-p/325209#M60476</guid>
      <dc:creator>tc641</dc:creator>
      <dc:date>2020-09-29T15:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Headers appearing as events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-Headers-appearing-as-events/m-p/325210#M60477</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;if your header is always in line 1, then simply set these options (found in props.conf):&lt;BR /&gt;
Your props.conf is way too oversized for a simple csv import. Don't specify so many options you don't know exactly.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;HEADER_FIELD_LINE_NUMBER = 1
HEADER_FIELD_DELIMITER = ,
FIELD_DELIMITER = ,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not so sure if it is &lt;BR /&gt;
= "," &lt;BR /&gt;
or &lt;BR /&gt;
= ,&lt;BR /&gt;
Just try both.&lt;/P&gt;

&lt;P&gt;Skalli&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 11:55:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-Headers-appearing-as-events/m-p/325210#M60477</guid>
      <dc:creator>skalliger</dc:creator>
      <dc:date>2017-07-20T11:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Headers appearing as events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-Headers-appearing-as-events/m-p/325211#M60478</link>
      <description>&lt;P&gt;I just copied the config when splunk web created it as it was working there. I'll try this and hopefully it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 12:26:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-Headers-appearing-as-events/m-p/325211#M60478</guid>
      <dc:creator>tc641</dc:creator>
      <dc:date>2017-07-20T12:26:21Z</dc:date>
    </item>
  </channel>
</rss>

