部署完zabbix-agent监控后,需要实现开机启动和通过systemctl管理的需求,所以需要添加zabbix-agentd.service文件,自己已测试成功,方法如下

vim /usr/lib/systemd/system/zabbix-agentd.service
[Unit]
Description=Zabbix-agentd

[Service]
Type=forking
ExecStart=/usr/local/zabbix-agent/sbin/zabbix_agentd
User=zabbix
Group=zabbix

[Install]
WantedBy=multi-user.target

添加完成后重新加载配置并测试

systemctl daemon-reload
systemctl start zabbix-agentd.service
systemctl enable zabbix-agentd.service
Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