来自:网络
nagios监控linux
被监控端:
linux被监控端安装nrpe:
nrpe下载:wget [ /projects/nagios/files/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz]projects/ ... 15/nrpe-2.15.tar.gz[/url] nagios培训
nagios-plugins下载:[ /download/nagios-plugins-2.0.3.tar.gz]download/nagios-plugins-2.0.3.tar.gz[/url] nagios实施
useradd nagios
------------------------------------------------------------------- 监控软件 #解压并安装nagios-plugins
tar zvxf nagios-plugins-2.0.3.tar.gz
cd nagios-plugins-2.0.2
./configure --with-nagios-user=nagios --with-nagios-group=nagios nagios配置 make && make install
chown -R nagios:nagios /usr/local/nagios
#解压并安装nrpe
tar zvxf nrpe-2.15.tar.gz
cd nrpe-2.15
./configure --enable-ssl --with-ssl-lib (前提是已经安装了openssl与openssl-devel)
make all && make install-plugin && make install-daemon && make install-daemon-config
#配置nrpe信息
vi /usr/local/nagios/etc/nrpe.cfg,查找并修改如下一行
allowed_hosts=192.168.1.71,127.0.0.1 #注意修改为nagios服务器的IP:192.168.1.71
下面的可以选择添加
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_disk]=/usr/local/nagios/libexec/check_disk -w 10% -c 5%
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 500 -c 550
command[check_swap]=/usr/local/nagios/libexec/check_swap -w 20% -c 10%
command[check_ping]=/usr/local/nagios/libexec/check_ping -H 192.168.1.1 -w 100.0,20% -c 500.0,60%
#启动nrpe,并测试
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
netstat -ant |grep 5666
-----------------------------------------------------------------------------------------
ubuntu被监控安装nrpe:
sudo apt-get install nagios-nrpe-server
sudo apt-get install nagios-nrpe-plugin (同时监控端需要安装:nagios-nrpe-plugin) nagios安装
同时开放5666端口
想做Nagios, Zabbix,Cacti,iTop各种交流的,可以进入开源监控工具Nagios交流 QQ群号 :476809427
|