<?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 Add-On calling HEC in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Add-On-calling-HEC/m-p/405828#M72011</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to collect data via a REST API and store it as a metric using the add-on builder and python. Unfortunately you cannot seem to store metric data in Splunk using the default commands available to you and it seems as though you have to go via the HEC which is fine as I can do that... However when it comes to calling the HEC directly, I get a 403 error which seems to indicate its an authorization issue.&lt;/P&gt;

&lt;P&gt;I have tested the message I am sending through in curl and it's ingesting fine which makes me think there may be an issue with the SSL certs. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Python Code&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;method="POST"
url='http://localhost:8088/services/collector'
hec_header={'Authorization': 'Splunk 2ec63ec6-fa0f-499a-8ecf-05b6c0eb4574'}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Response&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ERROR403 Client Error: Forbidden for url: &lt;A href="http://localhost:8088/services/collector" target="test_blank"&gt;http://localhost:8088/services/collector&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any assistance would be much appreciated&lt;/P&gt;

&lt;P&gt;Tom&lt;/P&gt;</description>
    <pubDate>Fri, 22 Feb 2019 16:54:32 GMT</pubDate>
    <dc:creator>twesty</dc:creator>
    <dc:date>2019-02-22T16:54:32Z</dc:date>
    <item>
      <title>Add-On calling HEC</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Add-On-calling-HEC/m-p/405828#M72011</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to collect data via a REST API and store it as a metric using the add-on builder and python. Unfortunately you cannot seem to store metric data in Splunk using the default commands available to you and it seems as though you have to go via the HEC which is fine as I can do that... However when it comes to calling the HEC directly, I get a 403 error which seems to indicate its an authorization issue.&lt;/P&gt;

&lt;P&gt;I have tested the message I am sending through in curl and it's ingesting fine which makes me think there may be an issue with the SSL certs. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Python Code&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;method="POST"
url='http://localhost:8088/services/collector'
hec_header={'Authorization': 'Splunk 2ec63ec6-fa0f-499a-8ecf-05b6c0eb4574'}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Response&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ERROR403 Client Error: Forbidden for url: &lt;A href="http://localhost:8088/services/collector" target="test_blank"&gt;http://localhost:8088/services/collector&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any assistance would be much appreciated&lt;/P&gt;

&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 16:54:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Add-On-calling-HEC/m-p/405828#M72011</guid>
      <dc:creator>twesty</dc:creator>
      <dc:date>2019-02-22T16:54:32Z</dc:date>
    </item>
  </channel>
</rss>

