Splunk Search

query in splunk to check the previous jobs completed

manish_singh_77
Builder

Hi All,

I am trying to write a query where we have to check all the jobs in success or not built status before the jobs get failed at Release stage.

Tags (1)
0 Karma

woodcock
Esteemed Legend

How in the world do you expect anybody to be able to help you if you don't even tell us that you mean Jenkins jobs and not Splunk jobs? Even then, only those who have those logs can help you unless you post sample data. If you tell us everything and include sample logs then EVERYBODY can help you.

0 Karma

manish_singh_77
Builder

@woodcock

Sure, will post the sample logs.

0 Karma

codebuilder
Influencer

Try this as a start:

| rest /services/search/jobs
| table dispatchState *.search

That will give you the state of the searches, and the various fields containing the actual searches.

There are dozens of other fields available, just remove the second half of the search above to see the others.

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma

manish_singh_77
Builder

Hi @codebuilder

I am looking for splunk jobs, we have jenkins jobs of different stages and we need to write a query where we should define the search in such a way that it checks all the previous jobs and then come to release stage.

0 Karma

codebuilder
Influencer

Try this, and examine the fields returned:

| rest /services/search/jobs eai:acl.app=splunk_app_jenkins

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma

codebuilder
Influencer

Did this help your situation?

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma

manish_singh_77
Builder

This is not what I am looking for..

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...