Ubuntu 11.10 安装nrpe报错情况,脚本需要root权限操作


tar -zxvf nrpe-2.12.tar.gz
cd nrpe-2.12/
adduser nagios
./configure --prefix=/usr/local/nrpe
报错:
checking for SSL libraries... configure: error: Cannot find ssl libraries
检查 libssl-dev有没有安装
apt-get install libssl-dev
检查文件路径
dpkg -L libssl-dev
编译时候指定ssl-lib
./configure --with-ssl-lib=/usr/lib/x86_64-linux-gnu --prefix=/usr/local/nrpe
编译正常.完成.
make all;make install-daemon;make install-plugin;make install-daemon-config;
执行某些nrpe的监控脚本需要root权限
vi /etc/sudoers
nagios  ALL=(ALL) NOPASSWD:/usr/local/nrpe/libexec/check_sl_mem
修改nrpe.cfg 命令前面加/usr/bin/sudo
command[check_mem]=/usr/bin/sudo /usr/local/nrpe/libexec/check_sl_mem -w 20 -c 10
运行
/usr/local/nrpe/bin/nrpe -c /usr/local/nrpe/etc/nrpe.cfg -d