<?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: TCP input - tcp-raw not splitting rows by newline in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/TCP-input-tcp-raw-not-splitting-rows-by-newline/m-p/76056#M15537</link>
    <description>&lt;P&gt;Here is a screenshot of the data if that clears things up.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://i56.tinypic.com/xmmyh1.gif"&gt;http://i56.tinypic.com/xmmyh1.gif&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2011 23:37:23 GMT</pubDate>
    <dc:creator>phoenixdigital</dc:creator>
    <dc:date>2011-09-15T23:37:23Z</dc:date>
    <item>
      <title>TCP input - tcp-raw not splitting rows by newline</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TCP-input-tcp-raw-not-splitting-rows-by-newline/m-p/76055#M15536</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have written a python HTTP downloader which is pulling down multiple zip files and extracting the contents then feeding them to a TCP port on Splunk.&lt;/P&gt;

&lt;P&gt;Inside each zip are a whole bunch of csv files with the format&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;header1, header2, header3, aTimestampIwant1
data1, data2, data3, dateData1
data1, data2, data3, dateData1
etc....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now the python script is unzipping this file and creating a sourcetype based on the filename. It is also building a Splunk friendly format for Splunk to consume. This entire string is then sent to a TCP port that Splunk is listening on.&lt;/P&gt;

&lt;P&gt;Splunk recieves something like this in the one connection&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;***SPLUNK*** host=myhost, source=theOriginalFilenameFromTheZip, sourcetype=extractedFromFilename\r\n
header1=data1, header2=data2, header3=data3, aTimestampIwant1=dateData1\r\n
header1=data1, header2=data2, header3=data3, aTimestampIwant1=dateData1\r\n
etc.....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;now when I look at the data in Splunk it has the correct source and sourcetype.... but..&lt;/P&gt;

&lt;P&gt;There are a few things that I need to resolve.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Each 'event' in Splunk is the entire message of all rows of data. They are not split by the newlines I am passing through the stream&lt;/LI&gt;
&lt;LI&gt;It appears dates/times are not being translated when a column is of a common date type.&lt;/LI&gt;
&lt;LI&gt;more importantly the timestamp(_time) is not being found and it is using the time the data was recieved.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Now I know that some will answer create something in props.conf for each type of file. I am trying to avoid this as there are over 30 different types of files.&lt;/P&gt;

&lt;P&gt;If I can get this to work then it will allow this script to handle new file(source) types in the future should they start getting fed into the stream.&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2011 06:45:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TCP-input-tcp-raw-not-splitting-rows-by-newline/m-p/76055#M15536</guid>
      <dc:creator>phoenixdigital</dc:creator>
      <dc:date>2011-09-15T06:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: TCP input - tcp-raw not splitting rows by newline</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TCP-input-tcp-raw-not-splitting-rows-by-newline/m-p/76056#M15537</link>
      <description>&lt;P&gt;Here is a screenshot of the data if that clears things up.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://i56.tinypic.com/xmmyh1.gif"&gt;http://i56.tinypic.com/xmmyh1.gif&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2011 23:37:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TCP-input-tcp-raw-not-splitting-rows-by-newline/m-p/76056#M15537</guid>
      <dc:creator>phoenixdigital</dc:creator>
      <dc:date>2011-09-15T23:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: TCP input - tcp-raw not splitting rows by newline</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TCP-input-tcp-raw-not-splitting-rows-by-newline/m-p/76057#M15538</link>
      <description>&lt;P&gt;Did you manage to get a solution for this?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2016 16:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TCP-input-tcp-raw-not-splitting-rows-by-newline/m-p/76057#M15538</guid>
      <dc:creator>isaacvb</dc:creator>
      <dc:date>2016-01-11T16:55:11Z</dc:date>
    </item>
  </channel>
</rss>

