Splunk Search

get single field values from multiple field values

avi123
Explorer

Hi All,

I have an output from a lookup table in splunk where the team work timings field is coming as::

TeamWorkTimings

09:00:00-18:00:00

I want the output to be separated in two fields, like:

TeamStart   TeamEnd

09:00:00       18:00:00

 

Please help me in getting this output in splunk

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| eval TeamStart=mvindex(split(TeamWorkTimings,"-"),0)
| eval TeamEnd=mvindex(split(TeamWorkTimings,"-"),1)

View solution in original post

avi123
Explorer

Thanks, this worked 🙂

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| eval TeamStart=mvindex(split(TeamWorkTimings,"-"),0)
| eval TeamEnd=mvindex(split(TeamWorkTimings,"-"),1)
Get Updates on the Splunk Community!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...