Ganglia installation and deployment process

Ganglia installation and deployment process

Ganglia consists of three parts: gmond, gmetad, and gweb.

  • gmond is responsible for collecting data ( nodes that need to be monitored must be installed)
  • gmetad is responsible for receiving the data collected by gmond (only needs to be installed on the node where the web service is deployed )
  • gweb is responsible for displaying the data of gmetad (only needs to be installed on the node where the web service is deployed )

The first step is to install the file

  1. Install the epel source, the installation command is as follows ( all nodes are installed)
yum -y install epel-release
  1. Install gmond ( node ​​installation for collecting data)
yum -y install ganglia-gmond
  1. Download gmetad ( web service node installation)
yum -y install ganglia-gmetad
  1. Download gweb ( web service node installation)
sudo yum -y install httpd php # 需要额外安装httpd、php
sudo yum -y install ganglia-web

The second step configuration file

  1. Modify the configuration file vim /etc/httpd/conf.d/ganglia.conf
 # Ganglia monitoring system php web frontend
Alias /ganglia /usr/share/ganglia
<Location /ganglia>
 Require all granted
 #Order deny,allow
 #Deny from all
 #Allow from all
 # Allow from 127.0.0.1
 # Allow from ::1
 # Allow from .example.com
</Location>

  1. Modify the configuration file /etc/ganglia/gmetad.conf
data_source “hadoop202” 192.168.88.202
  1. Modify the configuration file /etc/ganglia/gmond.conf [here a node is configured, synchronize all nodes through scp ] (note: focus on the configuration information of name, bind and host )
[atguigu@hadoop102 flume]$ sudo vim /etc/ganglia/gmond.conf 
修改为:
cluster {
    
    
 name = "hadoop202"  ###名字要和gmetad中的相同
 owner = "unspecified"
 latlong = "unspecified"
 url = "unspecified"
}
udp_send_channel {
    
    
 #bind_hostname = yes # Highly recommended, soon to be default.
 # This option tells gmond to use a source address
 # that resolves to the machine's hostname. Without
 # this, the metrics may appear to come from any
 # interface and the DNS names associated with
 # those IPs will be used to create the RRDs.
 # mcast_join = 239.2.11.71
 host = 192.168.88.202 ###接收数据的节点IP地址
 port = 8649
 ttl = 1
}
udp_recv_channel {
    
    
 # mcast_join = 239.2.11.71
 port = 8649
 bind = 192.168.88.202 ###节点本机的IP地址
 retry_bind = true
 # Size of the UDP buffer. If you are handling lots of metrics you really
 # should bump it up to e.g. 10MB or even higher.
 # buffer = 10485760
}

  1. Modify the configuration file /etc/selinux/config [Note: It will take effect after restarting ]
SELINUX=disabled # 解决冲突

The third step is to start Ganglia

systemctl start httpd.service
systemctl start gmetad.service
systemctl start gmond.service

Permissions issue

  1. turn off firewall
systemctl stop firewalld
  1. authorized
chmod -R 777 /var/lib/ganglia

Guess you like

Origin blog.csdn.net/lafsca5/article/details/125981648