Queries
Written by
Updated at April 3, 2026
Note
This feature is in the Preview stage. To get access, contact tech support
To search for events, Yandex Cloud Detection and Response uses a subset of the Kusto Query Language (KQL). KQL enables you to filter, aggregate, and analyze security events for the past 90 days.
KQL syntax
A KQL query has the following components:
- Data source: Event tables, e.g.,
Events. - Filtering operators:
whereto filer events by conditions. - Aggregation operators:
summarizefor counting and grouping. - Sorting operators:
sortfor result sorting.
For more information about the KQL syntax, see KQL reference.
Request example:
Events
| project event_class, ['time']
| limit 1
This query selects events from the Events table, displays the event_class and time fields, and limits the result to one entry.
Query history
YCDR stores execution history for each query. The history contains:
- Date and time of running the query.
- Query text.
- Time period.
- Execution status.
- Number of results.
From the history, you can:
- Rerun a query with the same parameters.
- Copy query text for editing.
- Share a link to the query with your team.
Query optimization
To use queries efficiently, follow these best practices:
- Use filters: Use
whereclauses to make queries faster. - Define a precise time range: Avoid querying data for a broader time window than needed.
- Aggregate data: Use
summarizeoperators to group and count events instead of retrieving the full output. - Limit results: Use the
limitoperator to limit the number of returned rows.