Splunk Search

eval,replace & table query based on token

Explorer

I have a token team_name = "Brenden team, walt, Paul "
I want to replace "Brenden team" with his team members details i.e. "Brenden", "George"
Both Brendon and George are different fields

the below query is not giving me the required result
|replace "Brenden team" with " Brenden, George" in team_name | table Date Day $team_name$

The result should be a table with below fields
Date Day Brenden George walt Paul

                Date            Day       Brenden  George       walt        Paul 
               30/06/19    Thurs        Day        Night        Day           Night
               29/06/19     Fri         Day        Night        Day          Night
               28/06/19    Wed          Day        Night         Day          Night
0 Karma

SplunkTrust
SplunkTrust

Hi poorni_p,
when you say token, you're saying that you have a variable where you put a value from a token, and in this value there are the fields list, is it correct?
Could you share your search and possibly an example of your logs?
Then, it's not clear which values could have your token, do you have a pair name - fields list?

Bye.
Giuseppe

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!