For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content
Cortex XSIAM

Parsing and XQL

Learn how to create Cortex XSIAM parsing rules 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.

AI agents can't generate queries for custom datasets. Custom agents need the Cortex - Run XQL Query action.

Last updated

Was this helpful?