I have a custom script in which I have to perform different actions based on the user who invoked it. The script is a python script. Is there a way I can collect the logged-in user name?
I tried the below, which always gives me a None.
results,dummyresults,settings = splunk.Intersplunk.getOrganizedResults()
owner = settings.get("owner", None)
Any other approach or clue would be very much helpful. Thanks in advance.
Check out this post:
http://answers.splunk.com/answers/23504/determine-currently-logged-in-username