Getting Data In

Timestamp for multivalue fields that had been split up

jiakslim
Engager

Hey there,

I have a question regarding timestamps for multivalue fields that have been splitted up. Initially, my lines were as such: x =[a, b, c, d, e, f, g]. I trimmed away the square brackets by the side and subsequently had them broken up into single value fields. All entries (a, b, c, d, e, f, g) have the same timestamp. However, the problem is that currently only "a" has a timestamp. Everything else doesn't have a timestamp.

Is there a way to which I can insert the same timestamp for all other entries?

Thanks

0 Karma

jiakslim
Engager

Hey niketnilay - yes absolutely, just _time and x. Thanks for the help, everything above worked. And thanks for the advice, I'll include these information in my future questions.
Thanks a million!

0 Karma

niketn
Legend

@jiakslim, you might have to put in more details of what is the raw event data you are working with and what is the query you have tried with current output and what is not working for us to help you better.

Meanwhile, if you have multi-valued field x and you are interested only in _time and x, you should just try using | mvexpand x as your final pipe. Following is a run anywhere example based on information provided so far.

| makeresults 
| eval x ="[a, b, c, d, e, f, g]"
| eval x=replace(x,"(\[|\])","")
| makemv x delim=","
| mvexpand x
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...