Security

How to identify the logged in user (into splunk web) from custom python script?

Explorer

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.

0 Karma

New Member
0 Karma