check_smtp
SMTPサーバをチェックするプラグイン。
対象
リモート (or ローカル)
アーカイブ内での位置
plugins/check_smtp
実行
2秒で接続できないと WARNING、5秒で接続できないと CRITICAL。
/usr/local/nagios/libexec/check_smtp -H 192.168.0.2 -w 2 -c 5
checkcommands.cfgでの定義
vi /usr/local/nagios/etc/checkcommands.cfg
# 'check_smtp' command definition define command{ command_name check_smtp command_line $USER1$/check_smtp -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ }
サービスの定義
define service{ use generic-service host_name hoge service_description SMTP 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_smtp!2!5 contact_groups linux-admins }