Query Details
let query_frequency = 1h;
let query_period = 3d;
let _ExpectedFrequencies =
_GetWatchlist("DataType-IngestedTables")
| where Type == "CommonSecurityLog"
| mv-expand DeviceProduct = split(Auxiliar, " & ") to typeof(string)
| project Type, DeviceProduct, Critical, ExpectedIngestionFrequency = totimespan(Frequency)
;
CommonSecurityLog
| where TimeGenerated > ago(query_period)
| summarize IngestionTime = max(ingestion_time()) by Type, DeviceProduct
| lookup kind=inner _ExpectedFrequencies on Type, DeviceProduct
| where IngestionTime between (ago(ExpectedIngestionFrequency + query_frequency) .. ago(ExpectedIngestionFrequency))
| extend
TimespanWithoutIngestion = now() - IngestionTime,
AlertSeverity = case(
Critical == "true",
"High",
"Informational"
)
| project
Type,
DeviceProduct,
Critical,
ExpectedIngestionFrequency,
TimespanWithoutIngestion,
AlertSeverity
This query is designed to monitor data ingestion for security logs and identify any potential issues with the frequency of data ingestion. Here's a simplified breakdown of what the query does:
Setup Parameters:
query_frequency is set to 1 hour, which is used as a buffer time for checking ingestion.query_period is set to 3 days, which defines the time range for the logs being analyzed.Retrieve Expected Frequencies:
Type, DeviceProduct, Critical, and ExpectedIngestionFrequency.Analyze Ingestion Times:
CommonSecurityLog table for logs generated within the last 3 days.Compare with Expected Frequencies:
Calculate and Classify Alerts:
TimespanWithoutIngestion).Output:
In summary, this query helps identify security logs that are not being ingested as frequently as expected, categorizes them based on their criticality, and provides insights into potential data ingestion issues.

Jose Sebastián Canós
Released: July 9, 2025
Tables
Keywords
Operators