关注微信公众号“宝康大叔”,给你提供更多学习资料和项目实战资料,以及创业随笔。
Nrpe是监控软件nagios的一个扩展,它被用于被监控的服务器上,向nagios监控平台提供该服务器的一些本地的情况。例如,cpu负载、内存使用、硬盘使用等等。Nrpe可以称为nagios的for linux 客户端
安装步骤:
一、安装nagios plugin
1.1下载并解压到/usr/local/src下
wget http://nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz
tar xzf nagios-plugins-2.1.1.tar.gz
1.2编译并安装
新建nagios用户
useradd nagios
./configure --prefix=/usr/local/nrpe --with-nagios-user=nagios --with-nagios-group=nagios
make && make install
可能报相关gcc openssl-devel的依赖
可执行
yum -y install gcc openssl-devel
二、nrpe服务安装
2.1下载nrpe包,并解压到/usr/local/src目录下
wget http://nchc.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz
tar zxf nrpe-2.15.tar.gz
2.2编译并安装
cd nrpe-2.15
./configure --prefix=/usr/local/nrpe
make all
make install-plugin
make install-daemon
make install-daemon-config
2.3启动
/usr/local/nrpe/bin/nrpe -c /usr/local/nrpe/etc/nrpe.cfg -d
自带的启动脚本
[root@Nrpe nrpe-2.15]# cp -rf init-script.in /etc/init.d/nrpe
[root@Nrpe nrpe-2.15]# chmod a+x /etc/init.d/nrpe
[root@Nrpe ~]# chkconfig nrpe on
[root@Nrpe ~]# /etc/init.d/nrpe start
博客若对你有用,欢迎来我闲鱼平台逛逛,增加人气,闲鱼号“爱的魔力转圈圈”
推荐一款宝贝,烧水炉,喜欢的话可以拍下哦。