Ganglia는 시스템 리소스를 모니터링하는 오픈 패키지 이다. 마스터, 슬레이브로 많은 서버를 모니터링할 수 있다.
아래 그림은 시스템 구성도이다.

- 설치환경
Master : 192.168.201.227
Slave Node1 : 192.168.201.201
0. 권한 설정(모든 노드)
# vi /etc/sudoers
user ALL=(ALL:ALL) ALL
1. 마스터 노드 설치
# apt-get install -y ganglia-monitor rrdtool gmetad ganglia-webfrontend
2. 마스터 노드 환경 설정
# cp /etc/ganglia-webfrontend/apache.conf /etc/apache2/sites-enabled/ganglia.conf
# vi /etc/ganglia/gmetad.conf
# data_source "my cluster" [polling interval] address1:port addreses2:port ...
data_source "my cluster" 30 localhost
# vi /etc/ganglia/gmond.conf
마스터의 경우 아래 host ip는 설정 안해도 된다. gmetad.conf에 정의한 localhost가 표시된다.

3. 마스터 노드 실행
# service ganglia-monitor restart && service gmetad restart && service apache2 restart
4. 웹 접속
http://192.168.201.227/ganglia/
혹, 아래와 같은 에러가 발생하면(아파치 에러 로그)
아래 패키지를 설치한다.
Uncaught Error: Call to undefined function xml_parser_create()
apt-get -y install php7.0 libapache2-mod-php7.0
apt-get install php7.0-xmlrpc
apt-get install php7.0-xml
---------
5. 슬레이브 노드 설치
# apt-get install -y ganglia-monitor
6. 슬레이브 노드 환경 설정
# vi /etc/ganglia/gmond.conf

7. 서비스 실행
# service ganglia-monitor restart
8. 마스터 노드에서 확인


덧글