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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...