Trying to start Filebeat crashes because it can't create the registry directory.
2019-07-29T00:32:18.905+0100 INFO registrar/migrate.go:104 No registry home found. Create: /var/lib/filebeat/registry/filebeat
2019-07-29T00:32:18.905+0100 ERROR beater/filebeat.go:302 Could not init registrar: failed to create registry dir '/var/lib/filebeat/registry/filebeat': mkdir /var: file exists
[...]
Exiting: failed to create registry dir '/var/lib/filebeat/registry/filebeat': mkdir /var: file exists
This seems like a bug, as it shouldn't be trying to recreate the /var directory. How do I fix this?