XQL query for host inventory with versions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

XQL query for host inventory with versions

L0 Member

Hi,

 

I need a XQL query which outputs all endpoints and installed versions of a specific application. I found a way to get all computers with the application installed, but no version of it:

 config case_sensitive = false
| dataset = host_inventory
| filter applications != null
| arrayexpand applications
| alter applications=json_extract(applications, "$.application_name")
| filter applications contains "google chrome"
| fields applications, host_name
| dedup host_name by asc host_name 

 

Just kind of similar to the Host Insights, which outputs the version of the application. Any help would be appreciated.

 

Thanks!

1 accepted solution

Accepted Solutions

L6 Presenter

Hello @JustJulian ,

 

Here you go:
dataset = host_inventory
| filter applications != null
| arrayexpand applications
| alter applications=json_extract(applications, "$.application_name"), software_vendor = json_extract(applications, "$.vendor"), software_verion = json_extract(applications, "$.version")
| filter applications contains "google chrome"
| fields applications, host_name, software_vendor , software_verion
| dedup host_name by asc host_name

 

If you feel this has answered your query, please let us know by clicking like and  on "mark this as a Solution". Thank you.

Ashutosh Patil

View solution in original post

2 REPLIES 2

L6 Presenter

Hello @JustJulian ,

 

Here you go:
dataset = host_inventory
| filter applications != null
| arrayexpand applications
| alter applications=json_extract(applications, "$.application_name"), software_vendor = json_extract(applications, "$.vendor"), software_verion = json_extract(applications, "$.version")
| filter applications contains "google chrome"
| fields applications, host_name, software_vendor , software_verion
| dedup host_name by asc host_name

 

If you feel this has answered your query, please let us know by clicking like and  on "mark this as a Solution". Thank you.

Ashutosh Patil

Thank you, this works great!

  • 1 accepted solution
  • 280 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!