How To Install And Configure Ganglia On Red Hat Enterprise Linux 5
Filed under: Linux, SysAdmin — acidborg @ 13:34
Description: Although Ganglia “is a scalable distributed monitoring system for high-performance computing systems such as clusters and Grids” (from its web), I’m going to explain how to set up Ganglia as a monitoring system for a group of computers which are neither part of a cluster nor a grid. Ganglia has very low per-node overheads and high concurrency, which makes it perfect to monitor a huge group of servers. I’m going to use one server to collect all data from the nodes. The collector server will run the web front-end for simplicity reasons, although you can install the web front-end on any other server if you need it.
Installation:
- Add the EPEL repositories to your systems. (我下载了这个包并安装epel-release-5-4.noarch.rpm)
- Install the data collector (gmetad), the monitoring daemon (gmond) and the web front-end on the collector server:
yum install ganglia ganglia-gmetad ganglia-web ganglia-gmond
- install gmond on each node you want to monitor:
yum install ganglia ganglia-gmond
Configuration on the collector server (for example: collector.mycompany.com):
- Edit /etc/gmetad.conf and modify the line which begins with “data_source“. Example:
data_source "my servers" 60 localhost (这里我没做改动,默认的“my cluster” ,也没设置60)
This will collect data from the groups of machines tagged as “my servers” every 60 seconds. It will use localhost as the source of the info.
- Edit /etc/gmond.conf and modify the following part:
cluster {
name = "my servers" (只改了这个地方,改成"my cluster”)
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"
}
udp_send_channel {
host = collector.mycompany.com
port = 8649
}
udp_recv_channel {
port = 8649
}
tcp_accept_channel {
port = 8649
}-
This allows collector.mycompany.com to receive monitoring data from every node on port 8649(UDP).
- Restart the collector daemon (gmetad):
service gmetad restart
- Restart the node daemon (gmond):
service gmond restart
Restart the httpd daemon : service httpd restart
Configuration on each node you want to monitor (except collector.mycompany.com):
- Edit /etc/gmond.conf and modify the following part:
cluster {
name = "my servers" (只改了这个地方,改成"my cluster”)
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"
}
udp_send_channel {
host = collector.mycompany.com
port = 8649
}
/*udp_recv_channel {
}
tcp_accept_channel {
}*/This tells gmond to send the info to collector.mycompany.com on port 8649(UDP).
- Restart gmond:
service gmond restart
After a few minutes, you will have your monitoring data available through: collector.mycompany.com/ganglia . (http://localhost/ganglia)
-