<?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: Props.Conf Field Extraction for a .CSV in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182387#M36567</link>
    <description>&lt;P&gt;Thank you for the help.  The weird thing about this CSV is that there are commas in the date time sections, so the data is indexing but its all over the place.  I think I'll do some event line breaking and try to re-format the time and I'll see how it goes.  Thanks again!&lt;/P&gt;</description>
    <pubDate>Thu, 13 Mar 2014 12:11:08 GMT</pubDate>
    <dc:creator>_gkollias</dc:creator>
    <dc:date>2014-03-13T12:11:08Z</dc:date>
    <item>
      <title>Props.Conf Field Extraction for a .CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182379#M36559</link>
      <description>&lt;P&gt;I'm trying to create a props.conf for a .CSV, but I am unsuccessful and believe its because of the field extraction.  The format below follows the same data pattern as these headers listed:&lt;/P&gt;

&lt;P&gt;TPCode,,"date",,"time",,PurchaseOrderNumber,,"OrderNumber",,,CompanyNumber,,Division,,"CustomerNumber",,BillToSeq,,ShipToID&lt;/P&gt;

&lt;P&gt;Here is my props:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[contract_sunrise]
SHOULD_LINEMERGE = false
TIME_PREFIX = ^
TIME_FORMAT = %Y-%m-%d_%H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 40
EXTRACT-contract_sunrise = ^.+\s+(?&amp;lt;TPCode&amp;gt;[^\s]+)\s+(?&amp;lt;"date"&amp;gt;[^\s]+)\s+(?&amp;lt;"time"&amp;gt;[^\s]+)\s+(?&amp;lt;PurchaseOrderNumber&amp;gt;[^\s]+)\s+(?&amp;lt;"OrderNumber"&amp;gt;[^\s]+)\s+(?&amp;lt;CompanyNumber&amp;gt;[^\s]+)\s+(?&amp;lt;Division&amp;gt;[^\s]+)\s+(?&amp;lt;"CustomerNumber"&amp;gt;[^\s]+)\s+)\s+(?&amp;lt;BillToSeq&amp;gt;[^\s]+)\s+(?&amp;lt;ShipToID&amp;gt;[^\s]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The various "," were automatically added as separators, but if I could forward the data with just the headers and its corresponding data that would be best.  Any suggestions on the EXTRACT portion would be greatly appreciated.  Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 19:37:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182379#M36559</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2014-03-11T19:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Props.Conf Field Extraction for a .CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182380#M36560</link>
      <description>&lt;P&gt;I would first of all recommend a REPORT-based extraction with DELIMS and FIELDS for this csv.&lt;BR /&gt;
Assuming that the sample line reflects the actual events, and double (or triple) commas indicate some field you did not intend to extract. So with DELIMS you specify the delimiter between fields, and with FIELDS you specify the field names in the order they appear (all of them).&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[contract_sunrise]
REPORT-extract_sunrise = sunrise_fields
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sunrise_fields]
DELIMS = ","
FIELDS = TPCode, field2, date, field4, time, field6, PurchaseOrderNumber, field8, OrderNumber, field10, field11 etc etc.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 22:07:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182380#M36560</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-03-11T22:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Props.Conf Field Extraction for a .CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182381#M36561</link>
      <description>&lt;P&gt;Hi Kristian, the ",," is actually in the CSV file - I assumed they acted as separators. So field2, field4, field6 - they represent the various commas? I will try this out now - Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 12:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182381#M36561</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2014-03-12T12:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Props.Conf Field Extraction for a .CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182382#M36562</link>
      <description>&lt;P&gt;I'm not seeing any data coming in.  One thing I forgot to mention was the format I listed are also the headers.  The data follows the same pattern of the headers listed above.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 13:08:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182382#M36562</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2014-03-12T13:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Props.Conf Field Extraction for a .CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182383#M36563</link>
      <description>&lt;P&gt;Well, 'csv' means 'comma separated values', so naturally they would be separators. However, two commas in a row would indicate an empty position. It's hard to tell for sure without seeing your actual events. You might have a screwed up file format. You can get rid of the header row with the techniques used for &lt;CODE&gt;nullQueue&lt;/CODE&gt;ing or perhaps through a SEDCMD. &lt;/P&gt;

&lt;P&gt;However, if you are 'not seeing any data coming in' it could indicate other problems. Faulty timestamp parsing, flawed inputs.conf or index permissions issues spring to mind as possible culprits.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 17:08:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182383#M36563</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-03-12T17:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Props.Conf Field Extraction for a .CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182384#M36564</link>
      <description>&lt;P&gt;Any errors in the splunkd log?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 17:15:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182384#M36564</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-03-12T17:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Props.Conf Field Extraction for a .CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182385#M36565</link>
      <description>&lt;P&gt;I never knew what CSV stood for &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Good thinking - I would go with the first 2.  Timestamp parsing could most likely be the issue.  How could I specify that?  It seems like a monitor stanza relative to the one in my question would be best for timestamp parsing..I'm sure there is a way to modify what you've given above?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 17:31:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182385#M36565</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2014-03-12T17:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Props.Conf Field Extraction for a .CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182386#M36566</link>
      <description>&lt;P&gt;Your timestamp specification in props.conf is;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;TIME_FORMAT = %Y-%m-%d_%H:%M:%S&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;However, if you log looks like you say (i.e. as two different fields for &lt;CODE&gt;date&lt;/CODE&gt; and &lt;CODE&gt;time&lt;/CODE&gt;, that spec is wrong. &lt;/P&gt;

&lt;P&gt;Perhaps something more like;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;TIME_FORMAT = %Y-%m-%d,,%H:%M:%S&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But that all depends on how the events actually look. You should probably update your question with a few sample lines of log... &lt;/P&gt;

&lt;P&gt;If you sometimes have data in the (what looks to be) empty field between &lt;CODE&gt;date&lt;/CODE&gt; and &lt;CODE&gt;time&lt;/CODE&gt;, you might want to create a custom datetime.xml file. Or remove TIME_FORMAT and see if Splunk can fix it anyway.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 23:14:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182386#M36566</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-03-12T23:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Props.Conf Field Extraction for a .CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182387#M36567</link>
      <description>&lt;P&gt;Thank you for the help.  The weird thing about this CSV is that there are commas in the date time sections, so the data is indexing but its all over the place.  I think I'll do some event line breaking and try to re-format the time and I'll see how it goes.  Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2014 12:11:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Props-Conf-Field-Extraction-for-a-CSV/m-p/182387#M36567</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2014-03-13T12:11:08Z</dc:date>
    </item>
  </channel>
</rss>

