Hello, I want to delete the machines in MIA in bat...
# fleet
d
Hello, I want to delete the machines in MIA in batches. Is there any good method?
a
I recommend leveraging the API for this 1. Get all the hosts and filter by MIA. Put them in a list. https://github.com/fleetdm/fleet/blob/master/docs/1-Using-Fleet/3-REST-API.md#list-hosts 2. Delete them by their ID leveraging the API again? https://github.com/fleetdm/fleet/blob/master/docs/1-Using-Fleet/3-REST-API.md#delete-host
z
Or you can set up "host expiry" in the advanced options of the app settings page, which will automatically remove old hosts.
🙌 1
d
hi,@zwass why is set up "host expiry" appear this error
z
Ah, I guess you need to enable the events system in MySQL. How you do that probably depends on how you run MySQL so I'd check your documentation for that.
d
When you say "enable the events system in MySQL", do you mean to enable the event scheduler of MySQL?(temporal triggers?) Because MySQL on my side is in the charge of operation and maintenance personnel, I am not very clear about the Settings in MySQL
z
Correct
d
OK, thank you for your help. I will communicate with the personnel in charge of MySQL.
🍻 1
OK, after I open the MySQL EVENT_SCHEDULER, normal setting can be carried out. Thank you for your help!
1