文档详情

Nagios监控Linux的安装步骤.doc

发布:2017-06-10约5.87千字共5页下载文档
文本预览下载声明
Nagios监控linux 被监控端: ./configure make make install #chown nagios:nagios /usr/local/nagios #chown -R nagios.nagios /usr/local/nagios/libexec/ Make nagios插件报错 check_http.c: In function ‘process_arguments’: check_http.c:312: 错误:‘ssl_version’ 未声明 (在此函数内第一次使用) check_http.c:312: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其 check_http.c:312: 错误:所在的函数内只报告一次。) make[2]: *** [check_http.o] 错误 1 make[2]: Leaving directory `/root/rpm/nagios-plugins-1.4.16/plugins make[1]: *** [all-recursive] 错误 1 make[1]: Leaving directory `/root/rpm/nagios-plugins-1.4.16 make: *** [all] 错误 2 解决:yum -y install openssl* openssl-devel 3.安装nrpe#tar zxvf nrpe-2.14tar.gz #cd nrpe-2.14 #./configure #make all make install-plugin make install-daemon make install-daemon-config 4.配置nrpe信息 #vim /usr/local/nagios/etc/nrpe.cfg allowed_host=07, //允许07服务器端对其监控 添加下面的监控项 command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 command[check_swap]=/usr/local/nagios/libexec/check_swap -w 20% -c 10% command[check_ping]=/usr/local/nagios/libexec/check_ping -H -w 100.0,20% -c 500.0,60% command[check_disk]=/usr/local/nagios/libexec/check_disk -w 10% -c 5% command[check_cpu]=/usr/local/nagios/libexec/check_cpu.sh command[check_uptime]=/usr/local/nagios/libexec/check_uptime.sh -c 20 -w 60 command[check_memory]=/usr/local/nagios/libexec/check_memory.pl -u -w 90 -c 95 最下面的6个是新添加的,如果没有插件的话下载并将插件上传到 /usr/local/nagios/libexec/目录下面 并添加读写权限及更改用户为nagios 启动nrpe #/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d //检测nrep配置文件的正确性 #netstat -an | grep 5666 //是否监听5666用于nrpe通信的端口 //执行检测nrpe信息 #/usr/local/nagios/libexec/check_nrpe -H NRPE v2.14 6.重启nrpe服务。 # ps -ef|grep nrpe nagios 9026 1 0 01:41 ? 00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/
显示全部
相似文档