Hey Fleet community. Is there a way to export the...
# fleet
d
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.
z
Does
fleetctl get hosts
do what you need?
d
oh...let me try that @zwass.
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?
z
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.
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.
🙏 1
d
@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
i think that will work for us! we can just filter after
thanks much for that
z
Great!
d
z
We are shooting for the next release around the end of the month for a substantial portion of that.
👍 1
n
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?
👍 1
d
@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
💯 1
n
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.