zabbix agent 开机启动


# cetnos 7 
crontab -l

*/5 * * * * systemctl status zabbix-agent | grep run || systemctl restart zabbix-agent.service 2>&1 >> /dev/null




# centos 6 5
crontab -l
# zabbix
*/5 * * * * /etc/init.d/zabbix_agentd status |grep run || (rm -f /usr/local/zabbix/var/zabbix_agentd.pid ;/etc/init.d/zabbix_agentd restart) >&1 >> /dev/null