<?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: Data Not Getting Extracted Correctly as per CSV in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Data-Not-Getting-Extracted-Correctly-as-per-CSV/m-p/436581#M7927</link>
    <description>&lt;P&gt;@anandhalagarasan &lt;/P&gt;

&lt;P&gt;Didn't get you? Do you want to extract that files as it shows in csv like command delimiter? &lt;/P&gt;</description>
    <pubDate>Wed, 30 Jan 2019 06:25:37 GMT</pubDate>
    <dc:creator>vishaltaneja070</dc:creator>
    <dc:date>2019-01-30T06:25:37Z</dc:date>
    <item>
      <title>Data Not Getting Extracted Correctly as per CSV</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Data-Not-Getting-Extracted-Correctly-as-per-CSV/m-p/436580#M7926</link>
      <description>&lt;P&gt;We got an requirement to ingest a CSV file from a client machine. And in that CSV file we have headers in place as well. Headers are as mentioned something like that below:&lt;/P&gt;

&lt;P&gt;Received          SenderAddress        RecipientAddress   Subject          Status    FromIP  Size    MessageId&lt;BR /&gt;
1/30/2019 4:29   &lt;A href="mailto:xxxx@gmail.com"&gt;xxxx@gmail.com&lt;/A&gt;       &lt;A href="mailto:yyyy@gmail.com"&gt;yyyy@gmail.com&lt;/A&gt;    Test Message  Delivered 1.x.x.x     1234       xxx.gmail.com&lt;/P&gt;

&lt;P&gt;So I have written the inputs.conf as below:&lt;/P&gt;

&lt;P&gt;[monitor://X:\Test*.csv]&lt;BR /&gt;
index = test&lt;BR /&gt;
sourcetype = test_logs&lt;BR /&gt;
crcSalt = &lt;BR /&gt;
initCrcLength = 4999&lt;BR /&gt;
disabled = 0&lt;/P&gt;

&lt;P&gt;And have ingested the same into Splunk but the logs are getting extracted as in excel. So should we need to place any props and transforms if yes what would be the props and transforms.conf  and where should i need to place the props and transforms as well.&lt;/P&gt;

&lt;P&gt;Also the log file is not upated delay in Splunk as well. Actually new logs are already there in client machine but still its not reached Splunk as well.&lt;/P&gt;

&lt;P&gt;So kindly help on this request.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2019 04:53:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Data-Not-Getting-Extracted-Correctly-as-per-CSV/m-p/436580#M7926</guid>
      <dc:creator>anandhalagarasa</dc:creator>
      <dc:date>2019-01-30T04:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Data Not Getting Extracted Correctly as per CSV</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Data-Not-Getting-Extracted-Correctly-as-per-CSV/m-p/436581#M7927</link>
      <description>&lt;P&gt;@anandhalagarasan &lt;/P&gt;

&lt;P&gt;Didn't get you? Do you want to extract that files as it shows in csv like command delimiter? &lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2019 06:25:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Data-Not-Getting-Extracted-Correctly-as-per-CSV/m-p/436581#M7927</guid>
      <dc:creator>vishaltaneja070</dc:creator>
      <dc:date>2019-01-30T06:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Data Not Getting Extracted Correctly as per CSV</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Data-Not-Getting-Extracted-Correctly-as-per-CSV/m-p/436582#M7928</link>
      <description>&lt;P&gt;You have to place a props.conf file on the indexing side, defining your sourcetype &lt;CODE&gt;test_logs&lt;/CODE&gt; and assigning the CSV indexed extractions here. Otherwise Splunk won't be able to identify a header and assign the field extractions correctly.&lt;/P&gt;

&lt;P&gt;See Docs for reference: &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.3/Data/Extractfieldsfromfileswithstructureddata"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.3/Data/Extractfieldsfromfileswithstructureddata&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you don't want to use indexed extractions, you can still place a props.conf on the search head and assign a search-time extraction there.&lt;/P&gt;

&lt;P&gt;In regards of the logs not being updated - try to set a correct timestamp extraction stanza in your props. This should help Splunk to identify the timestamps correctly. Also, I do not see the need to use the crcSalt setting here. This should not be neccessary in this case.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2019 09:06:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Data-Not-Getting-Extracted-Correctly-as-per-CSV/m-p/436582#M7928</guid>
      <dc:creator>DMohn</dc:creator>
      <dc:date>2019-01-30T09:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Data Not Getting Extracted Correctly as per CSV</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Data-Not-Getting-Extracted-Correctly-as-per-CSV/m-p/436583#M7929</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/45059"&gt;@anandhalagarasa&lt;/a&gt;n &lt;BR /&gt;
Try using sourcetype = csv  in inputs.conf , splunk will take first line as header and automatically extract fields.&lt;/P&gt;

&lt;P&gt;If you want to use custom sourcetype,define it in props.conf and place it in the $SPLUNK_HOME/etc/apps//local/  or $SPLUNK_HOME/etc/system/local&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[test_logs]
INDEXED_EXTRACTIONS = CSV
HEADER_FIELD_LINE_NUMBER=1
FIELD_DELIMITER=,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/tsti.csv]
index = new
sourcetype = test_logs
disabled = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can you explain what does it mean when you say "the logs are getting extracted as in excel."?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:02:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Data-Not-Getting-Extracted-Correctly-as-per-CSV/m-p/436583#M7929</guid>
      <dc:creator>ashajambagi</dc:creator>
      <dc:date>2020-09-29T23:02:05Z</dc:date>
    </item>
  </channel>
</rss>

