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

Inputs does not support adding oneshot

Open parhamfh opened this issue 15 years ago • 3 comments

Hi guys,

In the INPUT_KINDMAP oneshot is not listed. The preferred way seems to be uploading through an index? I see why you could upload to an index but since you through REST can also add an oneshot input, shouldn't that functionality also exist in the SDK?

Thanks!

parhamfh avatar Nov 03 '11 17:11 parhamfh

You are right. Let me explain a bit of the reasoning: there are several endpoints, like data/inputs/oneshot, receivers/simple, etc, that more or less operate on an index, rather than an input. So we defined the upload function on the Index object rather than as a generic input.

So if you wanted to create a oneshot input, you could just create an instance of the Index class with the name of the index you want it uploaded to, and then use the upload function.

However, the shortcoming is that you must always specify an index, while the data/inputs/oneshot does not require one (it will default to the main index none is specified). So I think it is reasonable for us to add this in the next version - I will look into it.

itay avatar Nov 03 '11 18:11 itay

Hello guys, is there a JIRA for this one?

parhamfh avatar Oct 28 '12 11:10 parhamfh

DVPL-1185

madhadron avatar Oct 30 '12 16:10 madhadron