Agent 脚本:
#!/bin/bash ping -c 1 -W 2 172.28.6.1 > /dev/null 2>&1 if [ $? -eq 0 ] then echo 0 else echo 1 fi
Agent 配置文件:
UserParameter=ping.storage,/bin/bash /etc/zabbix/zabbix_agentd.d/pingstorage.sh