Getting Data In

Looking for a search to see my splunk users that havent logged into splunk in x days?

smithke
Explorer

I'm looking for a query to see my splunk users that havent logged into splunk in x days. 

Currently looking at this query:

| rest /services/authentication/users splunk_server=local |eval c_time=strftime(last_successful_login,"%m/%d/%y %H:%M:%S") | table title roles last_successful_login c_time

 

However this shows me all users where I only want to see those that havent logged in in x days.

 

Any assistance is appreciated

Labels (1)
0 Karma

saravanan90
Contributor

This may help..

| rest /services/authentication/users splunk_server=local
| search NOT
[ search index=_internal sourcetype=splunkd_ui_access status=200 *authentication*
| dedup user
| table user
| rename user as title ]

0 Karma

isoutamo
SplunkTrust
SplunkTrust
0 Karma

GMoney
Observer

I can't say when this stopped working, but as of version 8.2.4 index=_audit no longer utilizes action=login*.  Run a "| stats values(action)" and you'll see what I mean.

0 Karma

isoutamo
SplunkTrust
SplunkTrust

At 9.0.1 it gives that actions as earlier

index=_audit action=login* earliest=-4h
| stats count by action

 

0 Karma

smithke
Explorer

Thanks but this did not help.

0 Karma
Get Updates on the Splunk Community!

Splunk Search APIを使えば調査過程が残せます

   このゲストブログは、JCOM株式会社の情報セキュリティ本部・専任部長である渡辺慎太郎氏によって執筆されました。 Note: This article is published in both Japanese ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...