Current Path : /proc/3/task/3/root/proc/2/cwd/opt/zabbix_scripts/ |
Current File : //proc/3/task/3/root/proc/2/cwd/opt/zabbix_scripts/check_ips.sh |
#!/bin/bash declare IPLIST=$(curl --silent -L http://chkips.init3.com/) CHK=$(/sbin/iptables -nL |grep -E $IPLIST|grep DROP|awk '{print $4}'| tr '\n' '|') if [ -z "$CHK" ] then RET=${STATE_OK} DATA="OK" else RET=${STATE_CRITICAL} DATA="${CHK}" fi echo "${DATA}" exit ${RET}