introducing ganglia
DESCRIPTION
These are the slides I used in my local libre user group meetup to introduce Ganglia to my friends and users from varied backgrounds.TRANSCRIPT
GANGLIA MONITORING SYSTEM
JULY 2013
Anu Bhaskar www.anubhaskar.name
Creative Commons Attribution-ShareAlike 3.0 Unported License.
2
1.Introduction2.Ganglia Architecture3.Prototype Architecture4.Install & configure gmond5.Install & configure gmetad6.Install and configure web front7.Explore metrics in web front
AGENDA
Creative Commons Attribution-ShareAlike 3.0 Unported License.
3
1.BSD Licensed2.Monitoring system3.Distributed4.Scalable5.XML for data representation, XDR for data transport, and RRDtool for data storage and visualization
6.Remotely view historical or live statistics
INTRODUCTION
Creative Commons Attribution-ShareAlike 3.0 Unported License.
4
GANGLIA ARCHITECTURE
Creative Commons Attribution-ShareAlike 3.0 Unported License.
Monitored Node(gmond)
Meta node(gmetad + web)
Web Front end Users
5
PROTOTYPE ARCHITECTURE
Creative Commons Attribution-ShareAlike 3.0 Unported License.
sender1(gmond)
Centos6/10.10.10.3
sender2(gmond)
Centos6/10.10.10.4
collector(gmetad + web)
Centos6/10.10.10.5
Web Front end Users
6
Install epel repositories in sender1 and sender 2# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release- 6-8.noarch.rpm
Install gmond in sender1 and sender2# yum install ganglia-gmond
Configure gmond in sender1 and sender2# vi /etc/ganglia/gmond.confcluster { name = “group1”
Start gmond service in sender1 and sender2# service gmond start# netstat –ntlp | grep gmond
INSTALL & CONFIGURE GMOND
Creative Commons Attribution-ShareAlike 3.0 Unported License.
7
Install epel repository in collector# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release- 6-8.noarch.rpm
Install rrdtool in collector# yum install rrdtool
Install gmetad in collector# yum install ganglia-gmetad
Configure gmetad in collector# vi /etc/ganglia/gmetad.confdata_source “group1” sender1:8649 sender2:8649
Start gmetad service in collector# service gmetad start# netstat -ntlp | grep gmetad
INSTALL & CONFIGURE GMETAD
Creative Commons Attribution-ShareAlike 3.0 Unported License.
8
Install Apache webserver in collector# yum install httpd# vi /etc/httpd/conf/httpd.confServerName collector:80
Install php in collector# yum install php
Create a php script to test php webserver module in collector# vi /var/www/html/info.php<?phpphpinfo();?>
Start webserver in collector# service httpd start
INSTALL AND CONFIGURE WEB FRONT END
Creative Commons Attribution-ShareAlike 3.0 Unported License.
9
Test the php module by browsing to the url http://collector/info.php
Install ganglia web frontend in collector# yum install ganglia-web
Copy web files to web server directory# cp -pr /usr/share/ganglia /var/www/html/# cd /var/www/html/ganglia# rm conf.php # ln -s /etc/ganglia/conf.php conf.php# rm private_clusters# ln -s /etc/ganglia/private_clusters private_clusters
Remove ganglia access restrictions in webserver (only for this demo, not recommended for production)# rm /etc/httpd/conf.d/ganglia.conf
INSTALL AND CONFIGURE WEB FRONT END
Creative Commons Attribution-ShareAlike 3.0 Unported License.
10
Access ganglia web# http://collector/ganglia/
Load cpu of sender1 using below commend and view its cpu metric for last hour# cat /dev/zero > /dev/null
EXPLORE METRICS IN WEB FRONT END
Creative Commons Attribution-ShareAlike 3.0 Unported License.