您的位置:首页 > 移动开发 > IOS开发

Nagios的客户端的安装

2019-08-03 00:34 1461 查看
原文链接:https://www.geek-share.com/detail/2670152780.html

一、Linux服务器的nagios客户端的安装

步骤:

1、  创建目录,上传文件到该目录

mkdir /data

nagios-plugins-2.1.1.tar.gz

nrpe-2.12.tar.gz

2、  创建nagios组和用户

groupadd nagios

mkdir /usr/local/nagios

useradd nagios -d /usr/local/nagios -s /sbin/nologin -g nagios

chown -R nagios:nagios /usr/local/nagios/

3、  安装nagios-plugins

tar zxvf nagios-plugins-2.1.1.tar.gz

cd nagios-plugins-2.1.1

./configure --prefix=/usr/local/nagios --with-user=nagios --with-nagios-group=nagios

make && make install

4、  安装nrpe

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

chown -R nagios:nagios /usr/local/nagios/

5、  增加服务

vi /etc/services

nrpe            5666/udp                #nrpe

nrpe            5666/tcp                #nrpe

6、  允许nagios服务访问

vi /etc/xinetd.d/nrpe

  • only_from       = 10.0.0.10

故障:checking for SSL headers... configure: error: Cannot find ssl headers

解决:yum -y install openssl-devel

故障:checking for cl.exe... no

解决:yum install -y gcc-c++

注:如果没有安装xinetd服务,需要安装

yum -y install xinetd

7、  重启xinetd服务

/etc/init.d/xinetd restart

8、  测试服务是否正常

netstat –ntlup 看5666端口是否监听状态

        服务器端使用

        /usr/local/nagios/libexec/check_nrpe -H 10.0.0.20

        获取版本信息

        NRPE v2.12

转载于:https://www.cnblogs.com/networking/p/5329447.html

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: