Hi, folks,
I'm building an alert to detect anomalous logons, intending to use the following (simplified) logic,
The Splunk search I've built to do this looks as follows (omitting unnecessary details - I'm renaming and reformatting the pertinent fields in both searches correctly, dedupping, coalescing and trimming where necessary),
{Search - Windows logs} | search Username [search {Search-VPN logs} | fields Username] | table Username Workstation_IP LAN_Logon_Time Remote_IP Country VPN_Logon_Time
The results of the search are correct insofar as the returned Username values are concerned, but I can't figure out how to pass the Remote_IP, Country and VPN_Logon_Time fields from the subsearch into the results of the main search, so that every Username hit, which tells us the LAN logon details, gets appended with the applicable VPN logon details.
Any ideas?
Turns out all I had to do was learn how to use join correctly.
The query now reads.
{Search - Windows logs} |* join** Username [search {Search-VPN logs}] | table Username Workstation_IP LAN_Logon_Time Remote_IP Country VPN_Logon_Time*
and functions exactly as I need it to.
Sorry for wasting everyone's time...
Turns out all I had to do was learn how to use join correctly.
The query now reads.
{Search - Windows logs} |* join** Username [search {Search-VPN logs}] | table Username Workstation_IP LAN_Logon_Time Remote_IP Country VPN_Logon_Time*
and functions exactly as I need it to.
Sorry for wasting everyone's time...
Hi malat_UoM,
maybe not the answer you did expect, but take a look at this answer http://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-joi... to get some nice examples on how you could do this without using append
.
Hint: eventstats
or streamstats
are your friends ....
cheers, MuS