zabbix 内网机器通信状态
a=0 for xgip in ${xgipset[*]} do let a+=1 fping $xgip|grep alive >/dev/null if [ $a != 3 ];then if [ $? = 0 ];then echo -n "$outip与$xgip正常通信," else echo -n "$outip与$xgip不可达," fi else if [ $? = 0 ];then echo "$outip与$xgip正常通信," else echo "$outip与$xgip不可达," fi fi