<?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: Why events is not broken down correctly in HEC raw mode? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327950#M60892</link>
    <description>&lt;P&gt;Try to setup a strict parsing rule for linebreaking for the sourcetype "pythontest"&lt;BR /&gt;
on the indexers (or heavy forwarders)&lt;/P&gt;</description>
    <pubDate>Mon, 17 Apr 2017 18:11:42 GMT</pubDate>
    <dc:creator>yannK</dc:creator>
    <dc:date>2017-04-17T18:11:42Z</dc:date>
    <item>
      <title>Why events is not broken down correctly in HEC raw mode?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327948#M60890</link>
      <description>&lt;P&gt;Hi, I'm investigating to use HEC raw mode to index some data. In my case I want to stream the data with multiple HTTP requests with a fixed channel ID, because the client never changed. My splunk server version is 6.4.3.&lt;/P&gt;

&lt;P&gt;I'm using the bellow python code to test the HEC behavior, and result is the same as using cURL or postman.&lt;BR /&gt;
    #!/usr/bin/env python&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;import requests
import uuid
import time

data = "2017-01-01T12:00:00Z, a=b\n2017-01-01T12:00:01Z, b=c\n"
headers = {"Authorization" : "Splunk EB49F64A-6487-4F87-8EFF-3209CD22CC50"}
params = {"sourcetype":"pythontest", "source": "pythontest2"}

def sendInSession():
       params.update({"channel": str(uuid.uuid4()).upper()})
       r = requests.Request('POST', 'https://dbx.splunk.dev:8088/services/collector/raw', data=data, params=params, headers=headers)

       with requests.Session() as s:
            r_p = s.prepare_request(r)
            print s.send(r_p, verify=False).content
            time.sleep(3)

            print s.send(r_p, verify=False).content
            time.sleep(3)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm using session here to reuse the same connection, and two HTTP requests were made to splunkd. Looks like the data was correctly indexed for the first request, while the events of second request were not broken up correctly.&lt;/P&gt;

&lt;P&gt;You can see the result here:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2758i0D12A0E38032ACF5/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;My question is: &lt;BR /&gt;
Why the same data results different fields breaking result in splunk if using the same channel ID? &lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 07:30:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327948#M60890</guid>
      <dc:creator>wcui_splunk</dc:creator>
      <dc:date>2017-04-14T07:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Why events is not broken down correctly in HEC raw mode?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327949#M60891</link>
      <description>&lt;P&gt;In raw mode all event breaking is going to happen at the HF receiving it. You might want to trouble shoot there especially if you are batching the data.  You could also use my python class which has this threaded.&lt;BR /&gt;
&lt;A href="https://github.com/georgestarcher/Splunk-Class-httpevent"&gt;https://github.com/georgestarcher/Splunk-Class-httpevent&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:40:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327949#M60891</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2017-04-14T15:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why events is not broken down correctly in HEC raw mode?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327950#M60892</link>
      <description>&lt;P&gt;Try to setup a strict parsing rule for linebreaking for the sourcetype "pythontest"&lt;BR /&gt;
on the indexers (or heavy forwarders)&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 18:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327950#M60892</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2017-04-17T18:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why events is not broken down correctly in HEC raw mode?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327951#M60893</link>
      <description>&lt;P&gt;Thank you. I think it's probably not the root cause, otherwise the event can not be broken correctly at first.&lt;BR /&gt;
And my testing shows:&lt;BR /&gt;
1) If I change the channel id for every HTTP request, then line breaking works correctly.&lt;BR /&gt;
2) This code just works for 6.5.3, so maybe it's a bug in 6.4.3. Anyone can confirm?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 01:38:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327951#M60893</guid>
      <dc:creator>wcui_splunk</dc:creator>
      <dc:date>2017-04-18T01:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why events is not broken down correctly in HEC raw mode?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327952#M60894</link>
      <description>&lt;P&gt;I was not able to reproduce this in v7 either.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2017 14:33:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327952#M60894</guid>
      <dc:creator>ybongart_splunk</dc:creator>
      <dc:date>2017-11-24T14:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why events is not broken down correctly in HEC raw mode?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327953#M60895</link>
      <description>&lt;P&gt;I'm using Splunk7 and I'm also having this problem&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 23:12:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-events-is-not-broken-down-correctly-in-HEC-raw-mode/m-p/327953#M60895</guid>
      <dc:creator>fabiocaldas</dc:creator>
      <dc:date>2018-02-21T23:12:37Z</dc:date>
    </item>
  </channel>
</rss>

