All,
I've got this code
#########################################################################
# Imports for Splunk
#########################################################################
i...
See more...
All,
I've got this code
#########################################################################
# Imports for Splunk
#########################################################################
import splunk.entity as entity
try:
from splunk.clilib.bundle_paths import make_splunkhome_path
except ImportError:
from splunkappserver.mrsparkle.lib.util import make_splunkhome_path
########################################
# get our config data returns a dict
########################################
def getConfig(sessionKey,nameSpace):
try:
resp = entity.getEntities(['properties', 'verodin', 'verodin'], namespace=nameSpace, owner='nobody', sessionKey=sessionKey)
except Exception, e:
raise Exception(" Could not get %s credentials from splunk. Error %s" % (nameSpace, str(e)))
config = {}
for k, v in resp.items():
config[str(k)] = str(v)
return config
Another member of the team got it working. I'm trying to create new code but I don't understand what the getEntities first argument is beyond a list. I've seen examples with [admin, password] but I haven't found a good example or documentation explaining how this works. Any idea?
TIA, Joe