-------------------------------------
nagios server
-------------------------------------
/usr/local/nagios/etc 에서 해당 설정을 한다.
/etc/rc.d/init.d 에서
nagios stop
nagios start
-------------------------------------
nagios client
-------------------------------------
/usr/local/nagios/bin/nrpe 프로그램이 있어야하고
/usr/local/nagios/etc/nrpe.cfg 에 설정을 해 준다.
xinetd에서 nrpe를 설정 한다. ( only_from 부분에 서버 IP 지정 한다. )
[root@email xinetd.d]# cat nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1 192.168.77.5
}
/etc/rc.d/init.d 에서 xinetd 를 stop, start 한다.
/etc/sysconfig/iptables 에서 5666 포트를 허용해 주고.
/etc/rc.d/init.d 에서 iptables 를 stop, start 한다.