nagios被控端配置

####配置nrpe#####
cd /usr/local/nagios/etc
vi nrpe.cfg +79


###修改为Nagios Server主控端的ip:

allowed_hosts=121.10.242.9


##注释掉或者干脆*** 199-203 行  即下面几行
#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_hda1]=/usr/local/nagios//libexec/check_disk -w 20% -c 10% -p /dev/hda1
#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_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_mem]=/usr/local/nagios/libexec/check_memory.pl -w 10% -c 3%
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 15% -c 7% -p /
command[check_swap]=/usr/local/nagios/libexec/check_swap -w 20% -c 10%
command[check_iostat]=/usr/local/nagios/libexec/check_iostat -w 6 -c 10

/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
echo    "/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d" >> /etc/rc.local

###查看nagios进程
ps -ef|grep nagios


本文出自 “liunx系统” 博客,谢绝转载!

你可能感兴趣的:(nagios被控)