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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...