<?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 Software Inventory query in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577676#M6095</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using following query to get software inventory and it is working well. However to the results, as last column, I would like to add number of hosts which have particular software.&amp;nbsp; Could somebody advise how to do this please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;dataset = host_inventory
| arrayexpand applications
| alter software = json_extract(applications, "$.application_name"),software_vendor = json_extract(applications, "$.vendor")
| filter os_type = ENUM.OS_WINDOWS and product_type != ENUM.SERVER
| dedup software 
| fields software,software_vendor&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Feb 2024 16:56:26 GMT</pubDate>
    <dc:creator>Piotr_Kowalczyk</dc:creator>
    <dc:date>2024-02-19T16:56:26Z</dc:date>
    <item>
      <title>Software Inventory query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577676#M6095</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using following query to get software inventory and it is working well. However to the results, as last column, I would like to add number of hosts which have particular software.&amp;nbsp; Could somebody advise how to do this please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;dataset = host_inventory
| arrayexpand applications
| alter software = json_extract(applications, "$.application_name"),software_vendor = json_extract(applications, "$.vendor")
| filter os_type = ENUM.OS_WINDOWS and product_type != ENUM.SERVER
| dedup software 
| fields software,software_vendor&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 16:56:26 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577676#M6095</guid>
      <dc:creator>Piotr_Kowalczyk</dc:creator>
      <dc:date>2024-02-19T16:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Software Inventory query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577782#M6101</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/248369"&gt;@Piotr_Kowalczyk&lt;/a&gt;, thanks for reaching us using the Live Community.&lt;/P&gt;
&lt;P&gt;Please try this one:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;dataset = host_inventory
| arrayexpand applications
| alter software = json_extract(applications, "$.application_name"),software_vendor = json_extract(applications, "$.vendor")
| filter os_type = ENUM.OS_WINDOWS and product_type != ENUM.SERVER
| fields software,software_vendor, agent_name 
| comp count(agent_name) as installations by software,software_vendor 
| sort desc installations &lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 20 Feb 2024 18:19:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577782#M6101</guid>
      <dc:creator>jmazzeo</dc:creator>
      <dc:date>2024-02-20T18:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Software Inventory query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577844#M6104</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/248369"&gt;@Piotr_Kowalczyk&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Agent name may not be the good&amp;nbsp;&lt;SPAN&gt;field to use for your use case.&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="1708483845.053909" class="c-virtual_list__item" tabindex="-1" role="listitem" aria-setsize="-1" data-qa="virtual-list-item" data-item-key="1708483845.053909"&gt;
&lt;DIV class="c-message_kit__background p-message_pane_message__message c-message_kit__message" role="presentation" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover" role="document" aria-roledescription="message" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--default"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text" data-qa="message-text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;DIV class="p-rich_text_section"&gt;agent_name is endpoint alias value&lt;SPAN&gt;&amp;nbsp;. It is&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;not necessarily all endpoints would have value defined in endpoint alias. Instead replace it with the hostname.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;SPAN&gt;&lt;SPAN&gt;dataset = host_inventory&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| arrayexpand applications&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter software = json_extract(applications, "$.application_name"),software_vendor = json_extract(applications, "$.vendor"), software_verion = json_extract(applications, "$.version")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| filter os_type = ENUM.OS_WINDOWS and product_type != ENUM.SERVER&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| fields software,software_vendor,software_verion ,host_name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;|comp count(host_name ) as installations by software,software_vendor , software_verion&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;|sort desc installations&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;SPAN&gt;&lt;SPAN&gt;If you feel this has answered your query, please let us know by clicking on "mark this as a Solution". Thank you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Feb 2024 06:11:00 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577844#M6104</guid>
      <dc:creator>aspatil</dc:creator>
      <dc:date>2024-02-21T06:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Software Inventory query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577856#M6107</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/248369"&gt;@Piotr_Kowalczyk&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Using dataset which runs for 90 days, you will get multiple entries of same endpoint which may result in discrepancy in count. Instead you can call the preset.&lt;/P&gt;
&lt;P&gt;preset = host_inventory_applications&lt;BR /&gt;| fields application_name , vendor , version , endpoint_name &lt;BR /&gt;| comp count(endpoint_name) as installations by application_name , vendor , version &lt;BR /&gt;| sort desc installations&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you feel this has answered your query, please let us know by clicking on "mark this as a Solution". Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 08:00:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577856#M6107</guid>
      <dc:creator>aspatil</dc:creator>
      <dc:date>2024-02-21T08:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Software Inventory query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577868#M6109</link>
      <description>&lt;P&gt;Aspatil, many thanks for your answer. Indeed using preset was better option as it didn't multiple values when run on 30 days. Will you be able to tell me why&amp;nbsp;&lt;SPAN&gt;dataset = host_inventory gives multiple&amp;nbsp;values but&amp;nbsp;preset = host_inventory_application doesn't please?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 09:42:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577868#M6109</guid>
      <dc:creator>Piotr_Kowalczyk</dc:creator>
      <dc:date>2024-02-21T09:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Software Inventory query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577869#M6110</link>
      <description>&lt;P&gt;Jmazzeo, many thanks for your reply. It was very close to what I was looking for, however when I run it on more than 24 hours it showed multiple values.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 09:43:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577869#M6110</guid>
      <dc:creator>Piotr_Kowalczyk</dc:creator>
      <dc:date>2024-02-21T09:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Software Inventory query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577873#M6111</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/248369"&gt;@Piotr_Kowalczyk&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason is dataset contains the raw data. Hence whenever scan happens the data get saved in it. The most important factor is _time field. I found that the multiple entries has different time, hence incorrect count. But, Preset has more efficient data and only contains required fields.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 09:56:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577873#M6111</guid>
      <dc:creator>aspatil</dc:creator>
      <dc:date>2024-02-21T09:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Software Inventory query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577878#M6114</link>
      <description>&lt;P&gt;Thank you, Aspatil!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 10:15:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/software-inventory-query/m-p/577878#M6114</guid>
      <dc:creator>Piotr_Kowalczyk</dc:creator>
      <dc:date>2024-02-21T10:15:04Z</dc:date>
    </item>
  </channel>
</rss>

