Hi everyone,
I have created a custom command in Python that needs a parameter, which is one of the fields of the search.
The script is as the following:
import splunk.Intersplunk
def foofunct(text):
output = //Doing something with text
return output
keywords, options = splunk.Intersplunk.getKeywordsAndOptions()
results,unused1,unused2 = splunk.Intersplunk.getOrganizedResults()
for result in results:
result["foo"] = foofunct(keywords)
splunk.Intersplunk.outputResults(results)
When I insert the parameter directly in the tests, it works perfectly, but when I put the name of the field, it doesn't take the value of the field, it takes the name of the field as a parameter.
Is there any way to pass the value of the field to the script as a parameter?
Thanks for all.
Regards
... View more