Getting Data In

Fields in another sourcetype

rubeniturrieta
Communicator

Hi everyone:

I have two sourcetypes: Cisco WSA, and Cisco ASA. WSA has user data, but ASA don't.
I want to have the users for every source ip (src_ip) for asa. I have DHCP.
I have for example, this:


ASA top src_ip

timestamp ! src_ip ! count
a ! ip_a ! 2
b ! ip_b ! 5

c ! ip_c ! 7

but I need this:

ASA top src_ip

timestamp ! src_ip ! count ! user
a ! ip_a ! 2 ! u1
b ! ip_b ! 2 ! u5
d ! ip_b ! 2 ! u2
c ! ip_c ! 4 ! u1
e ! ip_c ! 3 ! u5


Do someone know how to do something like this?

0 Karma
1 Solution

stephane_cyrill
Builder

Hi,
I think that you can use the appendcols command to do that.
To have the resulting table you need you have to pipe the search that produce the first result without user and then you use appendcols [ ] .in the square brakets you put the search that will produce only the field user from WSA sourcetype.
At the end you pipe all and you can use table command to display what you wanted. just like this:

search from ASA sourcetype | appendcols [subsearch from WSA] |table timestamp scr_ip count user

View solution in original post

stephane_cyrill
Builder

Hi,
I think that you can use the appendcols command to do that.
To have the resulting table you need you have to pipe the search that produce the first result without user and then you use appendcols [ ] .in the square brakets you put the search that will produce only the field user from WSA sourcetype.
At the end you pipe all and you can use table command to display what you wanted. just like this:

search from ASA sourcetype | appendcols [subsearch from WSA] |table timestamp scr_ip count user

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 ...