<?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 appear as event in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/CSV-headers-appear-as-event/m-p/412325#M72991</link>
    <description>&lt;P&gt;Have you tried the native CSV structured sourcetype in Splunk to parse that? The header wouldd be just fine:&lt;/P&gt;

&lt;P&gt;[ csv ]&lt;BR /&gt;
CHARSET=UTF-8&lt;BR /&gt;
INDEXED_EXTRACTIONS=csv&lt;BR /&gt;
KV_MODE=none&lt;BR /&gt;
SHOULD_LINEMERGE=false&lt;BR /&gt;
category=Structured&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;</description>
    <pubDate>Tue, 29 Sep 2020 23:28:06 GMT</pubDate>
    <dc:creator>tiagofbmm</dc:creator>
    <dc:date>2020-09-29T23:28:06Z</dc:date>
    <item>
      <title>CSV headers appear as event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-headers-appear-as-event/m-p/412324#M72990</link>
      <description>&lt;P&gt;I have a CSV file that updates every now and then. I'm monitoring it via Splunk. However, the problem is that the first line of the file contains column names.&lt;/P&gt;

&lt;P&gt;for example: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME;NAME;CAUSE;MONITOR;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and then comes the values &lt;CODE&gt;20190301;thename;problem; 1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I don't need column names to appear as an event. However, I was not able to find a solution that would work, I tried adding following lines in props.conf  &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;But no success. suggestions? &lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 11:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-headers-appear-as-event/m-p/412324#M72990</guid>
      <dc:creator>ninisimonishvil</dc:creator>
      <dc:date>2019-03-01T11:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: CSV headers appear as event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-headers-appear-as-event/m-p/412325#M72991</link>
      <description>&lt;P&gt;Have you tried the native CSV structured sourcetype in Splunk to parse that? The header wouldd be just fine:&lt;/P&gt;

&lt;P&gt;[ csv ]&lt;BR /&gt;
CHARSET=UTF-8&lt;BR /&gt;
INDEXED_EXTRACTIONS=csv&lt;BR /&gt;
KV_MODE=none&lt;BR /&gt;
SHOULD_LINEMERGE=false&lt;BR /&gt;
category=Structured&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;</description>
      <pubDate>Tue, 29 Sep 2020 23:28:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-headers-appear-as-event/m-p/412325#M72991</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2020-09-29T23:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: CSV headers appear as event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-headers-appear-as-event/m-p/412326#M72992</link>
      <description>&lt;P&gt;This is one way you can do it:  (ref: &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.4/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.4/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest&lt;/A&gt; )&lt;/P&gt;

&lt;P&gt;In props.conf, set the TRANSFORMS-null attribute:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
TRANSFORMS-null= discard_header_row
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[discard_header_row]
REGEX = ^\s*TIME,
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 11:19:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-headers-appear-as-event/m-p/412326#M72992</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-03-01T11:19:28Z</dc:date>
    </item>
  </channel>
</rss>

