<?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 is my HTTP event collector Indexing slowly? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-HTTP-event-collector-Indexing-slowly/m-p/407427#M72247</link>
    <description>&lt;P&gt;that definitely seems like too long, so not sure if this will help at all but it can't hurt....this is a conf session from 2017 that had some good tuning tips - may be a bit outdated now?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://conf.splunk.com/files/2017/slides/measuring-hec-performance-for-fun-and-profit.pdf"&gt;https://conf.splunk.com/files/2017/slides/measuring-hec-performance-for-fun-and-profit.pdf&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Feb 2019 01:21:21 GMT</pubDate>
    <dc:creator>maciep</dc:creator>
    <dc:date>2019-02-26T01:21:21Z</dc:date>
    <item>
      <title>Why is my HTTP event collector Indexing slowly?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-HTTP-event-collector-Indexing-slowly/m-p/407426#M72246</link>
      <description>&lt;P&gt;Fellow Splunksters,&lt;/P&gt;

&lt;P&gt;I have been able to send data to Splunk via TCP sockets for a while and never had any issues.  I switched some of our apps over to using the HTTP event collector via the Python Splunk API, so for example...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;import splunklib.client as splunk_client

service = splunk_client.connect(host='127.0.0.1', port=8089, username=&amp;lt;username&amp;gt;, password=&amp;lt;password&amp;gt;)
index = service.indexes['my_index']

index.submit(message, sourcetype='_json', host='local')
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I think it is important to note that data coming into my script running the API is MQTT data, as the data is coming (about 1 event every 2 seconds) Splunk is able to index the data just fine.  However, if the data stream is interrupted the events are stored until the connection is re-established and all the events flood to the Splunk server.  This is when it takes about 10-15 minutes to index anywhere from 150 to 300 events.  I certainly do expect some delay just not 15 minutes.  &lt;/P&gt;

&lt;P&gt;I'm wondering if anybody else has had this issue with the HTTP Event Collector?  Is there a more efficient way of indexing data so this doesn't happen?  Is a TCP socket faster than the HEC?  &lt;/P&gt;

&lt;P&gt;I am currently waiting for our IT department to allocate more resource to our Splunk server (such as RAM and CPU cores), so maybe that will help increase performance?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 17:40:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-HTTP-event-collector-Indexing-slowly/m-p/407426#M72246</guid>
      <dc:creator>amanno</dc:creator>
      <dc:date>2019-02-25T17:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my HTTP event collector Indexing slowly?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-HTTP-event-collector-Indexing-slowly/m-p/407427#M72247</link>
      <description>&lt;P&gt;that definitely seems like too long, so not sure if this will help at all but it can't hurt....this is a conf session from 2017 that had some good tuning tips - may be a bit outdated now?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://conf.splunk.com/files/2017/slides/measuring-hec-performance-for-fun-and-profit.pdf"&gt;https://conf.splunk.com/files/2017/slides/measuring-hec-performance-for-fun-and-profit.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 01:21:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-HTTP-event-collector-Indexing-slowly/m-p/407427#M72247</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2019-02-26T01:21:21Z</dc:date>
    </item>
  </channel>
</rss>

