Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Need help getting basic requests.post to work for HTTP Event Collector with Python

$
0
0
OK - This is starting to frustrate me. I first tried the following command: curl -k http://10.10.XX.XX:8088/services/collector/event -H "Authorization: Splunk my_correct_token" -d '{"event": "does this thing work"}' and it works correctly and the event is received. Cool! Then I saw the following blog post on building HTTP Events with Python and while I could get the code to execute without error. I could not get the system to receive the event. Breaking down the event to its most basic components in Python 2.7 I wrote the following code import requests requests.post('http://10.10.XX.XX:8088/services/collector/event', headers={'Authorization': 'Splunk my_correct_token}, data = {"event": "through python -- again - does this thing work"}) print "does this thing work" And while the code runs without error I am not receiving the events in Splunk. Any ideas? Thank you.

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>