Getting Data In

Send csv data to Http Event Collector

learnkhru
New Member

Hi,I want to send a csv pure data file as it is to splunk via Http Event Collector. How can I do it? Can I send it to /raw or /event or something?

How to make splunk to parse it properly?

Thanks

0 Karma

thambisetty
SplunkTrust
SplunkTrust

@learnkhru 

You need to have a program which will call Splunk HEC URL and post data which you would like to forward to Splunk. you can not forward/post csv file just with csv and having SPLUNK HEC endpoint without using any programming language.

There are other options to read files using Splunk. No need to use Splunk HEC.

————————————
If this helps, give a like below.
0 Karma

to4kawa
Ultra Champion

dl_json.py

import requests
import json
headers = {'accept': 'application/json', 'content-type': 'application/json'}
url = 'https://www3.nhk.or.jp/news/special/coronavirus/data/47patients-data.json'
response=requests.get(url,headers=headers)
json_obj = response.json()
f = open("output.json","w")
json.dump(json_obj, f)

It's easier to download in python like this
The csv can be parsed.

0 Karma

learnkhru
New Member

No, I meant to send a csv file to splunk's HEC

The actuall data itself in the file with the commas and everything...

Is it possible?

0 Karma
Get Updates on the Splunk Community!

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...