温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

nagios被监控端安装nrpe

发布时间:2020-06-09 04:58:00 来源:网络 阅读:573 作者:小小猫 栏目:移动开发

安装配置NRPE


Nagios服务端监控被监控机,如果被监控端是linux,则需在被监控端安装snmp服务或者nrpe服务用来收集数据,服务端是用插件check_nrpe发出指令并接受被监控端也即安装了nrpe服务的Linux系统的数据的,这里以安装nrpe服务为主,仅供参考.

#groupadd nagios

#useradd –g nagios nagios

#wgethttp://jaist.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz

#tar xzvf nrpe-2.15.tar.gz

#cd nrpe-2.15

#./configure --enable-ssl--enable-command-args

nagios被监控端安装nrpe

#make install

#make install-plugin

# make install-daemon

# make install-daemon-config

之所以添加用户nagios主要是因为默认相关程序是以用户nagios来运行的.

nagios被监控端安装nrpe

编辑配置文件/usr/local/nagios/libexec/nrpe.cfg


nagios被监控端安装nrpe

定义需要的监测点,如check_users,check_load,check_disk,在这里要注意的是监测监测点如cpu负载的命令是否存在,如check_load.这个命令在安装完nrpe实际上是没有的,只有安装nagios-plugins插件才有相关的命令.

nagios被监控端安装nrpe

启动服务:

#/usr/local/nagios/bin/nrpe/usr/local/nagios/etc/nrpe.cfg –d

查看服务是否启动成功,通过netstat查看监听端口是否开启(另外在其他机子通过telnet探测相应端口可检测是否有防火墙阻止):

nagios被监控端安装nrpe


nagios服务器使用命令check_nrpe检验:

# ./check_nrpe -H 192.168.89.128

NRPE v2.15

检验在配置文件nrpe.cfg定义的命令是否可用:check_users\check_load\check_disk

nagios被监控端安装nrpe

安装nagios-plugins

#Wget http://nchc.dl.sourceforge.net/project/nagiosplug/nagiosplug/1.4.16/nagios-plugins-1.4.16.tar.gz

#tar xzvf nagios-plugins-1.4.16.tar.gz

#cd nagios-plugins-1.4.16

#./configure --prefix=/usr/local/nagios/--enable-redhat-pthread-workaround

#make all && make install

nagios被监控端安装nrpe

至此linux被监控端所需安装的nrpe服务安装完成,只需在nagios服务端定义


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI