Hi, I'm sure I'm not the first to ask this question, but I can't seem to find an answer that covers what I am trying to achieve. I have an index which collects job stats - start, end, fail, success etc What I would like to do is create a table to display all the jobs I am interested in in one column, then the start, end and run times and a status column. Like this - Column A Column B Column C Column D Column E Jobname Start Time End Time Run Time Status abc 08:00 08:01 1 Success The search below gives me everything EXCEPT I cannot calculate 'Run Time' because the events are separate. I've tried with 'streamstats' and 'transaction' without any success. index=foo sourcetype=bar_prd "p-foo*" earliest=-6h | rex "JOB: (?<j>p-foo-[a-z\-]+)" | rex "STATUS: (?<s>\w+)\s" | eval ST=if(s="RUNNING",_time,"") | eval ET=if(s="SUCCESS",_time,"") | eval Status=if(s="SUCCESS","Success","") | eval ST=strftime(ST,"%Y-%m-%d %H:%M:%S.%Q") | eval ET=strftime(ET,"%Y-%m-%d %H:%M:%S.%Q") | stats values(ST) as "Start Time", values(ET) as "End Time", values(Status) by j As ever, I'd be very grateful for assistance.
... View more