I'm trying to make a custom Command using python but I'm running into some errors.
"Error in 'script': Getinfo probe failed for external search command 'testscript'"
For the moment I'm just trying to figure out how to get any script to work, which is proving more difficult that I anticipated.
How I created the app and command:
So, I created a test app called "TestCommands" using the sample_app template.
Then, I created a dummy script called "testcommand.py" in the bin folder within that app.
import sys
import csv
import splunk.Intersplunk
while True:
line = sys.stdin.readline()
if not line.strip(): break
reader = csv.DictReader( sys.stdin )
headers = reader.fieldnames
writer = csv.DictWriter( sys.stdout, headers )
writer.writer.writerows( headers )
(From what I understand, this should just output the headers back to splunk)
I also have a commands.conf located in the default and local folders of the apps. (The directions were unclear as to which of these i should put it in) Both of those contain the same information:
[testscript]
filename = testcommand.py
streaming = true
supports_getinfo=true
maxinputs = 0
My Search is as follows:
source="pathname\dummydata.csv" | testscript"
I have checked that the data source isn't the problem.
Thanks for the help.
... View more