Parsing and XQL
Learn how to create parsing rules in Cortex XDR and use XQL to transform, filter, aggregate, combine, and schedule log data queries.
Parsing rules
Parsing rules transform raw logs into structured rows in a dataset. They are written in XQL for parsing.
Unstructured text
regexcapture (parsing rules only) and regextract (RE2 regex)
JSON
parse_json, json_extract, json_extract_scalar, json_extract_array, or arrow notation (->)
XML and other formats
Use string functions (split, arrayindex, replace) and regex to extract values
CEF and LEEF
Parsed automatically by the collectors
Set a no_hit policy to keep or drop logs that no rule matches. See Parsing Rules file structure and syntax.
XQL capabilities
XQL is a pipeline query language: each stage, separated by |, transforms the results of the previous stage.
Filter and shape:
filter,fields,alter,sort,limit,dedup.Aggregate:
compwithcount,sum,avg,min,max, and more, groupedbyfields.Combine data:
join(inner, left, and right) andunion.JSON:
json_extractfunctions and arrow notation, for exampleevent -> user.name.Correlate and schedule: Save queries as correlation rules, or run them on a schedule.
See the XQL command reference.
You can also write queries in natural language with the Agentic Assistant, which translates your request into XQL. See Create and run XQL queries with Agentic Assistant chat.
Last updated
Was this helpful?
