in Formula/metricbeat-oss.rb [9:25]
def install
["fields.yml", "ingest", "kibana", "module"].each { |d| libexec.install d if File.exist?(d) }
(libexec/"bin").install "metricbeat"
(etc/"metricbeat").install "metricbeat.yml"
(etc/"metricbeat").install "modules.d" if File.exist?("modules.d")
(bin/"metricbeat").write <<~EOS
exec
--path.config
--path.data
--path.home
--path.logs
"$@"
EOS
end