({Template serviceA:serviceA.is_alive.last(#2)}<>1 and {Template serviceA:serviceA.is_alive.last()}<>1 ) or {Template serviceA:serviceA.is_alive.nodata(120)}=1
2. 勾选上Recovery Message,恢复正常时给你再发一条消息
3. Condition: (A and B)
A. Trigger value = Problem
B. Trigger = Template serviceA: trigger_name
4. Operations: operation type: Remote Command target: Current Host type: custom script execute on: zabbix agent # zabbix_agentd需要是root启动,以work账号执行重启的命令。 # restart逻辑集成在服务自身的启停脚本中。 commands: su - work -c "bash /home/work/serviceA/bin/run.sh restart"