<?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 Splunk UFW - Indexing Headers as Events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-UFW-Indexing-Headers-as-Events/m-p/498762#M84998</link>
    <description>&lt;P&gt;Apologies as I know this has been asked a few times, but none of the answers I have found seem to work.&lt;/P&gt;

&lt;P&gt;I have some fairly simple scripts that output 2 row CSV files, like this:&lt;/P&gt;

&lt;P&gt;examplefile.csv&lt;BR /&gt;
Server,ip_address,latency&lt;BR /&gt;
Test,192.168.0.1,10ms&lt;/P&gt;

&lt;P&gt;The script runs on a RPI and using the UFW, but when the UFW extracts the data, it extracts the top row as an event. I have literally tried everything I can think of (props.conf) - here are some of the examples I've tried&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[examplecsv]
CHARSET=UTF-8
INDEXED_EXTRACTIONS=csv
DATETIME_CONFIG=CURRENT
CHECK_FOR_HEADER=true
HEADER_FIELD_LINE_NUMBER=1
HEADER_FIELD_DELIMITER=,
FIELD_DELIMITER=,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[examplecsv]
CHARSET=UTF-8
INDEXED_EXTRACTIONS=csv
DATETIME_CONFIG=CURRENT
FIELD_NAMES = server,ip_address,latency
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [examplecsv]
    CHARSET=UTF-8
    INDEXED_EXTRACTIONS=csv
    DATETIME_CONFIG=CURRENT
    CHECK_FOR_HEADER=true
    PREAMBLE_REGEX = server,ip_address,latency
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And even gone as far as this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[examplecsv]
CHARSET = UTF-8
INDEXED_EXTRACTIONS = csv
description = Comma-separated value format. Set header and other settings in "Delimited Settings"
DATETIME_CONFIG = CURRENT
LINE_BREAKER = ([\r\n]+)
NO_BINARY_CHECK = true
category = Custom
disabled = false
HEADER_FIELD_LINE_NUMBER = 1
FIELD_NAMES = server,ip_address,latency
PREAMBLE_REGEX = server,ip_address,latency
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've tried every sensible suggestion and combination of the above but each time it indexes the first line as an event, and it's really bugging me now! I guess I'm doing something obviously wrong.&lt;/P&gt;

&lt;P&gt;For completeness, here is my inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
host = test-sensor
[monitor:///home/pi/SplunkFiles/examplefile.csv]
index=main
sourcetype=examplecsv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Props.conf and inputs.conf are both on the UFW and if I run the following command the conf appears:&lt;CODE&gt;sudo ./splunk cmd btool props list --debug | grep /opt/splunkforwarder/etc/system/local/props.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Please help me!&lt;/P&gt;</description>
    <pubDate>Thu, 28 Nov 2019 11:59:21 GMT</pubDate>
    <dc:creator>krisalexroberts</dc:creator>
    <dc:date>2019-11-28T11:59:21Z</dc:date>
    <item>
      <title>Splunk UFW - Indexing Headers as Events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-UFW-Indexing-Headers-as-Events/m-p/498762#M84998</link>
      <description>&lt;P&gt;Apologies as I know this has been asked a few times, but none of the answers I have found seem to work.&lt;/P&gt;

&lt;P&gt;I have some fairly simple scripts that output 2 row CSV files, like this:&lt;/P&gt;

&lt;P&gt;examplefile.csv&lt;BR /&gt;
Server,ip_address,latency&lt;BR /&gt;
Test,192.168.0.1,10ms&lt;/P&gt;

&lt;P&gt;The script runs on a RPI and using the UFW, but when the UFW extracts the data, it extracts the top row as an event. I have literally tried everything I can think of (props.conf) - here are some of the examples I've tried&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[examplecsv]
CHARSET=UTF-8
INDEXED_EXTRACTIONS=csv
DATETIME_CONFIG=CURRENT
CHECK_FOR_HEADER=true
HEADER_FIELD_LINE_NUMBER=1
HEADER_FIELD_DELIMITER=,
FIELD_DELIMITER=,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[examplecsv]
CHARSET=UTF-8
INDEXED_EXTRACTIONS=csv
DATETIME_CONFIG=CURRENT
FIELD_NAMES = server,ip_address,latency
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [examplecsv]
    CHARSET=UTF-8
    INDEXED_EXTRACTIONS=csv
    DATETIME_CONFIG=CURRENT
    CHECK_FOR_HEADER=true
    PREAMBLE_REGEX = server,ip_address,latency
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And even gone as far as this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[examplecsv]
CHARSET = UTF-8
INDEXED_EXTRACTIONS = csv
description = Comma-separated value format. Set header and other settings in "Delimited Settings"
DATETIME_CONFIG = CURRENT
LINE_BREAKER = ([\r\n]+)
NO_BINARY_CHECK = true
category = Custom
disabled = false
HEADER_FIELD_LINE_NUMBER = 1
FIELD_NAMES = server,ip_address,latency
PREAMBLE_REGEX = server,ip_address,latency
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've tried every sensible suggestion and combination of the above but each time it indexes the first line as an event, and it's really bugging me now! I guess I'm doing something obviously wrong.&lt;/P&gt;

&lt;P&gt;For completeness, here is my inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
host = test-sensor
[monitor:///home/pi/SplunkFiles/examplefile.csv]
index=main
sourcetype=examplecsv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Props.conf and inputs.conf are both on the UFW and if I run the following command the conf appears:&lt;CODE&gt;sudo ./splunk cmd btool props list --debug | grep /opt/splunkforwarder/etc/system/local/props.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Please help me!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 11:59:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-UFW-Indexing-Headers-as-Events/m-p/498762#M84998</guid>
      <dc:creator>krisalexroberts</dc:creator>
      <dc:date>2019-11-28T11:59:21Z</dc:date>
    </item>
  </channel>
</rss>

