Splunk Search

compound query

mikefoti
Communicator

Not sure this is really a "compound query" question, but not sure how else to describe it.

I'm searching proxy logs and am interested in finding the "server_ip" (remote web servers) that 3 client_ips (internal users browsing the internet) all have visited.

So if...
client_ip 1 visited server_ip 1 and server_ip X and
client_ip 2 visited server_ip 2 and server_ip X, and
client_ip 3 visited server_ip 3 and server_ip X,
I would like a query to reveal that all 3 client_ips visited server_ip x

Tags (1)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

You could approach like this:

your search | stats dc(clientip) as dc by serverip | where dc = 3

That counts the unique IPs per server - those rows that have a "3" will have been visited by all three clients.

View solution in original post

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You could approach like this:

your search | stats dc(clientip) as dc by serverip | where dc = 3

That counts the unique IPs per server - those rows that have a "3" will have been visited by all three clients.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...