Splunk Dev

I am beginner at python programming so asking your help to write short simple script.

jjoshi6
Explorer

My manager asked to send one file named "data.json" to splunk using python language and HTTP event collector. I tried to do it but I think as I am beginner in python, I don't know how to write the whole script that will do my work. Can anyone help me with this?

Labels (3)
0 Karma

inventsekar
SplunkTrust
SplunkTrust

Hi @jjoshi6 .. you seems to be newbie to both python and splunk.. so its a big task i would say to a newbie. 

so, lets do this step by step... 

1. have you configured data ingestion from a UF to indexer? 

2. have you configured some "scripted inputs" from a UF to indexer?

3. have you configured a basic HEC data input to indexer..

 

once you done these you will feel more comfortable and then you can check the github page which @richgalloway given above. hope its clear, all the best to your splunk and python journey!

 

As a new member, you may not know about karma points,.. karma points will show your appreciation. thanks!

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

richgalloway
SplunkTrust
SplunkTrust

See if this helps https://github.com/georgestarcher/Splunk-Class-httpevent

---
If this reply helps you, Karma would be appreciated.

jjoshi6
Explorer

Can you please share if you have any source code which I can view it as a reference?

It would be really helpful if you can share the script where I can enter the file location, URL, and token and run the file to make it work as I am really struggling with my time and work. Please.

I would really appreciate your help and I will be happy to provide karma.

Thanks in advance.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...