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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...