Getting Data In

Successful dormant user logins

saurabh_tek
Communicator

hello I am trying to write a query for Successful dormant user logins
whereas the user has successfully logged in today but in last 30 days there was no activity done by this same user.

Here is my query - (which needs refinement)

index=wineventlog EventCode=4624 user!="$" earliest= @d latest = now()| transaction user [search EventCode!=4624 user!="$" earliest=-2d latest=@d] | table _time, user

if anyone can help in getting this refined and do what is needed, that would be great help.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Perhaps this will help. The idea is to look at the last 30 days of successful logins and find the users that have signed in only once and that login was today.

index=wineventlog EventCode=4624 user!="$" earliest= -30d@d | stats count(_time) as Logins latest(_time) as LastLogin by user | where Logins=1 AND LastLogin>relative_time(now(),"@d") | ...
---
If this reply helps you, Karma would be appreciated.
0 Karma

saurabh_tek
Communicator

Thanks for prompt support.
With earliest 30 days, it takes way too much time and showing lot of users with 1 logins, i dont think these many users accessing their dormant a/cs in our environment.

0 Karma

saurabh_tek
Communicator

okay. I have optimized it a little bit apparently ..

index=wineventlog EventCode=4624 user!=\"$\" earliest= @d latest = now() | transaction user maxspan=60d search (EventCode!=)

looking for more suggestions.. to get this working what is intended

0 Karma

saurabh_tek
Communicator

okay. I have optimized it a little bit apparently ..

index=wineventlog EventCode=4624 user!="$" earliest= @d latest = now() | transaction user maxspan=60d search (EventCode!=)

looking for more suggestions.. to get this working what is intended

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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...