1、添加nagios用户 

/usr/sbin/useradd nagios 

passwd nagios

2、安装nagios插件:

cd /usr/local/src

tar zxvf nagios-plugins-1.4.15.tar.gz

cd nagios-plugins-1.4.15

./configure --with-nagios-user=nagios --with-nagios-group=nagios

make

make install 

3、安装nrpe:

cd /usr/local/src

tar -zxvf nrpe-2.12.tar.gz

cd nrpe-2.12

./configure --prefix=/usr/local/nagios

make all

make install-plugin

make install-daemon

make install-daemon-config 

make install-xinetd    #nrpe安装为xinetd服务

编辑nrpe配置文件,增加监控机地址:     
vi /etc/xinetd.d/nrpe
only_from  = 127.0.0.1 172.16.3.56  #172.16.3.56是监控服务器IP

修改services文件,增加端口
vi /etc/services
nrpe   5666/tcp    #NRPE

安装xinetd,并重启xinetd服务

yum -y install xinetd       
service xinetd restart

检查目录及文件:

ll /usr/local/nagios/libexec 

看看里面是不是有一大堆check的什么东西,如果有就对了。

 

 
 

1、添加nagios用户 

/usr/sbin/useradd nagios 

passwd nagios

2、安装nagios插件:

cd /usr/local/src

tar zxvf nagios-plugins-1.4.15.tar.gz

cd nagios-plugins-1.4.15

./configure --with-nagios-user=nagios --with-nagios-group=nagios

make

make install 

3、安装nrpe:

cd /usr/local/src

tar -zxvf nrpe-2.12.tar.gz

cd nrpe-2.12

./configure --prefix=/usr/local/nagios

make all

make install-plugin

make install-daemon

make install-daemon-config 

make install-xinetd    #nrpe安装为xinetd服务

编辑nrpe配置文件,增加监控机地址:     
vi /etc/xinetd.d/nrpe
only_from  = 127.0.0.1 172.16.3.56  #172.16.3.56是监控服务器IP

修改services文件,增加端口
vi /etc/services
nrpe   5666/tcp    #NRPE

安装xinetd,并重启xinetd服务

yum -y install xinetd       
service xinetd restart

检查目录及文件:

ll /usr/local/nagios/libexec 

看看里面是不是有一大堆check的什么东西,如果有就对了。

 

相关文章:

  • 2021-11-08
  • 2022-01-07
  • 2021-09-05
  • 2022-12-23
  • 2021-10-27
  • 2021-10-25
  • 2021-05-18
  • 2021-09-07
猜你喜欢
  • 2021-09-26
  • 2021-05-17
  • 2022-12-23
  • 2021-11-07
  • 2021-06-17
  • 2021-07-08
  • 2021-06-15
相关资源
相似解决方案