Ganglia のインストールと展開のプロセス

Ganglia のインストールと展開のプロセス

Ganglia は、gmond、gmetad、gweb の 3 つの部分で構成されます。

  • gmond はデータの収集を担当します (監視する必要があるノードをインストールする必要があります)
  • gmetad は、gmond によって収集されたデータを受信する役割を果たします ( Web サービスがデプロイされているノードにのみインストールする必要があります)。
  • gweb は gmetad のデータを表示します ( Web サービスがデプロイされているノードにのみインストールする必要があります)。

最初のステップはファイルをインストールすることです

  1. epel ソースをインストールします。インストールコマンドは次のとおりです (すべてのノードがインストールされています)
yum -y install epel-release
  1. gmondのインストール(データ収集用ノードのインストール)
yum -y install ganglia-gmond
  1. gmetad のダウンロード ( Web サービス ノードのインストール)
yum -y install ganglia-gmetad
  1. gweb をダウンロード ( Web サービス ノードのインストール)
sudo yum -y install httpd php # 需要额外安装httpd、php
sudo yum -y install ganglia-web

2 番目のステップの構成ファイル

  1. 設定ファイル 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. 設定ファイル /etc/ganglia/gmetad.conf を変更します。
data_source “hadoop202” 192.168.88.202
  1. 構成ファイル /etc/ganglia/gmond.conf を変更します [ここではノードが構成されており、scpを通じてすべてのノードを同期します] (注: name、bind、および 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. 設定ファイル /etc/selinux/config を変更します [注:再起動後に有効になります]
SELINUX=disabled # 解决冲突

3 番目のステップは、Ganglia を開始することです

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

権限の問題

  1. ファイアウォールをオフにする
systemctl stop firewalld
  1. 認可された
chmod -R 777 /var/lib/ganglia

おすすめ

転載: blog.csdn.net/lafsca5/article/details/125981648