Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex XDR

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.

Format
How to parse

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: comp with count, sum, avg, min, max, and more, grouped by fields.

  • Combine data: join (inner, left, and right) and union.

  • JSON: json_extract functions and arrow notation, for example event -> user.name.

  • Correlate and schedule: Save queries as correlation rules, or run them on a schedule.

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?