Sure.. So, here it goes.. I have a dashboard that is tracking 'jobs'... Completed jobs and this particular widget is tracking 'running' jobs (start but no end). I might be tracking around 80 jobs ...
See more...
Sure.. So, here it goes.. I have a dashboard that is tracking 'jobs'... Completed jobs and this particular widget is tracking 'running' jobs (start but no end). I might be tracking around 80 jobs but there should not be more than 5 or 6 'running' at any particular time. So, not creating 80 transactions.
Everything is working as designed but this one job that starts and ends at the same time showed up in my 'running' jobs widget and then is missing from my completed jobs widget.
Once I run my initial 'search' for log events here is what im doing.
index=anIndex sourcetype=aSourcetype (aJob1 OR aJob2 OR aJob3) AND ("START of script" OR "COMPLETED OK" OR "ABORTED, exiting with status" )
| rex field=_raw "Batch::(?<aJobName>[^\s]*)"
| transaction keeporphans=true host aJobName startswith=("START of script") endswith=("COMPLETED OK" OR "ABORTED, exiting with status")
| eval closed_txn = if ( isnull(closed_txn),0,closed_txn)
| search closed_txn=0
| sort _time
| eval aDay = strftime(_time, "%a. %b. %e, %Y")
| eval aStartTime=strftime(_time, "%H:%M:%S %p")
| eval aDuration=tostring((now()-_time), "duration")
| eval aEndTime = "--- Running ---"
| table aHostName aDay aJobName aStartTime aEndTime aDuration
But, this one job is causing me issues as Transaction is not picking up the start/end that have the same _time