Getting Data In

Filter account domain

borgeshe
New Member

I, i need to make a dashboard for accounts locked and i would like to had a filter by account domain.
Is this possible? Can i make a search by account domain?

Thank you

Tags (2)
0 Karma
1 Solution

lukejadamec
Super Champion

Yes, but I'm guessing about the specifics you're after.

If you are talking about Windows 2K8 or Vista EventCode 4740, then you would filter on the Account_Domain field.

In this example you would change 'domain1' to one of your domains.

index=main EventCode=4740 Account_Domain=domain1 | eval Account_Name=mvindex(Account_Name,1)| table _time Account_Domain Account_Name Caller_Computer_Name

If you want to have the results sorted by domain, then use something like this:

index=main EventCode=4740 | eval Account_Name=mvindex(Account_Name,1)| table Account_Domain _time Account_Name Caller_Computer_Name

If you are talking about older Windows systems, then you would filter on the Caller_Domain field. For example:

index=main EventCode=644 | table Caller_Domain _time Target_Account_Name Caller_Machine_Name

If you have a mix, then you can combine the two like this:

index=main  EventCode=4740 | eval Account_Name=mvindex(Account_Name,1)|eval Source=coalesce
(Caller_Computer_Name,ComputerName)| table Account_Domain _time Account_Name Source| rename Account_Domain AS Domain Account_Name AS Account |append [search index=main EventCode=644 | table Caller_Domain _time Target_Account_Name Caller_Machine_Name | rename Caller_Domain AS Domain Target_Account_Name AS Account Caller_Machine_Name AS Source]

View solution in original post

0 Karma

lukejadamec
Super Champion

Yes, but I'm guessing about the specifics you're after.

If you are talking about Windows 2K8 or Vista EventCode 4740, then you would filter on the Account_Domain field.

In this example you would change 'domain1' to one of your domains.

index=main EventCode=4740 Account_Domain=domain1 | eval Account_Name=mvindex(Account_Name,1)| table _time Account_Domain Account_Name Caller_Computer_Name

If you want to have the results sorted by domain, then use something like this:

index=main EventCode=4740 | eval Account_Name=mvindex(Account_Name,1)| table Account_Domain _time Account_Name Caller_Computer_Name

If you are talking about older Windows systems, then you would filter on the Caller_Domain field. For example:

index=main EventCode=644 | table Caller_Domain _time Target_Account_Name Caller_Machine_Name

If you have a mix, then you can combine the two like this:

index=main  EventCode=4740 | eval Account_Name=mvindex(Account_Name,1)|eval Source=coalesce
(Caller_Computer_Name,ComputerName)| table Account_Domain _time Account_Name Source| rename Account_Domain AS Domain Account_Name AS Account |append [search index=main EventCode=644 | table Caller_Domain _time Target_Account_Name Caller_Machine_Name | rename Caller_Domain AS Domain Target_Account_Name AS Account Caller_Machine_Name AS Source]
0 Karma

lukejadamec
Super Champion

No problem. Don't forget to accept the answer:)

0 Karma

borgeshe
New Member

Thank you for your most appreciated help 😉

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...