Agent 脚本:
代码语言:javascript复制#!/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 配置文件:
代码语言:javascript复制UserParameter=ping.storage,/bin/bash /etc/zabbix/zabbix_agentd.d/pingstorage.sh
标题:zabbix agent 隔离网络ICMP监控实现
作者:cuijianzhe
地址:https://cloud.tencent.com/developer/article/2360881