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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2026-2027 SplunkTrust is officially open. If ...