Hi. I am creating a search and dashboard to display our last ten locked account events. This seems to work well as I have it configured. One of the things I am doing is using the dedup command to remove extra occurrences of an event, given that the lockout events often show up on multiple Active Directory domain controllers (outlined in green below). I am using the "Account_Name" and _time values for this purpose. This works well except where the events are on different domain controllers at different times. In this case, I would prefer to dedup using a window of time (say 5 seconds), but I cannot find how to do this. Shown in the example below are some entries outlined in red, where they are the same user but at different times, and I would want to be careful to not exclude those events, so a straight dedup does not help.
Code:
EventCodeDescription="A user account was locked out" Account_Name=* NOT "Guest" Account_Domain=* Caller_Computer_Name=* dvc=* source="WinEventLog:Security" _time=* | eval Account_Name=mvindex(Account_Name,1) | dedup Account_Name _time | rename dvc AS "Domain Controller" | rename Account_Domain AS "Domain Name" | rename Caller_Computer_Name AS "Client Host" | rename Account_Name AS "Account Name" | table _time "Account Name" "Client Host" "Domain Controller" "Domain Name" | sort -_time
Thanks.
EDIT: Apparently, I am not allowed to attach images. Please see the Evernote link below:
https://www.evernote.com/shard/s26/sh/9082054d-788a-491f-92c2-66718d443740/cc2de893310866299d291983497de0dc/deep/0/Locked-Accounts---Last-10.png
... View more