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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...