Splunk Search

lookup from newly defined field

mcbradford
Contributor

This is my search...

index=webproxy 
| regex user=".+a" 
| top 100 user
| eval user_name=substr(user,1,5)

I have a lookup table that uses the filed user to enrich my data.

How can I pass the newly defined field user_name to the lookup to give me the enriched results?

Tags (1)
1 Solution

mcbradford
Contributor

I figured it out

index=webproxy earliest=-9d 
| regex user=".*.a$" 
| top 100 user 
| eval user_name=substr(user,1,5) 
| eval user=user_name 
| lookup people_table user

View solution in original post

mcbradford
Contributor

I figured it out

index=webproxy earliest=-9d 
| regex user=".*.a$" 
| top 100 user 
| eval user_name=substr(user,1,5) 
| eval user=user_name 
| lookup people_table user
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...