<?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: How to import this kind of CSV data? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356104#M65043</link>
    <description>&lt;P&gt;I'm already aware of that, and it's not the issue.&lt;/P&gt;</description>
    <pubDate>Tue, 08 May 2018 07:35:18 GMT</pubDate>
    <dc:creator>nicolociraci</dc:creator>
    <dc:date>2018-05-08T07:35:18Z</dc:date>
    <item>
      <title>How to import this kind of CSV data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356097#M65036</link>
      <description>&lt;P&gt;I've a CSV file like the one reported below, and on my UF I've added the following props but on the search heads the events are not parsed.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
FIELD_HEADER_REGEX=#LineAboveHeader\n(.*)
FIELD_DELIMITER=,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;CSV example&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#LineAboveHeader
"Header1","Header2","Header3","Header4"
"Field1", "Field2", "Field3", "Field4"
"Field1", "Field2", "Field3", "Field4"
"Field1", "Field2", "Field3", "Field4"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I would like is that splunk sees the headers and import the field names, and then create an event for each line.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 15:19:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356097#M65036</guid>
      <dc:creator>nicolociraci</dc:creator>
      <dc:date>2018-04-23T15:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to import this kind of CSV data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356098#M65037</link>
      <description>&lt;P&gt;add props.conf on indexer not on universal forwarder.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 16:54:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356098#M65037</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-04-23T16:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to import this kind of CSV data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356099#M65038</link>
      <description>&lt;P&gt;Does not work. &lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 07:17:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356099#M65038</guid>
      <dc:creator>nicolociraci</dc:creator>
      <dc:date>2018-04-24T07:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to import this kind of CSV data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356100#M65039</link>
      <description>&lt;P&gt;is this CSV :&lt;BR /&gt;
1. A "one-off reference data" (lookup) ? OR &lt;BR /&gt;
2.  A  streaming data i.e  the "#&lt;EM&gt;lineaboveHeader&lt;/EM&gt;" happens only one time for entire data ? OR&lt;BR /&gt;
3. A batch file, so the header happens every-time per file?&lt;/P&gt;

&lt;P&gt;Your above logic works only if its (3)&lt;BR /&gt;
Have a try in your &lt;STRONG&gt;Heavy Forwarder or Indexers&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
 FIELD_HEADER_REGEX=^\s*("Header1.*)
 PREAMBLE_REGEX = ^#LineAboveHeader.*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Apr 2018 08:28:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356100#M65039</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2018-04-24T08:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to import this kind of CSV data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356101#M65040</link>
      <description>&lt;P&gt;So, my comment went into review and never get posted. By the way, I'm in option 3 but your solution is not working. Actually no solution is working, it seems like Splunk is ignoring my config. Where should I put the config? For now I've only tried in the Indexer.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 07:09:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356101#M65040</guid>
      <dc:creator>nicolociraci</dc:creator>
      <dc:date>2018-05-02T07:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to import this kind of CSV data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356102#M65041</link>
      <description>&lt;P&gt;can you please put you actual props.conf &amp;amp; transforms.conf file with the real data. Possibly we can work out and provide an answer. Is your installation an indexer cluster?&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 20:11:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356102#M65041</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2018-05-05T20:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to import this kind of CSV data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356103#M65042</link>
      <description>&lt;P&gt;The configurations need to be deployed to the Indexers (all of them) and you splunk instances there restarted (all of them) and then only verify against events that have been indexed AFTER the restarts by adding &lt;CODE&gt;_index_earliest=&lt;/CODE&gt; to your search.&lt;/P&gt;</description>
      <pubDate>Sun, 06 May 2018 18:51:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356103#M65042</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-05-06T18:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to import this kind of CSV data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356104#M65043</link>
      <description>&lt;P&gt;I'm already aware of that, and it's not the issue.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 07:35:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356104#M65043</guid>
      <dc:creator>nicolociraci</dc:creator>
      <dc:date>2018-05-08T07:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to import this kind of CSV data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356105#M65044</link>
      <description>&lt;P&gt;I can't post the real data, but I will post the props.conf (with thelatest configuration) and censored data. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[MailboxAuditDisabled]
FIELD_HEADER_REGEX = ^\s*("Name.*)
PREAMBLE_REGEX = ^#TYPE.*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Data&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#TYPE Selected.Microsoft.Exchange.Data.Directory.Management.Mailbox
"Name","Alias","ServerName","AuditEnabled"
"foo","bar","server-foo","False"
"foobar","bar2","server-foo2","False"
"foofoo","barbar","server-foo","False"
"foo3","bar2","server-foo3","False"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that the data is splitted in multiple events. In my installation I've two indexer (the configuration is deployed on both of them).&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 07:41:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356105#M65044</guid>
      <dc:creator>nicolociraci</dc:creator>
      <dc:date>2018-05-08T07:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to import this kind of CSV data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356106#M65045</link>
      <description>&lt;P&gt;Below Configuration worked correctly&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# inputs.conf
[monitor:///tmp/csv/*.csv]
sourcetype=MailboxAuditDisabled
index=my_index

 # props.conf
[MailboxAuditDisabled]
FIELD_HEADER_REGEX=^\s*("Name.*)
PREAMBLE_REGEX = ^#TYPE.*
FIELD_DELIMITER=,
FIELD_QUOTE="
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample data kept in  &lt;CODE&gt;/tmp/csv/sample1.csv&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#TYPE Selected.Micro.EX.data.xyz.mailbox
"Name","Alias","Servername","AuditEnabled"
"emp1","empA1","server1","false"
"emp2","empA2","server2","true"
"emp3","empA3","server3","false"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The props.conf needs to be in Indexers &amp;amp;&amp;amp; Heavy Forwarders if you are using them&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 10:39:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-import-this-kind-of-CSV-data/m-p/356106#M65045</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2018-05-09T10:39:21Z</dc:date>
    </item>
  </channel>
</rss>

