Big data high availability cluster environments Installation and Configuration (08) - Installation Ganglia cluster monitoring

1. Install and software dependencies

Mounting operation command input on all servers

yum install epel-release -y
yum install ganglia-web ganglia-gmetad ganglia-gmond –y

 

Configuring monitoring terminal on the master server

we /etc/ganglia/gmetad.conf

Modify the following content

data_source "server" 50 master:8649 master-backup:8649 node1:8649 node2:8649 node3:8649
case_sensitive_hostnames 1
we /etc/ganglia/gmond.conf

Modify the following content

cluster {
  name = "server"
  owner = "unspecified"
  latlong = "unspecified"
  url = "unspecified"
}
udp_send_channel {
  #mcast_join = 239.2.11.71
  host = master
  port = 8649
  ttl = 1
}
udp_recv_channel {
  #mcast_join = 239.2.11.71
  port = 8649
  #bind = 239.2.11.71
  #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
}

Modify HTTP access configuration

we /etc/httpd/conf.d/ganglia.conf

Modify the following content

Alias /ganglia /usr/share/ganglia
<Location /ganglia>
  Order deny,allow
  Allow from all
  #Require local
  # Require ip 10.1.2.3
  # Require host example.org
</Location>

Set ganglia monitoring program is linked to a specific directory

ln -s /usr/share/ganglia/ /var/www/html/ganglia

Modify the apache configuration

we /etc/httpd/conf/httpd.conf

Read the contents of the Directory

# 10080 modified port 80 to prevent back nginx port conflict with 
the Listen 10080
 
<Directory /> 
    the AllowOverride none 
    the Order the Allow, Deny 
    the Allow All from 
    #Require All denied
 </ Directory>

 

3. Start apache and ganglia, and set the boot

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

Start Service

rrdcached /usr/bin/rrdcached -p /var/run/ganglia/hdp/rrdcached.pid -m 664 -l unix:/var/run/ganglia/hdp/rrdcached.sock -m 777 -P FLUSH,STATS,HELP -l unix:/var/run/ganglia/hdp/rrdcached.limited.sock -b /var/lib/ganglia/rrds -B -t 4 -w 3600 -f 7200 -z 1800 -F

Set boot

we /etc/rc.local

Add the following configuration in the tail

/usr/bin/rrdcached -p /var/run/ganglia/hdp/rrdcached.pid -m 664 -l unix:/var/run/ganglia/hdp/rrdcached.sock -m 777 -P FLUSH,STATS,HELP -l unix:/var/run/ganglia/hdp/rrdcached.limited.sock -b /var/lib/ganglia/rrds -B -t 4 -w 3600 -f 7200 -z 1800 -F

 

Configuring the monitoring terminal

Do the following actions on other servers

we /etc/ganglia/gmond.conf

Modify the following content

cluster {
  name = "server"
  owner = "unspecified"
  latlong = "unspecified"
  url = "unspecified"
}
udp_send_channel {
  #mcast_join = 239.2.11.71
  host = master
  port = 8649
  ttl = 1
}
udp_recv_channel {
  #mcast_join = 239.2.11.71
  port = 8649
  #bind = 239.2.11.71
  #retry_bind = true
}

 

5. Configure HDFS, YARN integrated Ganglia

we /usr/local/hadoop/etc/hadoop/hadoop-metrics2.properties

The values ​​of all commented inside, and then replace the following configuration

# for Ganglia 3.1 support
*.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
*.sink.ganglia.period=10
# default for supportsparse is false
*.sink.ganglia.supportsparse=true
*.sink.ganglia.slope=jvm.metrics.gcCount=zero,jvm.metrics.memHeapUsedM=both
*.sink.ganglia.dmax=jvm.metrics.threadsBlocked=70,jvm.metrics.memHeapUsedM=40
namenode.sink.ganglia.servers=master:8649 # host请参考gmond.conf中的定义
datanode.sink.ganglia.servers=master:8649
resourcemanager.sink.ganglia.servers = Master: 8649 
nodemanager.sink.ganglia.servers = Master: 8649 
mrappmaster.sink.ganglia.servers = Master: 8649 
jobhistoryserver.sink.ganglia.servers = Master: 8649 
# note the following parameters, if modifications may cause data overload, ganglia disk space quickly filled. 
Switch OFF metrics Container #
 * .source.filter.class = org.apache.hadoop.metrics2.filter.GlobFilter 
nodemanager. * .Source.filter.exclude * = * ContainerResource

 

6. The integrated configuration HBase Ganglia

we /usr/local/hbase/conf/hadoop-metrics2-hbase.properties

The values ​​of all commented inside, and then replace the following configuration

*.sink.file*.class=org.apache.hadoop.metrics2.sink.FileSink
# default sampling period
*.period=10
*.source.filter.class=org.apache.hadoop.metrics2.filter.GlobFilter
*.record.filter.class=${*.source.filter.class}
*.metric.filter.class=${*.source.filter.class}
hbase.sink.ganglia.record.filter.exclude=*Regions*
hbase.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
hbase.sink.ganglia.tagsForPrefix.jvm=ProcessName
*.sink.ganglia.period=20
hbase.sink.ganglia.servers=master:8649 # Host refer to the definition of gmond.conf

 

7. Set monitored from the start end

systemctl start gmond
systemctl enable gmond

 

8. Check whether the normal service

Restart on the master server and hadoop hbase service access http://192.168.10.90:10080/ganglia/  view the surveillance page

View monitoring service operational status of the master server enter the command

gstat –a

systemctl status gmetad –l

When faced unable to view the monitoring information available above command to check the status, if gmetad and gmond services are operating normally, but did not end graphical data on the page, you can enter systemctl restart gmetad restart the master server monitoring service, in three enter systemctl restart gmond server restart monitor collection services.

 

Disclaimer: This article was published in the original  garden blog , author  AllEmpty  herein welcome to reprint, but without the author's consent declared by this section must be retained, and given the original connection in the apparent position of the article page, otherwise regarded as infringement.

On the blog: http: //www.cnblogs.com/EmptyFS/

Guess you like

Origin www.cnblogs.com/EmptyFS/p/12113168.html