Archive
Highlighted

query in splunk to check the previous jobs completed

Contributor

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
Highlighted

Re: query in splunk to check the previous jobs completed

Motivator

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.

0 Karma
Highlighted

Re: query in splunk to check the previous jobs completed

Contributor

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
Highlighted

Re: query in splunk to check the previous jobs completed

Motivator

Try this, and examine the fields returned:

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

0 Karma
Highlighted

Re: query in splunk to check the previous jobs completed

Motivator

Did this help your situation?

0 Karma
Highlighted

Re: query in splunk to check the previous jobs completed

Contributor

This is not what I am looking for..

0 Karma
Highlighted

Re: query in splunk to check the previous jobs completed

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
Highlighted

Re: query in splunk to check the previous jobs completed

Contributor

@woodcock

Sure, will post the sample logs.

0 Karma