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!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...