4장. rsh Core 서버에서 원격 노드 구성
원격 호스트를 인식하도록 RuntimeClass 코어 서버를 구성합니다.
사전 요구 사항
- RuntimeClass Core 서버의 원격 노드에 대한 루트 수준 액세스.
- 인터넷 액세스.
절차
check_nrpe
플러그인을 설치합니다.예제
[root@nagios ~]# cd ~ [root@nagios ~]# wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-4.0.3/nrpe-4.0.3.tar.gz [root@nagios ~]# tar xvfz nrpe-4.0.3.tar.gz [root@nagios ~]# cd nrpe-4.0.3 [root@nagios nrpe-4.0.3]# ./configure [root@nagios nrpe-4.0.3]# make check_nrpe [root@nagios nrpe-4.0.3]# make install-plugin
원격 호스트에 대한 구성을 생성합니다.
구문
cd /usr/local/nagios/etc/objects cp localhost.cfg HOST_TO_ADD.cfg
예제
[root@nagios nrpe-4.0.3]# cd /usr/local/nagios/etc/objects [root@nagios objects]# cp localhost.cfg host01.cfg
구성 파일을 편집하고 원격 호스트의 설정을 업데이트합니다.
구문
vi HOST_TO_ADD.cfg
예제
[root@nagios objects]# vi host01.cfg
구문
# Define a host for the local machine define host { use linux-server ; Name of host template to use ; This host definition will inherit all variables that are defined ; in (or inherited by) the linux-server host template definition. host_name LOCALHOST alias LOCALHOST address 127.0.0.1 }
LOCALHOST 를 원격 호스트의 호스트 이름으로,
127.0.0.1
을 Ceph 모니터 호스트의 IP 주소로 바꿉니다.예제
# Define a host for the local machine define host { use linux-server ; Name of host template to use ; This host definition will inherit all variables that are defined ; in (or inherited by) the linux-server host template definition. host_name host01 alias host01 address 10.10.128.69 }
호스트 그룹 정의를 삭제하거나 주석으로 처리하십시오.
예제
[root@nagios objects]# vi host01.cfg
#define hostgroup { # # hostgroup_name linux-servers ; The name of the hostgroup # alias Linux Servers ; Long name of the group # members localhost ; Comma separated list of hosts that belong to this group #}
파일 소유권을 rsh로 변경합니다.
예제
[root@nagios objects]# chown nagios:nagios host01.cfg
/usr/local/nagios/etc/nagios.cfg
에서host01.cfg
파일에cfg_file=
참조를 추가하십시오.예제
[root@nagios objects]# vi /usr/local/nagios/etc/nagios.cfg
cfg_file=/usr/local/nagios/etc/objects/host01.cfg
rsh 서버를 다시 시작합니다.
예제
[root@nagios objects]# systemctl restart nagios
make 및 install procedures가 정상적으로 작동하고, NRPE가 포함된 원격 호스트와>-< Core 서버 간의 연결이 있는지 확인합니다.
구문
/usr/local/nagios/libexec/check_nrpe -H HOSTNAME_OF_REMOTE_HOST
HOSTNAME_OF_REMOTE_HOST 를 모니터링할 Ceph 호스트의 IP 주소로 교체합니다.
예제
[root@nagios objects]# /usr/local/nagios/libexec/check_nrpe -H host01
검증
-
검사가 제대로 작동하는 경우
NRPE v4.0.3
을 에코해야합니다.