<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Question on transaction stage in XQL in Cortex XSIAM Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsiam-discussions/question-on-transaction-stage-in-xql/m-p/1231117#M205</link>
    <description>&lt;H1&gt;Hi Jaden,&amp;nbsp;&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;--I know you probably already know this stuff, but writing it down in case someone else stumbles across this later--&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Think of a transaction as a way to &lt;STRONG&gt;group related events together&lt;/STRONG&gt; that happen around the same time or involve the same things (&lt;STRONG&gt;like the same computer, user, or process&lt;/STRONG&gt;).&lt;/P&gt;
&lt;P&gt;Instead of looking at individual events scattered across your data, transactions help you see &lt;STRONG&gt;the full story&lt;/STRONG&gt; by connecting events that belong together.&lt;/P&gt;
&lt;H2&gt;Why Use it?&lt;/H2&gt;
&lt;P&gt;&lt;STRONG&gt;Real-world example:&lt;/STRONG&gt; Imagine you want to track what happens when a specific program runs on a computer. Without transactions, you might see:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Event 1: Program started&lt;/LI&gt;
&lt;LI&gt;Event 2: Program accessed a file&lt;/LI&gt;
&lt;LI&gt;Event 3: Program made a network connection&lt;/LI&gt;
&lt;LI&gt;Event 4: Program ended&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;With transactions, you can &lt;STRONG&gt;group all these events together&lt;/STRONG&gt; to see the complete picture of what that program did during its lifetime.&lt;/P&gt;
&lt;H2&gt;How Query Works&lt;/H2&gt;
&lt;P&gt;Let's break down an example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-xql"&gt;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
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;H3&gt;What's happening step by step:&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Filter&lt;/STRONG&gt;: Find all events related to "Powershell"&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Select fields&lt;/STRONG&gt;: Pick the important information you want to see&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Transaction&lt;/STRONG&gt;: Group events together based on:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;agent_hostname&lt;/STRONG&gt; (which computer)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;causality_actor_process_os_pid&lt;/STRONG&gt; (which specific process)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;span=1H&lt;/STRONG&gt; (only group events that happen within 1 hour of each other)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;maxevents=50&lt;/STRONG&gt; (don't include more than 50 events per group)&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;In simple terms:&lt;/H3&gt;
&lt;P&gt;The query says: &lt;EM&gt;"Show me everything the &lt;STRONG&gt;Powershell&lt;/STRONG&gt; 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."&lt;/EM&gt;&lt;/P&gt;
&lt;H2&gt;Key Transaction Parameters&lt;/H2&gt;
&lt;H3&gt;&lt;STRONG&gt;span=1H&lt;/STRONG&gt; (Time Window)&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;Groups events that happen within 1 hour of each other&lt;/LI&gt;
&lt;LI&gt;Like saying "these events are related because they happened close in time"&lt;/LI&gt;
&lt;LI&gt;You could use: 30M (30 minutes), 2H (2 hours), 1D (1 day), etc.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&lt;STRONG&gt;maxevents=50&lt;/STRONG&gt; (Event Limit)&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;Prevents any single transaction from having too many events&lt;/LI&gt;
&lt;LI&gt;Keeps your results manageable&lt;/LI&gt;
&lt;LI&gt;Default is 100 if you don't specify&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&lt;STRONG&gt;Transaction Fields&lt;/STRONG&gt; (agent_hostname, causality_actor_process_os_pid)&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;These are the "keys" that determine which events belong together&lt;/LI&gt;
&lt;LI&gt;Events with the same &lt;STRONG&gt;hostname&lt;/STRONG&gt; AND same &lt;STRONG&gt;process ID&lt;/STRONG&gt; get grouped together&lt;/LI&gt;
&lt;LI&gt;Like saying "group events from the same computer and same process"&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;What You Get Back&lt;/H2&gt;
&lt;P&gt;When you run a transaction query, XQL adds these helpful fields:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;_start_time&lt;/STRONG&gt;: When the first event in the group happened&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;_end_time&lt;/STRONG&gt;: When the last event in the group happened&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;_duration&lt;/STRONG&gt;: How long the transaction lasted (in seconds)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;_num_of_rows&lt;/STRONG&gt;: How many events are in this group&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;_transaction_id&lt;/STRONG&gt;: A unique ID for this group&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;When to Use Transactions&lt;/H2&gt;
&lt;P&gt;&lt;STRONG&gt;Use transactions when you want to:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;See the complete lifecycle of a process or user session&lt;/LI&gt;
&lt;LI&gt;Understand what happened during a security incident&lt;/LI&gt;
&lt;LI&gt;Track user behavior over time&lt;/LI&gt;
&lt;LI&gt;Analyze application workflows&lt;/LI&gt;
&lt;LI&gt;Investigate suspicious activity patterns&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Don't use transactions when you:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Just want to count events or get statistics&lt;/LI&gt;
&lt;LI&gt;Need to see individual events separately&lt;/LI&gt;
&lt;LI&gt;Are looking for simple yes/no answers&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;Common Patterns&lt;/H2&gt;
&lt;H3&gt;Track User Sessions&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-xql"&gt;| transaction user_name, source_ip span=30M
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;"Group activities by user and IP address within 30-minute windows"&lt;/EM&gt;&lt;/P&gt;
&lt;H3&gt;Follow Process Activity&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-xql"&gt;| transaction hostname, process_id span=2H maxevents=100
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;"Group events by computer and process within 2-hour windows"&lt;/EM&gt;&lt;/P&gt;
&lt;H3&gt;Investigate Security Incidents&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-xql"&gt;| transaction user_name, asset_name span=1D
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;"Group daily activity by user and computer"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Remember: Transactions help you see the &lt;STRONG&gt;big picture&lt;/STRONG&gt; by connecting related events, making it easier to understand what really happened in your environment.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jun 2025 19:20:56 GMT</pubDate>
    <dc:creator>A.Elzedy</dc:creator>
    <dc:date>2025-06-24T19:20:56Z</dc:date>
    <item>
      <title>Question on transaction stage in XQL</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsiam-discussions/question-on-transaction-stage-in-xql/m-p/1230984#M202</link>
      <description>&lt;P&gt;&lt;SPAN&gt;It doesn't appear that the documentation on the transaction stage in XQL is very clearly documented.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Does anyone know what the transaction stage really does? Does, and what it uses to "find transactions"?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Does it just find instances of contiguous events with the same value in the fields provided?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 19:11:54 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsiam-discussions/question-on-transaction-stage-in-xql/m-p/1230984#M202</guid>
      <dc:creator>JadenEvanger</dc:creator>
      <dc:date>2025-06-04T19:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Question on transaction stage in XQL</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsiam-discussions/question-on-transaction-stage-in-xql/m-p/1231117#M205</link>
      <description>&lt;H1&gt;Hi Jaden,&amp;nbsp;&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;--I know you probably already know this stuff, but writing it down in case someone else stumbles across this later--&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Think of a transaction as a way to &lt;STRONG&gt;group related events together&lt;/STRONG&gt; that happen around the same time or involve the same things (&lt;STRONG&gt;like the same computer, user, or process&lt;/STRONG&gt;).&lt;/P&gt;
