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!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...