Splunk Search

search where a field is IN another search

pinzer
Path Finder

Hi all i need to do a search like this:

sourcetype="webseal_access" OR sourcetype="wmi:wineventlog:security" | rename Source_Network_Address as IP | rename IP_Source as IP

where the IP is in a field of another search. How can i do this?
Thanks

Tags (2)
0 Karma

vbumgarn
Path Finder

If the IP could possibly be in several locations, and you want to normalize them into a field, I like the coalesce command in eval.

sourcetype="webseal_access" OR sourcetype="wmi:wineventlog:security" | eval IP = coalesce(Source_Network_Address,IP_Source)

This says "make a new field called IP, and use the value from the first non-empty field."

http://www.splunk.com/base/Documentation/latest/SearchReference/CommonEvalFunctions

0 Karma

southeringtonp
Motivator
0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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