<?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: Query to get the number of the operating system. in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-get-the-number-of-the-operating-system/m-p/521564#M3160</link>
    <description>&lt;P&gt;Thank you for the response .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Since we have kuberneted we need an output where it gives us windows, Linux and kuberenetes&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Would that be possible with this ? As the data sets for both are different&lt;/SPAN&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;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Nov 2022 18:10:24 GMT</pubDate>
    <dc:creator>Shashanksinha</dc:creator>
    <dc:date>2022-11-17T18:10:24Z</dc:date>
    <item>
      <title>Query to get the number of the operating system.</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-get-the-number-of-the-operating-system/m-p/521529#M3156</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have used the below query to get the number of the operating system.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;dataset = endpoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| filter endpoint_status = CONNECTED&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter operating_system = to_json_string(operating_system)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter operating_system1 = regextract(operating_system , "[^\.]*(Centos|RHEL|Amazon|Windows|Ubuntu)")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter operating_system2 = arraystring(operating_system1 , ":")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| fields operating_system , endpoint_name, operating_system2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| comp count(endpoint_name) as counter by operating_system2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| sort desc counter&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I go forward from here and display the sum of RHEL, CENTOS as Linux in the table .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 13:21:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-get-the-number-of-the-operating-system/m-p/521529#M3156</guid>
      <dc:creator>Shashanksinha</dc:creator>
      <dc:date>2022-11-17T13:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Query to get the number of the operating system.</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-get-the-number-of-the-operating-system/m-p/521552#M3159</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/203123"&gt;@Shashanksinha&lt;/a&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If your goal is to count the number of agents by OS and simplify its grouping, I would suggest using the “agent_os_type” filter under the xdr_data dataset. This filter groups agent OS types that are currently connected (example output: AGENT_OS_WINDOWS). You can then take it a step further using “dedup” to establish a single entry per IP address associated with the connected operating systems. This query could look something like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;dataset = xdr_data&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| filter agent_os_type != NULL and agent_ip_addresses != NULL&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| fields agent_os_type as type, agent_ip_addresses as ip&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| dedup ip by asc ip&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| comp count(type) as count by type&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope that helps! I would also be curious to know if this solved your issue.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 16:48:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-get-the-number-of-the-operating-system/m-p/521552#M3159</guid>
      <dc:creator>mfakhouri</dc:creator>
      <dc:date>2022-11-17T16:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Query to get the number of the operating system.</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-get-the-number-of-the-operating-system/m-p/521564#M3160</link>
      <description>&lt;P&gt;Thank you for the response .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Since we have kuberneted we need an output where it gives us windows, Linux and kuberenetes&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Would that be possible with this ? As the data sets for both are different&lt;/SPAN&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;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 18:10:24 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-get-the-number-of-the-operating-system/m-p/521564#M3160</guid>
      <dc:creator>Shashanksinha</dc:creator>
      <dc:date>2022-11-17T18:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Query to get the number of the operating system.</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-get-the-number-of-the-operating-system/m-p/521575#M3162</link>
      <description>&lt;P&gt;&lt;SPAN&gt;No problem!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I tweaked the prior query to also be compatible with the endpoints dataset:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;dataset = endpoints&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| filter endpoint_status = CONNECTED&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| filter operating_system != null and last_seen != null&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| fields operating_system as type, last_seen as ls&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| dedup ls by desc ls&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;| comp count(type) as count by type&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The IP address field doesn’t seem to be compatible with the query when the dataset is set to endpoints. But, I’ve found similar functionality with the agent “last_seen” field. This is likely due to the data type that is used depending on the dataset. How does this query work out with your implementation?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 20:27:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-get-the-number-of-the-operating-system/m-p/521575#M3162</guid>
      <dc:creator>mfakhouri</dc:creator>
      <dc:date>2022-11-17T20:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Query to get the number of the operating system.</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-get-the-number-of-the-operating-system/m-p/521675#M3164</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the response .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently this query gives me operating system individually .But I want to be able to sumup 3 operating systems and name them as Linux and do the same for windows .&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 12:05:06 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-get-the-number-of-the-operating-system/m-p/521675#M3164</guid>
      <dc:creator>Shashanksinha</dc:creator>
      <dc:date>2022-11-18T12:05:06Z</dc:date>
    </item>
  </channel>
</rss>

