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
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 ...