<?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: Error Connecting to HTTP Event Collector in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Error-Connecting-to-HTTP-Event-Collector/m-p/339942#M62721</link>
    <description>&lt;P&gt;Once you create your Splunk instance, here is the curl command I used that works. I'm assuming that this is your localhost. &lt;/P&gt;

&lt;P&gt;curl -k  &lt;A href="http://localhost:8088/services/collector"&gt;http://localhost:8088/services/collector&lt;/A&gt; -H "Authorization:Splunk ENTER YOUR TOKEN VALUE" -d '{"sourcetype": "mysourcetype", "event":"Hello, World!"}'&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2019 05:54:14 GMT</pubDate>
    <dc:creator>vkannampuzha</dc:creator>
    <dc:date>2019-05-13T05:54:14Z</dc:date>
    <item>
      <title>Error Connecting to HTTP Event Collector</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Error-Connecting-to-HTTP-Event-Collector/m-p/339939#M62718</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I sign up for splunk free cloud trial instance and created the HTTP Event Collector as per link here&lt;/P&gt;

&lt;P&gt;Link - &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE7F"&gt;http://dev.splunk.com/view/event-collector/SP-CAAAE7F&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;When I try to call following HEC curl from postman, I am unable to connect and do not get any response&lt;/P&gt;

&lt;P&gt;curl -k &lt;A href="https://:8088/services/collector" target="test_blank"&gt;https://:8088/services/collector&lt;/A&gt; -H 'Authorization: Splunk ' -d '{"sourcetype": "mysourcetype", "event":"Hello, World!"}'&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 16:01:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Error-Connecting-to-HTTP-Event-Collector/m-p/339939#M62718</guid>
      <dc:creator>jinesh_thakkar</dc:creator>
      <dc:date>2017-10-31T16:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to HTTP Event Collector</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Error-Connecting-to-HTTP-Event-Collector/m-p/339940#M62719</link>
      <description>&lt;P&gt;your curl command must contain the hostname or IP address&lt;BR /&gt;
curl -k &lt;A href="https://yourhostname:8088/services/collector"&gt;https://yourhostname:8088/services/collector&lt;/A&gt; ...&lt;/P&gt;

&lt;P&gt;or perhaps you can try below curl command:&lt;BR /&gt;
curl -k -u "userID:TOKEN" "&lt;A href="https://your_server_name:8088/services/collector/event"&gt;https://your_server_name:8088/services/collector/event&lt;/A&gt;" -d '{"event": "Hello, world!"}'&lt;BR /&gt;
 if works well you would see below response&lt;BR /&gt;
{"text":"Success","code":0}&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 20:10:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Error-Connecting-to-HTTP-Event-Collector/m-p/339940#M62719</guid>
      <dc:creator>preotesoiu</dc:creator>
      <dc:date>2017-10-31T20:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to HTTP Event Collector</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Error-Connecting-to-HTTP-Event-Collector/m-p/339941#M62720</link>
      <description>&lt;P&gt;also I believe the path is a bit different for splunk cloud:&lt;/P&gt;

&lt;P&gt;When creating requests to Splunk Cloud, you must add a prefix to the URI of the hostname according to your subscription. For self-service Splunk Cloud plans, pre-pend the hostname with input-. For all other Splunk Cloud plans, pre-pend the hostname with http-inputs-. In the previous example, the cURL statement would look like the following for self-service Splunk Cloud instances:&lt;BR /&gt;
curl -k &lt;A href="https://input-:8088/services/collector"&gt;https://input-:8088/services/collector&lt;/A&gt; -H 'Authorization: Splunk ' -d '{"event":"Hello, World!"}' &lt;/P&gt;

&lt;P&gt;And for all other Splunk Cloud instances:&lt;BR /&gt;
curl -k &lt;A href="https://http-inputs-:8088/services/collector"&gt;https://http-inputs-:8088/services/collector&lt;/A&gt; -H 'Authorization: Splunk ' -d '{"event":"Hello, World!"}' &lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 20:14:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Error-Connecting-to-HTTP-Event-Collector/m-p/339941#M62720</guid>
      <dc:creator>preotesoiu</dc:creator>
      <dc:date>2017-10-31T20:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to HTTP Event Collector</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Error-Connecting-to-HTTP-Event-Collector/m-p/339942#M62721</link>
      <description>&lt;P&gt;Once you create your Splunk instance, here is the curl command I used that works. I'm assuming that this is your localhost. &lt;/P&gt;

&lt;P&gt;curl -k  &lt;A href="http://localhost:8088/services/collector"&gt;http://localhost:8088/services/collector&lt;/A&gt; -H "Authorization:Splunk ENTER YOUR TOKEN VALUE" -d '{"sourcetype": "mysourcetype", "event":"Hello, World!"}'&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 05:54:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Error-Connecting-to-HTTP-Event-Collector/m-p/339942#M62721</guid>
      <dc:creator>vkannampuzha</dc:creator>
      <dc:date>2019-05-13T05:54:14Z</dc:date>
    </item>
  </channel>
</rss>

