웹사이트 검색

RHEL, CentOS 및 Fedora에 Munin(네트워크 모니터링) 설치


Munin(네트워크 모니터링 도구)은 서버 및 서비스의 네트워크 사용량을 그래픽 형식으로 보여주는 Perl로 작성된 오픈 소스 웹 기반 네트워크 모니터링 애플리케이션입니다. RRDtool을 사용합니다. Munin의 도움으로 시스템, 네트워크, SANS 및 애플리케이션의 성능을 모니터링할 수 있습니다.

여기에는 마스터가 각 노드에 정기적으로 연결하고 해당 노드에서 데이터를 가져오는 마스터/노드 아키텍처가 있습니다. 그런 다음 RRDtool을 사용하여 업데이트된 그래프를 기록하고 생성합니다.

권장 읽기: Linux 성능을 모니터링하기 위한 20가지 명령줄 도구

이 문서에서는 RHEL<에서 Munin Node를 사용하여 Munin( 네트워크 모니터링 도구)을 설정하는 단계를 안내합니다., CentOSFedora 시스템은 다음 환경을 사용합니다.


Munin Server - hostname: munin.linux-console.net and IP Address: 192.168.103
Munin Client - hostname: munin-node.linux-console.net and IP Address: 192.168.15

RHEL, CentOS 및 Fedora에 Munin 설치

Munin 설치는 매우 간단합니다. 아래의 단계별 명령을 따라 서버에 설치하면 됩니다.

1단계: EPEL 저장소 설치

MuninRHEL 7.x/ 아래의 FedoraEPEL 저장소를 사용하여 설치할 수 있습니다. 6.x/5.xCentOS 7.x/6.x/5.x.

wget을 사용하여 Epel 저장소를 설치하고 활성화하려면 루트 사용자로 다음 명령을 실행하세요.

RHEL/센트OS 7
------------------ RHEL/CentOS 7 - 64-Bit ------------------
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
rpm -ivh epel-release-7-9.noarch.rpm
RHEL/센트OS 6
------------------ RHEL/CentOS 6 - 32-Bit ------------------
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

------------------ RHEL/CentOS 6 - 64-Bit ------------------
http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
RHEL/센트OS 5
------------------ RHEL/CentOS 5 - 32-Bit ------------------
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm

------------------ RHEL/CentOS 5 - 64-Bit ------------------
wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm

참고 : munin이 Fedora에 포함되어 있고 다음을 수행할 수 있으므로 Fedora 사용자는 EPEL 저장소를 설치할 필요가 없습니다. yum 또는 dnf 패키지 관리자를 사용하여 설치하세요.

권장 읽기: Linux 패키지 관리를 관리하기 위한 20가지 Yum 명령

권장 읽기: Fedora 패키지 관리를 관리하기 위한 27가지 Dnf 명령

다음으로, Munin을 설치하기 전에 시스템 업데이트를 수행하여 EPEL 패키지 데이터베이스가 로드되었는지 확인하세요.

------------------ On RHEL and CentOS Only ------------------
yum -y update

2단계: Apache 웹 서버 설치

Munin의 통계 파일을 표시하려면 Apache 또는 Nginx와 같은 작동하는 웹 서버가 필요합니다. 여기서는 Munin 그래프를 제공하기 위해 Apache 웹 서버를 설치하겠습니다.

------------------ On RHEL, CentOS and Fedora ------------------
yum install httpd

------------------ On Fedora 22+ Releases ------------------
dnf install httpd    

Apache가 설치되면 서비스를 시작하고 시스템 부팅 시 자동으로 시작되도록 활성화합니다.

------------------ On RHEL, CentOS and Fedora ------------------
service httpd start
chkconfig --level 35 httpd on

------------------ On RHEL/CentOS 7 and Fedora 22+ ------------------
systemctl enable httpd
systemctl start httpd

3단계: Munin 및 Munin-Node 설치

이제 그림과 같이 MuninMunin-Node를 설치할 차례입니다.

------------------ On RHEL, CentOS and Fedora ------------------
yum -y install munin munin-node

------------------ On Fedora 22+ Releases ------------------
dnf -y install munin munin-node

