Getting Data In

HTTP collector , pass the auth token within the URL

rsokolova
Path Finder

Thanks in advance.

The idea is to receive JSON message from Twilio with the SMS response. But in the Twilio's settings I cannot pass a header value for the AUTH token, which is making the communication to fail. Is there any other way I can achieve this ?

Using curl I can post a message successfully to the HEC (HTTP collector).
curl -k https://hec.example.com:8088/services/collector/event -H "Authorization: Splunk B5A79AAD-D822-46CC-80D1-819F80D7BFB0" -d '{"event": "hello world"}'
{"text": "Success", "code": 0}

Expecting to have something like if it even exists.
https://hec.example.com:8088/services/collector/event?AUTH=B5A79AAD-D822-46CC-80D1-819F80D7BFB0

Thanks again.

0 Karma
1 Solution

rsokolova
Path Finder

The answer for this was easier than I though. You can send a post message with basic auth, see below.

https://splunk:@hec.example.com:8088/services/collector/event

View solution in original post

0 Karma

rsokolova
Path Finder

The answer for this was easier than I though. You can send a post message with basic auth, see below.

https://splunk:@hec.example.com:8088/services/collector/event

0 Karma

proylea
Contributor

Hi
I'm wondering if you can post a little more detail about this, I am needing to send a json payload to Splunk from a mobile app, and the devs want a 1 line API/URL with authentication to send the event, did you get this sort of thing working.
I see from your original question that you were sending a test event with basic auth, I need to do this with a Splunk HEC token and can't seem to get the syntax right, are you able to help with what the syntax might look like?

Kind Regards
Peter

0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...