splunk-sdk-python icon indicating copy to clipboard operation
splunk-sdk-python copied to clipboard

Can't set eventsource from command line in examples/submit.py

Open alexntt opened this issue 12 years ago • 1 comments

$ echo hola | ./submit.py --host my.splunk --port 8089 --username=admin --password=pwd --eventsource=foo my.index Traceback (most recent call last): File "./submit.py", line 83, in main(sys.argv[1:]) File "./submit.py", line 59, in main {'eventhost':'host'}, 'source', 'sourcetype') File "./../utils/init.py", line 93, in dslice if value.has_key(arg): result[arg] KeyError: 'source'

https://github.com/ntteurope/splunk-sdk-python/commit/86a58fc14876c1c1a0d952d9c0ce39a21e62444c seems to fix the problem, but I'm not sure it's very correct...

alexntt avatar May 28 '14 16:05 alexntt

Hi @alexntt, thanks for reporting this! I've just pushed a fix to the develop branch and we'll have it out with the next release.

I tested out your use case with the following on my machine and everything worked as expected:

echo hola | ./submit.py --host localhost --port 8089 --username=admin --password=changeme --eventsource=foo main --sourcetype=yeah

shakeelmohamed avatar Nov 14 '14 01:11 shakeelmohamed