기본적으로 위 설치는 다음 디렉터리를 생성합니다.

  1. /etc/munin/munin.conf : Munin 마스터 구성 파일.
  2. /etc/cron.d/munin : Munin 크론 파일.
  3. /etc/httpd/conf.d/munin.conf : Munin Apache 구성 파일.
  4. /var/log/munin : Munin 로그 디렉터리입니다.
  5. /var/www/html/munin : Munin 웹 디렉토리.
  6. /etc/munin/munin-node.conf : Munin 노드 마스터 구성 파일입니다.
  7. /etc/munin/plugins.conf : Munin 플러그인 구성 파일.

3단계: Munin 구성 및 Munin 비밀번호 보호

이 단계는 선택 사항이며 표시된 대로 HTML 출력에서 localhost 대신 munin.linux-console.net을 사용하려는 경우에만 적용 가능합니다.

/etc/munin/munin.conf 구성 파일을 열고 제안된 대로 변경하고 munin.linux-console.net을 서버 이름으로 바꾸는 것을 잊지 마세요.

a simple host tree
[munin.linux-console.net]
    address 127.0.0.1
    use_node_name yes
[...]

다음 비밀번호는 다음과 같이 Apache 기본 인증 모듈을 사용하여 사용자 이름비밀번호로 Munin 통계를 보호합니다.

htpasswd /etc/munin/munin-htpasswd admin

그런 다음 Munin을 다시 시작하고 부팅 시 자동으로 시작되도록 활성화하십시오.

------------------ On RHEL, CentOS and Fedora ------------------
service munin-node start
chkconfig --level 35 munin-node on

------------------ On RHEL/CentOS 7 and Fedora 22+ ------------------
systemctl enable munin-node
systemctl start munin-node

4단계: Munin 웹 인터페이스에 액세스

Munin이 그래프를 생성하고 표시할 수 있도록 30분 동안 기다리세요. 그래프의 첫 번째 출력을 보려면 브라우저를 열고 http://munin.linux-console.net/munin으로 이동하여 로그인 자격 증명을 입력하세요.

사용자 이름비밀번호를 묻는 메시지가 표시되지 않으면 /etc/httpd/conf.d/munin.conf를 열고 사용자 이름을 다음에서 변경하세요. Muninadmin으로 변경하고 Apache를 다시 시작하세요.

AuthUserFile /etc/munin/munin-htpasswd
AuthName "admin"
AuthType Basic
require valid-user

5단계: Munin 서버에 Linux 클라이언트 추가

Linux 클라이언트 시스템에 로그인하고 다음과 같이 munin-node 패키지만 설치합니다.


yum install munin-node
dnf install munin-node      [On Fedora 22+ versions]
apt-get install munin-node  [On Debian based systems]

이제 /etc/munin/munin-node.conf 구성 파일을 열고 munin 서버 IP 주소를 추가하여 클라이언트에서 데이터 가져오기를 활성화합니다.


vi /etc/munin/munin-node.conf

다음과 같은 형식으로 Munin 서버의 IP 주소를 추가합니다.


A list of addresses that are allowed to connect.  

allow ^127\.0\.0\.1$
allow ^::1$
allow ^192\.168\.0\.103$

마지막으로 munin 클라이언트를 다시 시작하십시오.

------------------ On RHEL, CentOS and Fedora ------------------
service munin-node start
chkconfig --level 35 munin-node on

------------------ On RHEL/CentOS 7 and Fedora 22+ ------------------
systemctl enable munin-node
systemctl start munin-node

6단계: 클라이언트 노드를 연결하도록 Munin 서버 구성

/etc/munin/munin.conf 구성 파일을 열고 표시된 대로 서버 이름과 IP 주소를 사용하여 원격 Linux 클라이언트 노드의 다음 새 섹션을 추가합니다.


a simple host tree
[munin.linux-console.net]
    address 127.0.0.1
    use_node_name yes

[munin-node.linux-console.net]
    address 192.168.0.15
    use_node_name yes

다음으로, munin 서버를 다시 시작하고 http://munin.linux-console.net/munin 페이지로 이동하여 작동 중인 새 클라이언트 노드 그래프를 확인하세요.

자세한 정보 및 사용법을 보려면 http://munin-monitoring.org/wiki/Documentation을 방문하십시오.