zabbix监控dns的可用性
写个脚本[*]#!/bin/sh
[*]timeout=2
[*]Q=”shanks.pp711.com″
[*]host=”/usr/bin/host”
[*]if test -z “$1″ ; then
[*]echo “You need to supply a DNS server to check. Quitting”
[*]exit;
[*]fi
[*]SERVER=$1
[*]
[*]ERC=`$host -s -W $timeout $Q $SERVER > /dev/null 2>&1; echo $?`
[*]if [ $ERC -eq 0 ] ; then
[*]echo 0
[*]else
[*]echo 1
[*]fi
成功的话,返回0,失败返回1然后加到zabbix的监控中
找不到恐龙,就用蜥蜴顶 走过了年少,脚起了水泡 路过,支持一下啦 我真想亲口管你爷爷叫声:爹! 有事秘书干,没事干秘书! 大学生 バッグポールスミス
バッグ http://www.bagsoinsist.info/
页:
[1]