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