Good afternoon all. Does anyone know of a way that...
# fleet
k
Good afternoon all. Does anyone know of a way that we can provide a list of hostnames for query targets, either in the UI or API?
k
Hi @Keiran. In the Fleet UI, you can target hosts by hostname using the search bar. To do that through the api, you'd need to make multiple calls, first to fetch the IDs of the hosts you want to query using the hostname as identifier, then to run the query. With
fleetctl
, you can run a query and pass a comma separated list of hostnames to target.
Copy code
fleetctl query --query "SELECT 1 WHERE 1=1" --hosts "first,second,third"
k
Hi Kathy. I really appreciate your input!
k
Any time!