Getting Data In

Add-On calling HEC

twesty
Path Finder

Hi,

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.

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.

Python Code

method="POST"
url='http://localhost:8088/services/collector'
hec_header={'Authorization': 'Splunk 2ec63ec6-fa0f-499a-8ecf-05b6c0eb4574'}

Response

ERROR403 Client Error: Forbidden for url: http://localhost:8088/services/collector

Any assistance would be much appreciated

Tom

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...