logstash需要设置开机启动
设置systemctl配置文件
填写需要启动的配置文件等信息即可
- 配置文件
# cat /usr/lib/systemd/system/logstash.service
[Unit]
Description=logstash
[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/kafka-out.conf
Restart=always
[Install]
WantedBy=multi-user.target
EOF
- 设置开机自启动
# systemctl daemon-reload
# systemctl enable logstash