nagios client端

 

#---config nagios client---#

 

cp -af /fgn/theron/nagios/etc/nrpe.cfg /fgn/theron/nagios/etc/nrpe.cfg.default

grep -Ev '#|^$' nrpe.cfg > nrpe.brief.cfg

cat nrpe.brief.cfg > nrpe.cfg

chown -R nagios:nagios /fgn/theron/nagios/

vim /fgn/theron/nagios/etc/nrpe.cfg

******************************

log_facility=daemon

pid_file=/var/run/nrpe.pid

server_port=5666

nrpe_user=nagios

nrpe_group=nagios

allowed_hosts=127.0.0.1,192.168.1.2

 

dont_blame_nrpe=0

debug=0

command_timeout=60

connection_timeout=300

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/hda3

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_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$

command[check_ping]=/usr/local/nagios/libexec/check_ping -H 116.213.92.66 -w 3000,90% -c 5000,100% -p 10 -t 30

command[check_mq]=/usr/local/nagios/libexec/check_procs -w 1:1 -a '/fgn/mqdownprocess/mqlogprocess.jar --action=logdown'

************************************

 

 

启动nrpe

/fgn/theron/nagios/bin/nrpe -c /fgn/theron/nagios/etc/nrpe.cfg -d

 

 

telnet 127.0.0.1 5666发现端口不通

Trying 127.0.0.1...

Connected to localhost.localdomain (127.0.0.1).

Escape character is '^]'.

Connection closed by foreign host.

关闭防火墙

service iptables stop

 

测试nrpe服务是否正常

/fgn/theron/nagios/libexec/check_nrpe -H 127.0.0.1

 

 

 

 

 

 

 

 

你可能感兴趣的:(nagios client端)