Title
#fleet
Dan Achin

Dan Achin

01/11/2021, 7:28 PM
Hey Fleet community. Is there a way to export the hosts out of Fleet in general, or for a specific label or labels? We are looking to try and audit what's registered vs what isn't and the way we have done that to date is to run a simple ad-hoc query and then export the results. That said, I routinely see these UI queries get stuck after completing on some # of hosts. I am theorizing that this is because some of the hosts are offline, but I don't know for sure. First question, is if there's a better way to export the clients and the follow up is what causes the ad-hoc queires to get stuck? I know that we can use the --exit flag with fleetctl and that skips offline hosts, but assume the UI doesn't do that. FYI, we are still on the last Kolide Fleet version so if any of the behavior has changed with what I'm going to ask about, let me know.
zwass

zwass

01/11/2021, 7:29 PM
Does
fleetctl get hosts
do what you need?
Dan Achin

Dan Achin

01/11/2021, 7:40 PM
oh...let me try that @zwass.
7:43 PM
yes...that gets me a total list of hosts, but we'll need a way to map these to node key. can I pass it filter criteria?
zwass

zwass

01/11/2021, 7:51 PM
If you need node key you might do best querying Fleet's MySQL db directly. Can you explain more about why you need node key in this scenario? Maybe we can have Fleet better support what you are trying to do.
7:52 PM
Side note, your queries are probably "hanging" because they are waiting for offline hosts to come online and respond. You can always just hit the stop button or leave the page to stop the query running. Any hosts that have already responded will not receive the query again.
Dan Achin

Dan Achin

01/11/2021, 8:00 PM
@zwass, thanks - I assumed as much about the queries The reason I said we needed the node key mapping is because it's the first column of the output from
fleetctl get hosts
but I didn't look that carefully. I see we have hosts names as well
8:00 PM
i think that will work for us! we can just filter after
8:00 PM
thanks much for that
zwass

zwass

01/11/2021, 8:01 PM
Great!
zwass

zwass

01/11/2021, 8:31 PM
We are shooting for the next release around the end of the month for a substantial portion of that.
Noah Talerman

Noah Talerman

01/12/2021, 5:23 PM
Hi Dan, glad you found a solution. If you feel comfortable answering, what’s your next step after auditing what’s registered vs what isn’t? Are you inquiring to compile into a report, are you trying to catch unenrolled hosts to later enroll them, or something different?
Dan Achin

Dan Achin

01/12/2021, 7:30 PM
@Noah Talerman, the reason I was even looking for this is so that our internal CIT team could audit which servers have registered to our corp Fleet vs which hadn't. We have labels for them currently based on hardware and a couple of other points of data, but there are around 300 of them out of the current 2500+ systems we have in this particular Fleet env so paging through the UI and trying to account for them all isn't tenable. Eventually we'll want to do this auditing across all the Fleet environments - i.e. did all 3000 Macs register? did all nodes from X service get registered? etc
Noah Talerman

Noah Talerman

01/13/2021, 1:25 AM
Thanks for the detailed response Dan. Reading about your what you’d like to eventually achieve with Fleet is great. We’re currently exploring possible ways to expose the number of hosts actually registered vs the number of hosts expected to be registered.
did all 3000 Macs register? did all nodes from X service get registered?
These questions/goals are especially helpful for discovering a common problem Fleet can solve.