<?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: HTTP Event Collector: Is it possible to send multiple events in one API call? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254290#M48827</link>
    <description>&lt;P&gt;I also just updated the python code in the repo to add raw input support for Splunk v6.4+.&lt;/P&gt;</description>
    <pubDate>Sun, 16 Oct 2016 13:43:39 GMT</pubDate>
    <dc:creator>starcher</dc:creator>
    <dc:date>2016-10-16T13:43:39Z</dc:date>
    <item>
      <title>HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254287#M48824</link>
      <description>&lt;P&gt;In HTTP Event Collector, is it possible to send multiple events in one API call? I tried setting line break properties in props.conf, but unfortunately that did not help. Here's what my props.conf look like now:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [host::localhost]
 SHOULD_LINEMERGE = false
 LINE_BREAKER = \"event
 #TIME_PREFIX = sstime\"\:
 #MAX_TIMESTAMP_LOOKAHEAD = 10
 #TIME_FORMAT = %s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here's my curl call as an example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl &lt;A href="http://example.com:8088/services/collector/raw?channel=HIDDENC0-FCH1-46HE-96HA-HIDDENFBC4AB" target="test_blank"&gt;http://example.com:8088/services/collector/raw?channel=HIDDENC0-FCH1-46HE-96HA-HIDDENFBC4AB&lt;/A&gt; -H 'Authorization: Splunk HIDDEN88-C2GC-4FE6-5982-B245881A8847' -d '{"event":{"host":"localhost","sourcetype":"txt","index":"b","SeqID":1,"TypeID":1,"Name":"test1","Detail":"test event1","Session":"1","Time":"2016/09/19 00:00:00"},"event":{"host":"localhost","sourcetype":"txt","index":"b","SeqID":2,"TypeID":2,"Name":"test2","Detail":"test event 2","Session":"2","Time":"2016/09/20 00:00:00"}}'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What am I doing wrong? How can I create 2 event entries in Splunk with one API call?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 22:28:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254287#M48824</guid>
      <dc:creator>vyarchak</dc:creator>
      <dc:date>2016-10-13T22:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254288#M48825</link>
      <description>&lt;P&gt;&lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE6P"&gt;http://dev.splunk.com/view/event-collector/SP-CAAAE6P&lt;/A&gt; covers the format of batch events within the HTTP event collector.&lt;/P&gt;

&lt;P&gt;Following the below examples you will not need to worry about things like LINE_BREAKER in props.conf&lt;/P&gt;

&lt;P&gt;Just ensure things like time, host, source are broken out from the event itself (so your original JSON will need some tweaking). This applies when using the &lt;A href="https://example.com:8088/services/collector/event"&gt;https://example.com:8088/services/collector/event&lt;/A&gt; endpoint not the &lt;A href="http://example.com:8088/services/collector/raw"&gt;http://example.com:8088/services/collector/raw&lt;/A&gt; endpoint.&lt;/P&gt;

&lt;P&gt;From the link......&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "time": 1437522387,
    "host": "dataserver992.example.com",
    "source": "testapp",
    "event": { 
        "message": "Something happened",
        "severity": "INFO"
    }
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To batch (from link)......&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
  "event":"event 1", 
  "time": 1447828325
}

{
  "event":"event 2", 
  "time": 1447828326
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Combining these you would have something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "time": 1437522387,
    "host": "dataserver992.example.com",
    "source": "testapp",
    "event": { 
        "message": "Something happened",
        "severity": "INFO"
    }
}

{
    "time": 1437522388,
    "host": "dataserver993.example.com",
    "source": "testapp",
    "event": { 
        "message": "Something else happened",
        "severity": "DEBUG"
    }
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Oct 2016 07:52:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254288#M48825</guid>
      <dc:creator>msivill_splunk</dc:creator>
      <dc:date>2016-10-14T07:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254289#M48826</link>
      <description>&lt;P&gt;You can see example python code with batch mode: &lt;A href="http://blogs.splunk.com/2015/12/11/http-event-collect-a-python-class/"&gt;http://blogs.splunk.com/2015/12/11/http-event-collect-a-python-class/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2016 16:25:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254289#M48826</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2016-10-15T16:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254290#M48827</link>
      <description>&lt;P&gt;I also just updated the python code in the repo to add raw input support for Splunk v6.4+.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2016 13:43:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254290#M48827</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2016-10-16T13:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254291#M48828</link>
      <description>&lt;P&gt;I'm curious why a JSON array can't be used to pass multiple events to the HTTP Event Collector. "Stacking" events isn't valid JSON, which means I have to deal with that on the sending side.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 17:57:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254291#M48828</guid>
      <dc:creator>dave_maclean</dc:creator>
      <dc:date>2017-03-01T17:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254292#M48829</link>
      <description>&lt;P&gt;You can submit batch events in a post. See example code in my answer above.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 17:59:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254292#M48829</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2017-03-01T17:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254293#M48830</link>
      <description>&lt;P&gt;I've reimplemented my own Python forwarder to batch-up the events like this, and things seem to be faster. Is there a server-side limit on the &lt;EM&gt;length&lt;/EM&gt; of the event-list, however?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 02:21:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254293#M48830</guid>
      <dc:creator>unitedmarsupial</dc:creator>
      <dc:date>2019-12-05T02:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254294#M48831</link>
      <description>&lt;P&gt;max_content_length looks like the setting you are after as defined in limits.conf - &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/Limitsconf#.5Bhttp_input.5D" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Admin/Limitsconf#.5Bhttp_input.5D&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You might want to consider making your Python code configurable to handle this in case admins have changed this limit on the Splunk server.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:15:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254294#M48831</guid>
      <dc:creator>msivill_splunk</dc:creator>
      <dc:date>2020-09-30T03:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254295#M48832</link>
      <description>&lt;P&gt;upvoting the question and downvoting the answer - since not the answer to dave.maclean's question. Why is it required to do the "stacking" hacks on the sending side instead of following the standard? &lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 06:46:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/254295#M48832</guid>
      <dc:creator>mattilehtinen</dc:creator>
      <dc:date>2020-01-10T06:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/553517#M91773</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Please, how can we construct stacked (or batched) json object events from a file's rows ?&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 13:38:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/553517#M91773</guid>
      <dc:creator>DjNaGuRo</dc:creator>
      <dc:date>2021-05-28T13:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/553615#M91785</link>
      <description>&lt;P&gt;Please &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/62395"&gt;@dave_maclean&lt;/a&gt;, how did you deal with stacked JSON objects construction ?&lt;/P&gt;&lt;P&gt;I've to construct it from the row of my file but I've faced problem with that in python such as "EOL ...", "Can't concat string with dict..."&lt;/P&gt;&lt;P&gt;Thanks in advance to anyone who can help me to resolve this issue.&lt;/P&gt;</description>
      <pubDate>Sat, 29 May 2021 07:36:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/553615#M91785</guid>
      <dc:creator>DjNaGuRo</dc:creator>
      <dc:date>2021-05-29T07:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Is it possible to send multiple events in one API call?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/633782#M108509</link>
      <description>&lt;P&gt;the link to the python is broken. Would you happen to have an updated link?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 18:00:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Is-it-possible-to-send-multiple-events-in/m-p/633782#M108509</guid>
      <dc:creator>dasaed</dc:creator>
      <dc:date>2023-03-08T18:00:23Z</dc:date>
    </item>
  </channel>
</rss>

