Is there a way to automatically delete an offline ...
# fleet
d
Is there a way to automatically delete an offline host after X days of inactive? I do not see there is such a configuration in fleet configuration https://fleetdm.com/docs/deploying/configuration The use case is this. In our infra, all newly created hosts in OCI automatically install osquery agent and connect to our fleet server. However, when some hosts are terminated, these host still ghost in the fleet UI. The solution right now is we manually delete them, but it's not ideal.
k
Hi, @Dawei Zhang. Thanks for reaching out, it looks like you found a hole in the documentation and I'll make sure I get that sorted! You can set up host expiration in the UI under Settings > Organizational settings > Advanced options. Select the checkmark for "Host expiry" and then set the window to the number of days that should be allowed before the host is removed. The example below would clear out hosts that haven't checked in after 1 year. You can also see the an example YAML with host expiry enabled here.
💯 1