4장. rsh Core 서버에서 원격 노드 구성


원격 호스트를 인식하도록 RuntimeClass 코어 서버를 구성합니다.

사전 요구 사항

  • RuntimeClass Core 서버의 원격 노드에 대한 루트 수준 액세스.
  • 인터넷 액세스.

절차

  1. 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

  2. 원격 호스트에 대한 구성을 생성합니다.

    구문

     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

  3. 구성 파일을 편집하고 원격 호스트의 설정을 업데이트합니다.

    구문

    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
    }

  4. 호스트 그룹 정의를 삭제하거나 주석으로 처리하십시오.

    예제

    [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
    #}
  5. 파일 소유권을 rsh로 변경합니다.

    예제

    [root@nagios objects]# chown nagios:nagios host01.cfg

  6. /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
  7. rsh 서버를 다시 시작합니다.

    예제

    [root@nagios objects]# systemctl restart nagios

  8. 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 을 에코해야합니다.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.