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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...