Splunk Search

Find Job Duration from two separate events.

saty586
Explorer

Jobs Running on daily basis.

Events like-

1) "Job_Name": "XYZ", "status":" Start"

2) "Job_Name": "XYZ", "status":" SUCCESS"

3) "Job_Name": "XYZ", "status":" Failure"

Need to calculate and display the job run time  and status on dashboard for multiple days/runs.

Below query works well for single run but for multiple run runtime is not getting calculated.

search to fetch both "job started" and "job finished" events
| eval eventType=if(searchmatch("job started"),"Start","End")
| chart values(_time) over Job_Name by eventType
| eval jobduration=End-Start

 

Labels (3)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The transaction command can help with this

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...