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!

What’s new on Splunk Lantern in August

This month’s Splunk Lantern update gives you the low-down on all of the articles we’ve published over the past ...

Welcome to the Future of Data Search & Exploration

You have more data coming at you than ever before. Over the next five years, the total amount of digital data ...

This Week's Community Digest - Splunk Community Happenings [8.3.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...