Heartbeat Stopped Event Reception Domain Controllers
Query
let query_frequency = 15m;
let query_wait = 1h;
let _DomainControllers = toscalar(
_GetWatchlist("Service-PrivateCorporateServices")
| where Service == "DomainController"
| summarize make_list(HostName)
);
Heartbeat
| where TimeGenerated > ago(query_wait + query_frequency)
| extend TimeReceived = _TimeReceived
| summarize arg_max(TimeReceived, *) by Category, VMUUID, Computer, _ResourceId
| where Computer has_any (_DomainControllers)
| where TimeReceived between (ago(query_frequency + query_wait) .. ago(query_wait))
| project TimeReceived, Computer, OSType, Version, ComputerEnvironment, Type, SolutionsExplanation
This KQL (Kusto Query Language) query is designed to monitor the activity of domain controllers within a specific time frame. Here's a simplified explanation of what the query does:
-
Define Time Intervals:
query_frequencyis set to 15 minutes, andquery_waitis set to 1 hour. These are used to define the time windows for the query.
-
Retrieve Domain Controllers:
- The query retrieves a list of hostnames for domain controllers from a watchlist named "Service-PrivateCorporateServices" where the service type is "DomainController".
-
Filter Heartbeat Data:
- It looks at the
Heartbeattable for records generated more than 1 hour and 15 minutes ago. - It extends the data with a
TimeReceivedfield.
- It looks at the
-
Summarize Latest Records:
- It summarizes the data to get the most recent record (
arg_max) for each combination ofCategory,VMUUID,Computer, and_ResourceId.
- It summarizes the data to get the most recent record (
-
Filter for Domain Controllers:
- It filters the summarized data to include only those records where the
Computerfield matches any of the domain controllers retrieved earlier.
- It filters the summarized data to include only those records where the
-
Time Window Filtering:
- It further filters these records to include only those received between 1 hour and 15 minutes ago and 1 hour ago.
-
Select Specific Fields:
- Finally, it projects (selects) specific fields to display:
TimeReceived,Computer,OSType,Version,ComputerEnvironment,Type, andSolutions.
- Finally, it projects (selects) specific fields to display:
In essence, this query is checking for the most recent heartbeat data from domain controllers within a specific 15-minute window, occurring 1 hour ago, to monitor their status and activity.
Details

Jose Sebastián Canós
Released: November 21, 2024
Tables
_GetWatchlistHeartbeat
Keywords
HeartbeatDomainControllersComputerOSTypeVersionComputerEnvironmentTypeSolutions
Operators
lettoscalaragosummarizemake_listarg_maxextendprojectbetweenhas_anywhere