Splunk Search

Using Splunk to count within a search - users to ip addresses

bnolen
Path Finder

Hi all,

I have logs in the following format

2010-06-17 02:04:55 user1 ip.add.ress.here GET /mysite/mypage.html
2010-06-17 02:04:59 user1 ip.add.ress.here POST /mysite/mypage2.html
2010-06-17 02:05:23 user2 ip.add.ress.here GET /mysite/mypage.html

What my question is, is there an easy way to search for all users that have logged in from multiple ip addresses, and also for all ip addresses that have been used by multiple users.

1 Solution

gkanapathy
Splunk Employee
Splunk Employee
... | stats distinct_count(ipaddress) as dcip by user | where dcip > 1

and

... | stats distinct_count(user) as dcu by ipaddress | where dcu > 1

respectively will do it.

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee
... | stats distinct_count(ipaddress) as dcip by user | where dcip > 1

and

... | stats distinct_count(user) as dcu by ipaddress | where dcu > 1

respectively will do it.

Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

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