warning: peer certificate won't be verified in thisSSL session
info: Caching certificate for client.cn7788.com
info: Caching certificate_revocation_list for ca
err: Could not retrieve catalog from remote server:certificate verify failed. This is oftenbecause the time is out of sync on the server or client
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
err: Could not send report: certificate verifyfailed. This is often because the timeis out of sync on the server or client
需求如下:客户机机器xen.cn7788.com和lamp.cn7788.com没有安装nagios客户端程序,这时想过通过puppet-server推送SHELL脚本自动安装,其它的客户端暂时没这么需求,这个应该如何实现呢?
由于客户端节点机器比较多,所以这里需要用到节点和模块的概念,这里我们先建立名为nagioscli的模块,如下所示:
#!/bin/bash
useradd nagios
cd /usr/local/src
wget wget http://syslab.comsenz.com/downlo ... ugins-1.4.13.tar.gz
wget http://syslab.comsenz.com/downloads/linux/nrpe-2.12.tar.gz
tar zxvf nagios-plugins-1.4.13.tar.gz
cd nagios-plugins-1.4.13
./configure
make
make install
chown nagios:nagios /usr/local/nagios
chown -R nagios:nagios /usr/local/nagios/libexec
cd ../
tar zxvf nrpe-2.12.tar.gz
cd nrpe-2.12
./configure
make all
make install-plugin
make install-daemon
make install-daemon-config
sed -i's@allowed_hosts=127.0.0.1@allowed_hosts=114.112.11.11@'/usr/local/nagios/etc/nrpe.cfg
#114.112.11.11为nagios服务器的IP地址,这个可以根据实际需求更改。
/usr/local/nagios/bin/nrpe -c/usr/local/nagios/etc/nrpe.cfg -d
echo "/usr/local/nagios/bin/nrpe -c/usr/local/nagios/etc/nrpe.cfg -d" >> /etc/rc.local
site.pp文件内容如下: