nagios
とプラグインを使用してレールアプリケーションの内部を監視しようとしていnrpe
ますが、取得するだけですNRPE: Unable to read output
これが私のモニタリングマシンコード「check_test.rb」スクリプトです:
#!/usr/bin/env ruby
# load rails
RAILS_ENV = 'production'
require '/var/www/production/current/config/environment'
error = 0
print "OK"
exit error # exit with the error code that is then interpreted by nagios
これが私の監視ホストの呼び出しです。
$ sudo /usr/local/nagios/libexec/check_nrpe -H remote.machine.com -c check_test -t 240
以下の行を削除すると、正常に動作します。
# load rails
RAILS_ENV = 'production'
require '/var/www/production/current/config/environment'
どんな助けでも大歓迎です。前もって感謝します。