Splunk Search

Every _time timestamp in a transaction as a multivalue field

supersleepwalke
Communicator

How do I get all the individual event times from a transaction and have them in a multivalue field as part of the transaction?

Tags (3)
0 Karma
1 Solution

supersleepwalke
Communicator

Easy way to do this is just assign _time to another variable before the transaction. In the following example, I've also used strftime to convert from epoch to human-readable format:

sourcetype=foo "your search here" | eval times=strftime(_time,"%F %H:%M:%S") | transaction bar

Now times will be a multivalue field that contains all the individual timestamps from each event!

View solution in original post

supersleepwalke
Communicator

Easy way to do this is just assign _time to another variable before the transaction. In the following example, I've also used strftime to convert from epoch to human-readable format:

sourcetype=foo "your search here" | eval times=strftime(_time,"%F %H:%M:%S") | transaction bar

Now times will be a multivalue field that contains all the individual timestamps from each event!

Get Updates on the Splunk Community!

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...