Hello Splunkers,
Workflows are monitored through splunk. Workflows has different stages like running , paused, cancelled and completed. I have to get the latest status of the workflow. I am using sort - _time option to get the latest data of the status. Along with the search query by using the sort - _time option, data count varies.
For last 7 days
index=... | table _time EXECUTION_NAME STATUS EXECUTION_ID Stage Environment source | dedup EXECUTION_ID | chart count(EXECUTION_ID) as Workflows_Triggered by Environment,STATUS
Environment COMPLETED PAUSED RUNNING
XXX
94498
1
56
sort -_time option is used for last 7 days.
index=... | table _time EXECUTION_NAME STATUS EXECUTION_ID Stage Environment source | sort -_time | dedup EXECUTION_ID | chart count(EXECUTION_ID) as Workflows_Triggered by Environment,STATUS
Environment COMPLETED RUNNING
XXX
9735
5
reason for using sort -_time is get the latest status of the execution_id. completed will be appeared when the dedup is done.
_time STATUS EXECUTION_ID
2022-11-30 12:20:00.492
RUNNING
12345678901
2022-11-30 12:20:18.000
COMPLETED
12345678911
Requesting for support. Thank you !!!
... View more