Splunk Search

Can I use dedup to remove a duplicate value in my report and to show only the last log? Other options?

khanlarloo
Explorer

hi
i have one problem in making report. in my report result i have repeated name how can I avoid to not show the repeative name in result.
i put the screen shot herealt text
i want to show last log on status for each user without showing the repeated name . how can i do it ?

0 Karma

khanlarloo
Explorer

alt text

in the report the table status no mis repeatitive and it dosent show the last time that user login per day

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi khanlarloo,
try something like this:

your_search
| stats latest(last_logon) AS last_logon BY user status

Bye.
Giuseppe

0 Karma

HiroshiSatoh
Champion

Try this!

(your search) |streamstats count as Number by user|eval user=if(Number=1,user,"")|table user,status,"Last Log On"
0 Karma
Get Updates on the Splunk Community!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...