While using Splunk SDK of Python, how do you get the details of the saved search that initiated the job.
I have the job sid of the jobs going on and some jobs which are done processing. I want their Saved Search name or their Saved Search ID.
Found the answer.
if,
import splunklib.client as client
services=client.connect(...)
jobs=service.jobs
for job in jobs:
job.content['label'] #Will give you the saved_search name
Found the answer.
if,
import splunklib.client as client
services=client.connect(...)
jobs=service.jobs
for job in jobs:
job.content['label'] #Will give you the saved_search name