Getting Data In

Send JSON file/txt file using HEC - stuck on curl command

spharisha
New Member

Hello

Trying to send a JSON file/text file through HEC to splunk. Getting stuck while adding

"-d @data.json" in curl command. I have created a new token, enabled it, sent sample data like Hello world, and works. But, not sure how to send txt/json file using curl

Thanks
SP

0 Karma

PowerPacked
Builder

Hi @spharisha

I think you are trying to send the whole file using curl command,

& i feel like you should consider it by configuring inputs and send it to HEC index on indexer.

Thanks

0 Karma

yannK
Splunk Employee
Splunk Employee

example :

   curl -k https:/myserver:8088/services/collector/event -H 'Authorization: Splunk 0a211f9a-1a27-471b-b0e0-5a5bd2d9a88c' -d '{"event": "hello world"}'
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 ...