Last active
December 19, 2015 09:38
-
-
Save shaon/937e01996e4de902486a to your computer and use it in GitHub Desktop.
Install ganglia on ec2/eucalyptus instances
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# allow security group | |
euca-authorize -P tcp -p 22 default | |
euca-authorize -P tcp -p 80 default | |
################################ | |
# Install Ganglia on Meta Node # | |
################################ | |
# install EPEL repo | |
yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm -y | |
# install Ganglia | |
yum install ganglia ganglia-gmetad ganglia-web ganglia-gmond -y | |
# allow all for apache | |
vim /etc/httpd/conf.d/ganglia.conf | |
# file will look like below | |
Alias /ganglia /usr/share/ganglia | |
<Location /ganglia> | |
Order deny,allow | |
Deny from all | |
Allow from all | |
Allow from ::1 | |
# Allow from .example.com | |
</Location> | |
# modify gmetad.conf file and put cluster name | |
vim /etc/ganglia/gmetad.conf | |
# for this example the cluster name is 'my cluster' | |
data_source "my cluster" localhost | |
# modify gmond.conf file on the Meta Node | |
vim /etc/ganglia/gmond.conf | |
# modify the following part only | |
# EC2 instances do not have multicast support, so using UDP only | |
globals { | |
daemonize = yes | |
setuid = yes | |
user = ganglia | |
debug_level = 0 | |
max_udp_msg_len = 1472 | |
mute = no | |
deaf = no | |
allow_extra_data = yes | |
host_dmax = 0 /*secs */ | |
cleanup_threshold = 300 /*secs */ | |
gexec = no | |
send_metadata_interval = 5 /*secs CHANGED!! */ | |
} | |
cluster { | |
name = "my cluster" /* CHANGED!! */ | |
owner = "unspecified" | |
latlong = "unspecified" | |
url = "unspecified" | |
} | |
udp_send_channel { | |
/* removed the bind_hostname and mcast_join */ | |
host = 10.104.3.128 /* Meta Node hostname or IP address */ | |
port = 8649 | |
ttl = 1 | |
} | |
udp_recv_channel { | |
/* removed the mcast_join and bind */ | |
port = 8649 | |
} | |
tcp_accept_channel { | |
port = 8649 | |
} | |
# change run level | |
chkconfig gmetad on | |
chkconfig gmond on | |
chkconfig httpd on | |
# start the services | |
service gmetad start | |
service gmond start | |
service httpd start | |
##################################### | |
# Install Ganglia on Monitoring Nodes # | |
##################################### | |
# install EPEL repo | |
yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm -y | |
# install ganglia monitoring daemon | |
yum install ganglia ganglia-gmond -y | |
# modify gmond.conf file | |
vim /etc/ganglia/gmond.conf | |
/* removed 'udp_recv_channel' and 'tcp_accept_channel' */ | |
cluster { | |
name = "my cluster" /* CHANGED!! */ | |
owner = "unspecified" | |
latlong = "unspecified" | |
url = "unspecified" | |
} | |
udp_send_channel { | |
/* removed the bind_hostname and mcast_join */ | |
host = 10.104.3.128 /* Meta Node hostname or IP address */ | |
port = 8649 | |
ttl = 1 | |
} | |
# change run level | |
chkconfig gmond on | |
# start the monitoring service | |
service gmond start | |
## Optional: To create Ganglia Meta Node ## | |
# change rc.local to set the public IP address | |
sed -i "s/10.104.3.128/$PUBLIC_IP/" /etc/ganglia/gmond.conf | |
service gmond restart | |
# Gotchas | |
1. To remove dead host from web view, restart gmond and gmetad on Meta Node or Ganglia Server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment