Splunk Search

Have field a equal field b if event_type = xxx

bt149
Path Finder

I have a search that is based on two events types - admin_login and admin_change.  Admin_Login has two fields that the admin_change does not.  Those fields are "admin_login_name" and "admin_login_email." 

The fields, other than those two previously mentioned, are the same.  What I'm looking to do:

If event_type=admin_login then admin_login_name = source_user_name AND admin_login_email = source_user_email.

Thanks in advance for the help.

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| eval admin_login_name=if(event_type="admin_login",source_user_name,admin_login_name)
| eval admin_login_email=if(event_type="admin_login",source_user_email,admin_login_email)

View solution in original post

bt149
Path Finder

Thank you very much.  I definitely over thought this one.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| eval admin_login_name=if(event_type="admin_login",source_user_name,admin_login_name)
| eval admin_login_email=if(event_type="admin_login",source_user_email,admin_login_email)
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...