Splunk Search

VPN user login from different location within one Hour

rashid47010
Communicator

Hi

I am looking for the users who login from two different countries within hour hour.

user Country signature
aqbc india authentication successful
USA authentication successful

time frame: 1 Hour

I want the query which shows me the successful authentication from two different countries against same user.

index=xaxto | iplocation src | stats count(Country) by user

Tags (1)
0 Karma

sundareshr
Legend

Try this (assuming you have IP and user extracted to respective fields)

index=xaxto "authenticateion successful" | iplocation src | table _time user country | streamstats window=1 current=f values(country) as prevcountry values(_time) as prevtime | where NOT (prevcountry=country) AND prevtime-_time>3600 | table _time user country

somesoni2
Revered Legend

I believe the last condition in where should be _time-prev_time<3600

0 Karma

rashid47010
Communicator

thanks for your kind response. can you please explain your query.
thanks

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...