Nagios クライアント マシンで以下のコマンドを実行すると、正常に動作しています。
**/usr/lib/nagios/plugins/check_ssh -H 127.0.0.1 -p 22**
*SSH OK - OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6 (protocol 2.0) | time=0.004430s;;;0.000000;10.000000*
Nagios サーバーから実行すると、以下の問題が発生します。
ubuntu@Nagios-server:/usr/lib/nagios/plugins$ ./check_nrpe -H <CLIENT-IP> -c check_ssh -n -H <CLIENT-IP> -p 2
CHECK_NRPE: Error receiving data from daemon.
以下はサービス定義です。
define service {
host qa-ad-useast-1.dpclk.com
use generic-service
check_command check_nrpe!check_ssh
service_description SSH Status
contact_groups admins
notifications_enabled 1
}
nrpe.cfg のコマンド エントリは次のとおりです。
command[check_ssh]=/usr/lib/nagios/plugins/check_ssh -H $ARG1$
引数を渡す際のサービス定義またはコマンドに問題があります。