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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...