<?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: Group events with xql bin stage in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598890#M7237</link>
    <description>&lt;P&gt;I have tried you query, and in my case it also showed incorrect numbers.&lt;/P&gt;
&lt;P&gt;I have added the timeshift and my timezone and it worked well:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;config timeframe = 30d&lt;BR /&gt;| dataset = incidents &lt;BR /&gt;| sort desc creation_time&lt;BR /&gt;| bin creation_time span = 1D timeshift = 1615353499 timezone = "-3:00"&lt;BR /&gt;| comp count(creation_time ) as incidents_by_day by creation_time&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take a look at this &lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-XQL-Language-Reference/Bin" target="_self"&gt;documentation&lt;/A&gt; statement: &lt;EM&gt;"The query still runs without defining the epoch time or time zone. If no&amp;nbsp;&lt;CODE class="code hljs language-ini"&gt;&lt;SPAN class="hljs-attr"&gt;timeshift&lt;/SPAN&gt;&amp;nbsp;= &amp;lt;epoch time&amp;gt; timezone =&amp;nbsp;&lt;SPAN class="hljs-string"&gt;"&amp;lt;time zone&amp;gt;"&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;is set, the query runs according to last time set in the log."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2024 17:58:55 GMT</pubDate>
    <dc:creator>jmazzeo</dc:creator>
    <dc:date>2024-09-26T17:58:55Z</dc:date>
    <item>
      <title>Group events with xql bin stage</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598851#M7227</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I try to count some events per day and used the bin stage to do this. It does work to group the events together but the time is wrong. For example an event at 00:30 will count for the day before (probably because of the timezone). I tried different configurations with the optional parameter timeshift and timezone but I'm not able to get it working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone know how set the timeshift and timezone parameter correct so the event are grouped together correctly?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 12:37:01 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598851#M7227</guid>
      <dc:creator>micomi</dc:creator>
      <dc:date>2024-09-26T12:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Group events with xql bin stage</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598873#M7232</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/41187"&gt;@micomi&lt;/a&gt;, thanks for reaching us using the Live Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share an example of the XQL query? Please obfuscate any sensitive content.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 15:38:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598873#M7232</guid>
      <dc:creator>jmazzeo</dc:creator>
      <dc:date>2024-09-26T15:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Group events with xql bin stage</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598879#M7234</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/310428"&gt;@jmazzeo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sure, this is a simple query to show the incident per day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;config timeframe = 30d&lt;BR /&gt;| dataset = incidents &lt;BR /&gt;| sort desc creation_time&lt;BR /&gt;| bin creation_time span = 1D&lt;BR /&gt;| comp count(creation_time ) as incidents_by_day by creation_time &lt;/PRE&gt;
&lt;P&gt;With this i get these results:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="micomi_0-1727368567609.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/62422i3766CF6A887F32D8/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="micomi_0-1727368567609.png" alt="micomi_0-1727368567609.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The issue is that i groups the incidents by 2 o'clock am. But I want to group per day, from midnight to midnight.&lt;/P&gt;
&lt;P&gt;The numbers in screenshot aren't correct. The correct numbers should be:&lt;/P&gt;
&lt;P&gt;26.09 &amp;gt; 4&lt;BR /&gt;25.09 &amp;gt; 4&lt;BR /&gt;24.09 &amp;gt; 5&lt;/P&gt;
&lt;P&gt;You can check it yourself with this screenshot:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="micomi_1-1727368690643.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/62423iC61765F7C3836816/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="micomi_1-1727368690643.png" alt="micomi_1-1727368690643.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The issue are those incidents which were generated shortly after midnight.&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 16:38:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598879#M7234</guid>
      <dc:creator>micomi</dc:creator>
      <dc:date>2024-09-26T16:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Group events with xql bin stage</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598890#M7237</link>
      <description>&lt;P&gt;I have tried you query, and in my case it also showed incorrect numbers.&lt;/P&gt;
&lt;P&gt;I have added the timeshift and my timezone and it worked well:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;config timeframe = 30d&lt;BR /&gt;| dataset = incidents &lt;BR /&gt;| sort desc creation_time&lt;BR /&gt;| bin creation_time span = 1D timeshift = 1615353499 timezone = "-3:00"&lt;BR /&gt;| comp count(creation_time ) as incidents_by_day by creation_time&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Take a look at this &lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-XQL-Language-Reference/Bin" target="_self"&gt;documentation&lt;/A&gt; statement: &lt;EM&gt;"The query still runs without defining the epoch time or time zone. If no&amp;nbsp;&lt;CODE class="code hljs language-ini"&gt;&lt;SPAN class="hljs-attr"&gt;timeshift&lt;/SPAN&gt;&amp;nbsp;= &amp;lt;epoch time&amp;gt; timezone =&amp;nbsp;&lt;SPAN class="hljs-string"&gt;"&amp;lt;time zone&amp;gt;"&lt;/SPAN&gt;&lt;/CODE&gt;&amp;nbsp;is set, the query runs according to last time set in the log."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 17:58:55 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598890#M7237</guid>
      <dc:creator>jmazzeo</dc:creator>
      <dc:date>2024-09-26T17:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Group events with xql bin stage</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598958#M7239</link>
      <description>&lt;P&gt;I don't get it to work. What value should I choose for timeshift?&lt;/P&gt;
&lt;P&gt;For the timezone I use a CEST timezone but it still doesn't work. Same behaviour as before.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 11:28:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598958#M7239</guid>
      <dc:creator>micomi</dc:creator>
      <dc:date>2024-09-27T11:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Group events with xql bin stage</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598996#M7243</link>
      <description>&lt;P&gt;You need to use the same timeshift value that shows the documentation:&amp;nbsp;&lt;SPAN&gt;1615353499&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 15:50:24 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-events-with-xql-bin-stage/m-p/598996#M7243</guid>
      <dc:creator>jmazzeo</dc:creator>
      <dc:date>2024-09-27T15:50:24Z</dc:date>
    </item>
  </channel>
</rss>

