Query to get unique fields
Posted: Wed Oct 19, 2016 4:35 am
Hello,
Is it possible to make a query which only show rows with a unique field? We need this for creating an alert on some AD messages.
For the above message I created a grok filter:
And now I would need to make an alert if more then 50 unique usernames are found. At the moment my query returns all 12294 messages:
Please advice how to make a query which returns only the messages with an unique ad_username. Tx
Willem
Is it possible to make a query which only show rows with a unique field? We need this for creating an alert on some AD messages.
Code: Select all
The SAM database was unable to lockout the account of <username> due to a resource error, such as a hard disk write failure (the specific error code is in the error data) . Accounts are locked after a certain number of bad passwords are provided so please consider resetting the password of the account mentioned above.Code: Select all
if [sourcename] == "Microsoft-Windows-Directory-Services-SAM" and [eventid] == 12294 {
grok {
match => [ "message", "\AThe SAM database was unable to lockout the account of %{USERNAME:ad_username}%{GREEDYDATA}" ]
}
mutate {
add_tag => "mutated_microsoft-windows-directory-services-sam_12294"
}
}
Code: Select all
type:"eventlog" AND channel:system AND hostname:*dc* AND eventid:12294Willem