Reporting

How to retrieve Saved search name from job sid?

SIddharth5794
Explorer

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.

0 Karma
1 Solution

SIddharth5794
Explorer

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

View solution in original post

0 Karma

SIddharth5794
Explorer

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
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...