Skip to content

Instantly share code, notes, and snippets.

@skilledmonster
Created January 10, 2019 02:04
Show Gist options
  • Save skilledmonster/f46e1e5c7d504ee5d93a53005a47a0e4 to your computer and use it in GitHub Desktop.
Save skilledmonster/f46e1e5c7d504ee5d93a53005a47a0e4 to your computer and use it in GitHub Desktop.
Splunk - How to get start and end time(s) when using transaction command
index="common" source="testing" (environment=prod) (event=deploy OR event=complete)
| transaction event project
| eval Minutes=duration/60
| eval Minutes=round(Minutes,0)
| eval starttime = strftime(_time,"%m/%d/%y %H:%M:%S.%Q")
| eval endtime = strftime((_time + duration),"%m/%d/%y %H:%M:%S.%Q")
| table _time project starttime endtime Minutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment