Add exception handling in your script and check if any error occurring in the splunkd logs.
import sys
import os
import requests
import json
def test():
data = { 'name':'username', 'password':'password', 'roles':'user'}
response = requests.post('https://mng_uri:8089/services/authentication/users', data=data, auth=('admin','passme'))
response.raise_for_status()
if __name__ == "__main__":
try:
test()
except Exception as e:
print >> sys.stderr, "ERROR Unexpected error: %s" % e
sys.exit(1)
... View more