Hi, this is really hard to triage without seeing some / most of the code as an example, which maybe in another thread?
Typical issues (I suspect you have discounted 1 & 2):
- certain commands like union * are not supported in a detection
- detections that look back more than 14days
- Supporting data from some sources may have arrived later due to latency, so when the detection ran at say 9:00 it failed, however at 9:02 (or whatever time) the data arrived so it would be picked up in the next run (assuming your sliding window looks back far enough), and would be there when you look later in the day manually!
e.g. add this at line one and test in your logs blade
set query_now = datetime(2025-04-24T15:15:00.0000000Z);
< add your query >
source: https://learn.microsoft.com/en-us/kusto/api/rest/request-properties?view=microsoft-fabric
and
You can see query_now in action by a quick test, run these two example queries:
// Run this to simulate a fixed point in time
set query_now = datetime(2025-04-24T15:15:00.0000000Z);
print now()
// run this to show the "real" current time
print now()
As an Example sometimes there are delays from Defender products (look at the ProcessingTime)
SecurityIncident
| extend Alerts = extract("\\[(.*?)\\]", 1, tostring(AlertIds))
| mv-expand AlertIds to typeof(string), Labels to typeof(string), Comments to typeof(string), AdditionalData to typeof(string)
| join kind=leftouter
(
SecurityAlert
| extend ProductProcessingMin = datetime_diff('minute', ProcessingEndTime, EndTime), ingest_ = ingestion_time()
| extend sentinelIngestionDelayinMinutes_ = datetime_diff('minute', ingestion_time(), ProcessingEndTime)
| extend StarttoEndDelayinMinutes_ = datetime_diff('minute', EndTime, StartTime)
) on $right.SystemAlertId == $left.AlertIds
| summarize AlertCount=dcount(AlertIds),arg_max(TimeGenerated, *) by IncidentNumber
| extend sentinelIngestiontoCreated_ = datetime_diff('minute', ingest_, CreatedTime)
| extend InvestigationElapsedTime_ = datetime_diff('minute', LastModifiedTime, CreatedTime)
| summarize arg_max(TimeGenerated,*) by IncidentNumber
| project IncidentNumber, Title, StartTime, EndTime, ProcessingEndTime, TimeGenerated, ingest_, StarttoEndDelayinMinutes_, ProductProcessingMin,
sentinelIngestionDelayinMinutes_, AlertName, FirstActivityTime, LastModifiedTime,
CreatedTime
, InvestigationElapsedTime_
, sentinelIngestiontoCreated_
, Severity, Status, Comments, ProductName, ProviderName
example