&lt;P&gt;Instead of looking at individual events scattered across your data, transactions help you see &lt;STRONG&gt;the full story&lt;/STRONG&gt; by connecting events that belong together.&lt;/P&gt;
&lt;H2&gt;Why Use it?&lt;/H2&gt;
&lt;P&gt;&lt;STRONG&gt;Real-world example:&lt;/STRONG&gt; Imagine you want to track what happens when a specific program runs on a computer. Without transactions, you might see:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Event 1: Program started&lt;/LI&gt;
&lt;LI&gt;Event 2: Program accessed a file&lt;/LI&gt;
&lt;LI&gt;Event 3: Program made a network connection&lt;/LI&gt;
&lt;LI&gt;Event 4: Program ended&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;With transactions, you can &lt;STRONG&gt;group all these events together&lt;/STRONG&gt; to see the complete picture of what that program did during its lifetime.&lt;/P&gt;
&lt;H2&gt;How Query Works&lt;/H2&gt;
&lt;P&gt;Let's break down an example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-xql"&gt;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
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;H3&gt;What's happening step by step:&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Filter&lt;/STRONG&gt;: Find all events related to "Powershell"&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Select fields&lt;/STRONG&gt;: Pick the important information you want to see&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Transaction&lt;/STRONG&gt;: Group events together based on:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;agent_hostname&lt;/STRONG&gt; (which computer)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;causality_actor_process_os_pid&lt;/STRONG&gt; (which specific process)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;span=1H&lt;/STRONG&gt; (only group events that happen within 1 hour of each other)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;maxevents=50&lt;/STRONG&gt; (don't include more than 50 events per group)&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;In simple terms:&lt;/H3&gt;
&lt;P&gt;The query says: &lt;EM&gt;"Show me everything the &lt;STRONG&gt;Powershell&lt;/STRONG&gt; 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."&lt;/EM&gt;&lt;/P&gt;
&lt;H2&gt;Key Transaction Parameters&lt;/H2&gt;
&lt;H3&gt;&lt;STRONG&gt;span=1H&lt;/STRONG&gt; (Time Window)&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;Groups events that happen within 1 hour of each other&lt;/LI&gt;
&lt;LI&gt;Like saying "these events are related because they happened close in time"&lt;/LI&gt;
&lt;LI&gt;You could use: 30M (30 minutes), 2H (2 hours), 1D (1 day), etc.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&lt;STRONG&gt;maxevents=50&lt;/STRONG&gt; (Event Limit)&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;Prevents any single transaction from having too many events&lt;/LI&gt;
&lt;LI&gt;Keeps your results manageable&lt;/LI&gt;
&lt;LI&gt;Default is 100 if you don't specify&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&lt;STRONG&gt;Transaction Fields&lt;/STRONG&gt; (agent_hostname, causality_actor_process_os_pid)&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;These are the "keys" that determine which events belong together&lt;/LI&gt;
&lt;LI&gt;Events with the same &lt;STRONG&gt;hostname&lt;/STRONG&gt; AND same &lt;STRONG&gt;process ID&lt;/STRONG&gt; get grouped together&lt;/LI&gt;
&lt;LI&gt;Like saying "group events from the same computer and same process"&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;What You Get Back&lt;/H2&gt;
&lt;P&gt;When you run a transaction query, XQL adds these helpful fields:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;_start_time&lt;/STRONG&gt;: When the first event in the group happened&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;_end_time&lt;/STRONG&gt;: When the last event in the group happened&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;_duration&lt;/STRONG&gt;: How long the transaction lasted (in seconds)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;_num_of_rows&lt;/STRONG&gt;: How many events are in this group&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;_transaction_id&lt;/STRONG&gt;: A unique ID for this group&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;When to Use Transactions&lt;/H2&gt;
&lt;P&gt;&lt;STRONG&gt;Use transactions when you want to:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;See the complete lifecycle of a process or user session&lt;/LI&gt;
&lt;LI&gt;Understand what happened during a security incident&lt;/LI&gt;
&lt;LI&gt;Track user behavior over time&lt;/LI&gt;
&lt;LI&gt;Analyze application workflows&lt;/LI&gt;
&lt;LI&gt;Investigate suspicious activity patterns&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Don't use transactions when you:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Just want to count events or get statistics&lt;/LI&gt;
&lt;LI&gt;Need to see individual events separately&lt;/LI&gt;
&lt;LI&gt;Are looking for simple yes/no answers&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;Common Patterns&lt;/H2&gt;
&lt;H3&gt;Track User Sessions&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-xql"&gt;| transaction user_name, source_ip span=30M
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;"Group activities by user and IP address within 30-minute windows"&lt;/EM&gt;&lt;/P&gt;
&lt;H3&gt;Follow Process Activity&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-xql"&gt;| transaction hostname, process_id span=2H maxevents=100
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;"Group events by computer and process within 2-hour windows"&lt;/EM&gt;&lt;/P&gt;
&lt;H3&gt;Investigate Security Incidents&lt;/H3&gt;
&lt;PRE&gt;&lt;CODE class="language-xql"&gt;| transaction user_name, asset_name span=1D
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;"Group daily activity by user and computer"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Remember: Transactions help you see the &lt;STRONG&gt;big picture&lt;/STRONG&gt; by connecting related events, making it easier to understand what really happened in your environment.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 19:20:56 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsiam-discussions/question-on-transaction-stage-in-xql/m-p/1231117#M205</guid>
      <dc:creator>A.Elzedy</dc:creator>
      <dc:date>2025-06-24T19:20:56Z</dc:date>
    </item>
  </channel>
</rss>

