Using XDR Host Insights and XQL to report of machines with specific software

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

Using XDR Host Insights and XQL to report of machines with specific software

L1 Bithead

Hello All

 

 

I would like to use host insights to provide a list of each machine with a specific software installed.

For example computer that have software containing 'docker'

 

I can go to host insights, Applications, filter to include 'docker' and see the versions and numbers of assets. however you cannot export the lost of each asset here, just the versions and numbers.

 

I am new to XQL and have not managed to create a query for the host_inventory dataset. 

 

 

1 accepted solution

Accepted Solutions

L5 Sessionator

Hi @GarethDavies Does the query below aid you? 

config case_sensitive = false timeframe=365d 
| dataset = host_inventory
| filter applications != null
| arrayexpand applications
| alter applications=json_extract(applications, "$.application_name")
| filter applications contains "docker"
|fields applications, ip_addresses, host_name

 

View solution in original post

4 REPLIES 4

L5 Sessionator

Hi @GarethDavies Does the query below aid you? 

config case_sensitive = false timeframe=365d 
| dataset = host_inventory
| filter applications != null
| arrayexpand applications
| alter applications=json_extract(applications, "$.application_name")
| filter applications contains "docker"
|fields applications, ip_addresses, host_name

 

L1 Bithead

Hello Thank you 

 

that solution will work and gives me the raw output that I can investigate further , I see I can add more fields that I may want in the last line 

Hi Bbarmanroy,thank you for sharing. I try to output more fields, such as the application version, but it doesn't work. Look forward to your suggestions.

 

config case_sensitive = false timeframe=365d
| dataset = host_inventory
| filter applications != null
| arrayexpand applications
| alter applications=json_extract(applications, "$.application_name")
| alter version=json_extract(applications, "$.raw_version")
|fields applications, ip_addresses, host_name, version

 

huwang_0-1649818673202.png

 

Hi @huwang use version instead of raw_version.

 

bbarmanroy_0-1649822346830.png

 

  • 1 accepted solution
  • 4785 Views
  • 4 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!