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 AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...