<?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: XQL converting Bytes to MB or GB in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/563928#M5462</link>
    <description>&lt;P&gt;This is very helpful. Would be nice if you could add a date to the graph to know when an endpoint took action.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Nov 2023 17:56:31 GMT</pubDate>
    <dc:creator>MosR</dc:creator>
    <dc:date>2023-11-01T17:56:31Z</dc:date>
    <item>
      <title>XQL converting Bytes to MB or GB</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/488336#M2013</link>
      <description>&lt;P&gt;Hey!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was just wondering if anyone knows of a way to get the total download/upload to show in MB or GB rather than bytes through an XQL queries' output?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;XQL Query&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;dataset = xdr_data // Using the xdr dataset&lt;BR /&gt;| filter event_type = ENUM.NETWORK // Filtering by network activity&lt;BR /&gt;| fields action_upload, action_remote_ip as remote_ip, action_external_hostname as remote_hostname, actor_process_image_name as process_name // Selecting the relevant fields&lt;BR /&gt;| comp sum(action_upload) as total_upload by process_name, remote_ip, remote_hostname // Summing the total upload by process + ip + host&lt;BR /&gt;| sort desc total_upload // Sorting by total upload&lt;BR /&gt;| limit 10 // Limiting the results to only the top 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 20:29:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/488336#M2013</guid>
      <dc:creator>Bojan-Totic</dc:creator>
      <dc:date>2022-05-18T20:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: XQL converting Bytes to MB or GB</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/488519#M2016</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/213553"&gt;@Bojan-Totic&lt;/a&gt;&amp;nbsp;Please try the below XQL query, you should be able to get your result in MB, similarly you can also convert into GB as per your convenience.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dataset = xdr_data // Using the xdr dataset
| filter event_type = ENUM.NETWORK // Filtering by network activity
| fields action_upload, action_remote_ip as remote_ip, action_external_hostname as remote_hostname, actor_process_image_name as process_name // Selecting the relevant fields
| comp sum(action_upload) as t_upload by process_name, remote_ip, remote_hostname // Summing the total upload by process + ip + host
| alter total_upload = to_integer(divide(t_upload,1048576))//1 MB == 1,048,576 Bytes (Based on the maths, if it is correct we can use the value.) 
| fields remote_ip,remote_hostname,process_name,total_upload
| sort desc total_upload// Sorting by total upload
| limit 10 // Limiting the results to only the top 10 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 09:15:21 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/488519#M2016</guid>
      <dc:creator>KanwarSingh01</dc:creator>
      <dc:date>2022-05-19T09:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: XQL converting Bytes to MB or GB</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/488741#M2018</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/213553"&gt;@Bojan-Totic&lt;/a&gt;&amp;nbsp;This is what I use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;preset = network_story&lt;BR /&gt;| fields action_total_upload as upload, action_local_ip as source_ip, action_local_port as source_port, action_remote_ip as dst_ip, action_remote_port as dst_port,dst_action_external_hostname as hostname, actor_process_image_name as process_name&lt;BR /&gt;| comp sum(upload ) as total_upload by source_ip , dst_ip , hostname , process_name, source_port, dst_port&lt;BR /&gt;| alter total_upload_KB = divide(total_upload , 1024) // convert bytes to KB&lt;BR /&gt;| alter total_upload_MB = divide(total_upload_KB , 1024) // convert KB to MB&lt;BR /&gt;| alter total_upload_GB = divide(total_upload_MB , 1024) // convert MB to GB&lt;BR /&gt;|alter total_upload_GB_rounded = round(total_upload_GB) // round float to integer&lt;BR /&gt;|fields source_ip , source_port, dst_ip , dst_port, dst_port, hostname , process_name, total_upload_GB_rounded&lt;BR /&gt;|sort desc total_upload_GB_rounded&lt;BR /&gt;| view graph type = scatter header = "Large Uploads" xaxis = source_ip yaxis = total_upload_GB_rounded xaxistitle = "Source IP Address" yaxistitle = "GB uploaded" &lt;/PRE&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="bbarmanroy_0-1653015323519.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/41074iEE43BEEAAB5BFF41/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="bbarmanroy_0-1653015323519.png" alt="bbarmanroy_0-1653015323519.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 03:08:22 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/488741#M2018</guid>
      <dc:creator>bbarmanroy</dc:creator>
      <dc:date>2022-05-20T03:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: XQL converting Bytes to MB or GB</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/491714#M2034</link>
      <description>&lt;P&gt;Thank you both so much, that worked great &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Love the visual representation as well!&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 15:06:16 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/491714#M2034</guid>
      <dc:creator>Bojan-Totic</dc:creator>
      <dc:date>2022-05-25T15:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: XQL converting Bytes to MB or GB</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/563928#M5462</link>
      <description>&lt;P&gt;This is very helpful. Would be nice if you could add a date to the graph to know when an endpoint took action.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 17:56:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/563928#M5462</guid>
      <dc:creator>MosR</dc:creator>
      <dc:date>2023-11-01T17:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: XQL converting Bytes to MB or GB</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/564311#M5475</link>
      <description>&lt;P&gt;Here is another one using the pow function.&amp;nbsp;&lt;BR /&gt;| alter total_mbytes = round(divide(t_upload, pow(2,20)))&lt;BR /&gt;| alter total_gbytes = round(divide(t_upload, pow(2,30)))&lt;BR /&gt;| alter total_tbytes = round(divide(t_upload, pow(2,40)))&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 13:39:50 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-converting-bytes-to-mb-or-gb/m-p/564311#M5475</guid>
      <dc:creator>JRzepka</dc:creator>
      <dc:date>2023-11-03T13:39:50Z</dc:date>
    </item>
  </channel>
</rss>

