<?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 for highest available install date of KBs / checking hosts for installed win updates in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515697#M2871</link>
    <description>&lt;P&gt;So, nevertheless the install_date as string is hard to filter by date.&lt;BR /&gt;To resolve this, parse_timestamp might be a solution, but i dont get how it works...&lt;/P&gt;
&lt;P&gt;The install_date string is&amp;nbsp;&lt;SPAN&gt;"2022-08-11" which i'd like to convert to something filterable like "Aug&amp;nbsp;11th 2022".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Sep 2022 14:21:39 GMT</pubDate>
    <dc:creator>RonaldWeiss</dc:creator>
    <dc:date>2022-09-22T14:21:39Z</dc:date>
    <item>
      <title>XQL for highest available install date of KBs / checking hosts for installed win updates</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515654#M2866</link>
      <description>&lt;P&gt;Hello dear community,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my goal is to see which host has not actual windows kbs installed. I would need the last KB installed information per host.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I need to limit it per host, and not through the whole query result. Do you have an Idea how to get this running? Maybe you have another ideas how we can check fast which host is not Windows up to date with Cortex XDR Pro?&lt;/P&gt;
&lt;P&gt;I also thought about to filter it for hosts which have not installed anything from the actual month. Maybe it is a better and faster way?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;config case_sensitive = false&lt;BR /&gt;| dataset = host_inventory&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;| arrayexpand kbs&lt;BR /&gt;| alter kbnr = json_extract(kbs , "$.name"), install_date = json_extract(kbs , "$.installation_date")&lt;BR /&gt;| fields host_name, kbs, install_date&lt;BR /&gt;| limit 1 // Limiting the results to only the top 1&lt;BR /&gt;|sort desc install_date&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rob&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 22:01:02 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515654#M2866</guid>
      <dc:creator>RFeyertag</dc:creator>
      <dc:date>2022-09-21T22:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: XQL for highest available install date of KBs / checking hosts for installed win updates</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515674#M2869</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/190671"&gt;@RFeyertag&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead of running an XQL query, you can also consider running scripts on the endpoints with XDR Pro Capabilities enabled.&amp;nbsp;&lt;BR /&gt;Simply, go to script execution, select execute commands and run the following command&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;wmic qfe GET HotFixID, InstalledOn&lt;/LI-CODE&gt;
&lt;P&gt;Select your target endpoints and run the script on the same. You should be able to get the latest KBs on all endpoints with their install dates. You can pull the CSV or report widget for the same and tally your data with the latest KB dates and build number.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;If you still need to consider the query mechanism, you can filter it by hostname.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 05:13:05 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515674#M2869</guid>
      <dc:creator>neelrohit</dc:creator>
      <dc:date>2022-09-22T05:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: XQL for highest available install date of KBs / checking hosts for installed win updates</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515696#M2870</link>
      <description>&lt;P&gt;Perhaps this might be what you want:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;config case_sensitive = false&lt;BR /&gt;| dataset = host_inventory&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;| arrayexpand kbs&lt;BR /&gt;| alter kbnr = json_extract(kbs , "$.name"), install_date = json_extract(kbs , "$.installation_date")&lt;BR /&gt;| fields host_name, kbnr , install_date &lt;BR /&gt;|dedup host_name by desc install_date &lt;BR /&gt;| sort asc install_date&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and after that, perhaps a "|limit 50"&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 14:26:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515696#M2870</guid>
      <dc:creator>RonaldWeiss</dc:creator>
      <dc:date>2022-09-22T14:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: XQL for highest available install date of KBs / checking hosts for installed win updates</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515697#M2871</link>
      <description>&lt;P&gt;So, nevertheless the install_date as string is hard to filter by date.&lt;BR /&gt;To resolve this, parse_timestamp might be a solution, but i dont get how it works...&lt;/P&gt;
&lt;P&gt;The install_date string is&amp;nbsp;&lt;SPAN&gt;"2022-08-11" which i'd like to convert to something filterable like "Aug&amp;nbsp;11th 2022".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 14:21:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515697#M2871</guid>
      <dc:creator>RonaldWeiss</dc:creator>
      <dc:date>2022-09-22T14:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: XQL for highest available install date of KBs / checking hosts for installed win updates</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515783#M2888</link>
      <description>&lt;P&gt;You can sort out the parse_timestamp with this line:&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;alter install_date_mod = parse_timestamp("\"%Y-%m-%d\"", install_date&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note the use of regex to escape the double-quotes that comes as part of the default install_date string.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the whole query would look like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;dataset = host_inventory
| arrayexpand kbs
| alter kbnr = json_extract(kbs , "$.name"), install_date = json_extract(kbs , "$.installation_date")
| fields host_name, kbnr , install_date
| alter install_date = parse_timestamp("\"%Y-%m-%d\"", install_date)
| dedup host_name by desc install_date
| sort asc install_date&lt;/LI-CODE&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 06:22:20 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515783#M2888</guid>
      <dc:creator>bbarmanroy</dc:creator>
      <dc:date>2022-09-23T06:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: XQL for highest available install date of KBs / checking hosts for installed win updates</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515884#M2891</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/142551"&gt;@neelrohit&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will note this query for other use cases, but for my use case it isn't the best solution, because this is an live query.&lt;/P&gt;
&lt;P&gt;The agents are sometimes 2 or 3 weeks offline. So it would need much time to run after them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And with the xql query I have 98% coverage of all of our agents.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rob&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2022 20:23:22 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515884#M2891</guid>
      <dc:creator>RFeyertag</dc:creator>
      <dc:date>2022-09-24T20:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: XQL for highest available install date of KBs / checking hosts for installed win updates</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515885#M2892</link>
      <description>&lt;P&gt;Thank you very much!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My final query, which was integrated into a widget and dashboard:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;config timeframe between "-1y" and "+5d" &lt;BR /&gt;|dataset = host_inventory&lt;BR /&gt;| arrayexpand kbs&lt;BR /&gt;| alter kbnr = json_extract(kbs , "$.name"), install_date = json_extract(kbs , "$.installation_date")&lt;BR /&gt;| fields host_name, kbnr , install_date, agent_domain &lt;BR /&gt;| alter install_date = parse_timestamp("\"%Y-%m-%d\"", install_date)&lt;BR /&gt;| dedup host_name, agent_domain by desc install_date&lt;BR /&gt;| sort asc install_date&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some issues with the content can be found in this conversation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/host-inventory-installed-kbs-no-entry/td-p/515883" target="_blank"&gt;https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/host-inventory-installed-kbs-no-entry/td-p/515883&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rob&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2022 20:26:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-for-highest-available-install-date-of-kbs-checking-hosts-for/m-p/515885#M2892</guid>
      <dc:creator>RFeyertag</dc:creator>
      <dc:date>2022-09-24T20:26:35Z</dc:date>
    </item>
  </channel>
</rss>

