check_dig の変更点
digを使ってDNSサーバをチェックするプラグイン。~
以下
|~DNSサーバ|192.168.0.2|
|~チェックするドメイン|example.com|
と仮定。
*対象
リモート (or ローカル)
*アーカイブ内での位置
plugins/check_dig
*実行
指定DNSサーバで example.com のIPが引けないとき、 CRITICAL。
/usr/local/nagios/libexec/check_dig -H 192.168.0.2 -l example.com
*checkcommands.cfgでの定義
vi /usr/local/nagios/etc/checkcommands.cfg
>
# 'check_dig' command definition
define command{
command_name check_dig
command_line $USER1$/check_dig -H $HOSTADDRESS$ -l $ARG1$
}
*サービスの定義
define service{
use generic-service
host_name hoge
service_description DNS example.com
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
notification_interval 240
notification_period 24x7
notification_options c,r
check_command check_dig!example.com
contact_groups linux-admins
}
*備考
-[[check_dns>Nagios/プラグイン/check_dns]] よりまとも。
-[[NRPE>Nagios/NRPE]] と組み合わせると、リモートホストがDNSを引けるかチェックできる。
*Amazon
#amazon(4774145823,left)
#amazon(4873110742,left)
#amazon(4873111250,left)
#amazon(4839908931,left)
#amazon(4774165433,left)
#amazon(4774178659,left)
#amazon(4048700731,left)