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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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