在Debian上管理Filebeat多个实例,可参考以下方法:
sudo apt update和sudo apt install filebeat进行安装。/etc/filebeat/filebeat.yml,如sudo cp /etc/filebeat/filebeat.yml /etc/filebeat/filebeat_instance1.yml,然后修改每个实例的配置文件,指定不同的日志路径、输出目标等。/etc/systemd/system/filebeat_instance1.service,内容可参考[Unit]、[Service]、[Install]等部分的配置,指定配置文件路径等参数。sudo systemctl daemon-reload重新加载配置,然后通过sudo systemctl start filebeat_instance1等命令启动实例,sudo systemctl status filebeat_instance1查看状态,sudo systemctl enable filebeat_instance1设置开机自启。