码迷,mamicode.com
首页 > 移动开发 > 详细

Nagios的客户端的安装

时间:2016-03-28 16:43:57      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:

一、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

Nagios的客户端的安装

标签:

原文地址:http://www.cnblogs.com/networking/p/5329447.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!