- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-04-2025 12:11 PM
It doesn't appear that the documentation on the transaction stage in XQL is very clearly documented. Does anyone know what the transaction stage really does? Does, and what it uses to "find transactions"?
Does it just find instances of contiguous events with the same value in the fields provided?
06-05-2025 12:32 PM - edited 06-06-2025 05:11 AM
--I know you probably already know this stuff, but writing it down in case someone else stumbles across this later--
Think of a transaction as a way to group related events together that happen around the same time or involve the same things (like the same computer, user, or process).
Instead of looking at individual events scattered across your data, transactions help you see the full story by connecting events that belong together.
Real-world example: Imagine you want to track what happens when a specific program runs on a computer. Without transactions, you might see:
With transactions, you can group all these events together to see the complete picture of what that program did during its lifetime.
Let's break down an example:
dataset = xdr_data
| filter causality_actor_process_image_name contains "Powershell"
| fields *time, agent*hostname, causality_actor_process_os_pid,
actor_process_image_name, actor_process_command_line,
actor_effective_username, actor_process_os_pid
| transaction agent_hostname, causality_actor_process_os_pid span=1H maxevents=50
Filter: Find all events related to "Powershell"
Select fields: Pick the important information you want to see
Transaction: Group events together based on:
The query says: "Show me everything the Powershell process did on each computer, but group the activities together if they happened within 1 hour of each other, and don't show me more than 50 events per group."
When you run a transaction query, XQL adds these helpful fields:
Use transactions when you want to:
Don't use transactions when you:
| transaction user_name, source_ip span=30M
"Group activities by user and IP address within 30-minute windows"
| transaction hostname, process_id span=2H maxevents=100
"Group events by computer and process within 2-hour windows"
| transaction user_name, asset_name span=1D
"Group daily activity by user and computer"
Remember: Transactions help you see the big picture by connecting related events, making it easier to understand what really happened in your environment.
06-05-2025 12:32 PM - edited 06-06-2025 05:11 AM
--I know you probably already know this stuff, but writing it down in case someone else stumbles across this later--
Think of a transaction as a way to group related events together that happen around the same time or involve the same things (like the same computer, user, or process).
Instead of looking at individual events scattered across your data, transactions help you see the full story by connecting events that belong together.
Real-world example: Imagine you want to track what happens when a specific program runs on a computer. Without transactions, you might see:
With transactions, you can group all these events together to see the complete picture of what that program did during its lifetime.
Let's break down an example:
dataset = xdr_data
| filter causality_actor_process_image_name contains "Powershell"
| fields *time, agent*hostname, causality_actor_process_os_pid,
actor_process_image_name, actor_process_command_line,
actor_effective_username, actor_process_os_pid
| transaction agent_hostname, causality_actor_process_os_pid span=1H maxevents=50
Filter: Find all events related to "Powershell"
Select fields: Pick the important information you want to see
Transaction: Group events together based on:
The query says: "Show me everything the Powershell process did on each computer, but group the activities together if they happened within 1 hour of each other, and don't show me more than 50 events per group."
When you run a transaction query, XQL adds these helpful fields:
Use transactions when you want to:
Don't use transactions when you:
| transaction user_name, source_ip span=30M
"Group activities by user and IP address within 30-minute windows"
| transaction hostname, process_id span=2H maxevents=100
"Group events by computer and process within 2-hour windows"
| transaction user_name, asset_name span=1D
"Group daily activity by user and computer"
Remember: Transactions help you see the big picture by connecting related events, making it easier to understand what really happened in your environment.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!