HPC/클러스터

ganglia 설치 CentOS7.8

mirhenge 2020. 12. 15. 21:19

10.10.10.21 [xcagmgt01] : ganglia 서버, CentOS7.8

10.10.10.32 [node01] : ganglia Client 서버 Ubuntu 16.04

 

Ganglia 설치전 필요 라이브러리 설치

yum install -y epel-release libpng-devel libpng libart_lgpl-devel python-devel libconfuse-devel pcre-devel expat-devel rrdtool-devel rrdtool libconfuse-devel freetype-devel php

 

1. Ganglia 설치

[root@xcatmgt01 ~]# wget https://sourceforge.net/projects/ganglia/files/ganglia%20monitoring%20core/3.7.2/ganglia-3.7.2.tar.gz

 

2. RPM 빌드 

[root@xcatmgt01 ~]# rpmbuild -tb ganglia-3.7.2.tar.gz

[root@xcatmgt01 ~]# cd /root/rpmbuild/RPMS/x86_64/

[root@xcatmgt01 x86_64]# yum -y install *.rpm

[root@xcatmgt01 x86_64]# ls -al

total 900

drwxr-xr-x 2 root root    263 Dec 14 22:59 .

drwxr-xr-x 3 root root     20 Dec 14 22:59 ..

-rw-r--r-- 1 root root 486720 Dec 14 22:59 ganglia-debuginfo-3.7.2-1.x86_64.rpm

-rw-r--r-- 1 root root  49636 Dec 14 22:59 ganglia-devel-3.7.2-1.x86_64.rpm

-rw-r--r-- 1 root root  59068 Dec 14 22:59 ganglia-gmetad-3.7.2-1.x86_64.rpm

-rw-r--r-- 1 root root 135244 Dec 14 22:59 ganglia-gmond-3.7.2-1.x86_64.rpm

-rw-r--r-- 1 root root 128664 Dec 14 22:59 ganglia-gmond-modules-python-3.7.2-1.x86_64.rpm

-rw-r--r-- 1 root root  45408 Dec 14 22:59 libganglia-3.7.2-1.x86_64.rpm

[root@xcatmgt01 x86_64]#

 

* Client 에 설치 할경우 "ganglia-gmetad-3.7.2-1.x86_64.rpm" 을 제외한 나머지 파일만 copy 하면됨.

 

3. gmetad.conf 파일 수정

 

data_source "Build PoD"로 지정 수집 Interval 1초 [그 이상으로 해도됨], 그 다음은 gmetad, gmond 설치된 ganglia server hostname 또는 IP  작성, ip 다음 client ip 또는 hostname 으로 grouping 하는데 사용할수 있음.

example) data_source "Build PoD" 1 10.10.10.21 node01 node02 node03 node04

 

[root@xcatmgt01 ~]# cat /etc/ganglia/gmetad.conf

data_source "Build PoD" 1 10.10.10.21

 

4. gmond.conf 파일 수정

[root@xcatmgt01 ~]# cat /etc/ganglia/gmond.conf

cluster {

  name = "Build PoD"  Cluster 명 작성

  owner = "unspecified"

  latlong = "unspecified"

  url = "unspecified"

}

~~

~~

~~

 

만약 ganglia 서버도 모니터링도 하고 싶으면 아래 section 부분 수정한다.

 

udp_send_channel {
        host = 10.10.10.21
#       mcast_join = 239.2.11.71
        port = 8649
        ttl = 1
}


udp_recv_channel {
        port = 8649
}

 

5. httpd.conf 수정 

[root@xcatmgt01 conf]# cat httpd.conf

ServerName localhost

DirectoryIndex index.html index.html index.php

 

 

6. daemon restart

[root@xcatmgt01 /]# systemctl restart httpd gmetad gmond

 

7. ubuntu client node gmond 설치.

 

root@node01:~#apt-get -y install ganglia-monitor

root@node01:~# cat /etc/ganglia/gmond.conf

cluster {

  name = "Build PoD"

  owner = "unspecified"

  latlong = "unspecified"

  url = "unspecified"

}

udp_send_channel {

  host = 10.10.10.21 

  port = 8649

  ttl = 1

}

 

udp_recv_channel {

  port = 8649

}

root@node01:~#systemctl restart ganglia-monitor

 

 

8. ganglia 접속 및 노드 상태 확인

http://10.10.10.21/ganglia

 

 

 

 

 

* cache 위치 : 만약 문제로 인해 노드의 상태가 정상적으로 모니터링 돼지 않으면 아래 cache 를 삭제 하면 됨.

Actually, this is a known issue for ganglia. For clean this problem, here is the steps :

1. shutdown the ganglia daemons: gmetad gmond greceptor
2. clean up the ganglia cache: /var/lib/ganglia/rrds
3. then start the ganglia daemons again. ( if still not work, please reboot the forntend machine)

 

* XML output 메시지로 ganglia 에서 노드 선택시 에러가 발생했을때 반드시 노드의 ip 또는 hostname 등을 확인해야 함.