Installing ganglia monitoring in an OpenStack cluster

Source: Internet
Author: User

1, Ganglia Introduction

ganglia consists of three parts, Gmond, Gmetad and Gweb.

Gmond (Ganglia monitoring Daemon) is a lightweight service that is installed on each node host that needs to collect metrics data. Gmond completes the actual data collection of the metrics on each host and shares the data through the Listen/advertise protocol and other nodes within the cluster. With Gmond, you can easily collect many system metrics data, such as CPU, memory, disk, network, and active process data.

Gmetad (Ganglia Meta Daemon) is a service that collects metric data from other Gmetad or gmond sources and stores it in the RRD format to disk. Gmetad provides a simple query mechanism for specific metrics information collected from host groups and supports hierarchical authorization, making it possible to create a federated monitoring domain.

Gweb (Ganglia Web) Gweb is a PHP front-end that uses a browser to display the data stored by Gmetad. A graphical representation of the various metrics data collected in the running state of a cluster in a web interface.




2, install ganglia, I openstack cluster is Ubuntu16.04

First, install Apache, PHP, andGanglia services on the controller node. Installing Gmond on other nodes compute, storage nodes is possible. The controller node is already installed Apache, do not install it here.

Three nodes

Controller 192.168.13.244

Compute 192.168.13.243

Storage 192.168.13.245


Ganglia consists of two so-called main daemons Gmond (Ganglia monitoring daemon) and Gmetad (Ganglia Meta daemon), a PHP-based Web front end and other small utilities.


Install Ganglia-webfrontend and ganglia-monitor on the master node. On other monitoring nodes, just install Ganglia-monitor and link ganglia files to Apache's default directory


3. Install on Controller node

# Apt Install php php-gd rrdtool ganglia-webfrontend ganglia-monitor-y

# apt-get Install Ganglia-webfrontend ganglia-monitor-y

# apt-get Install libapache2-mod-php7.0 php7.0-xml-y


4. Copy Ganglia webfrontend Apache configuration

#cp/etc/ganglia-webfrontend/apache.conf/etc/apache2/sites-enabled/ganglia.conf



5, because ganglia-webfront this package by default, the Web-related code is installed under the "/usr/share/ganglia-webfrontend/" path, so that Apache access. You can use a soft link, or move the directory directly to the "/var/www/" directory.

#ln-S/usr/share/ganglia-webfrontend/var/www/ganglia


6. Edit the configuration file of the Ganglia meta daemon

[Email protected]:~# vim/etc/ganglia/gmetad.conf

Data_source "OpenStack" 192.168.13.244:8649 192.168.13.243:8649 192.168.13.245

Lists the data sources for the machine service, IP: port or server name: port. If the port number 8649 (the default Gmond port) is not specified.

Gridname "OpenStack"

Setuid_username "Nobody"

Rrd_rootdir "/var/lib/ganglia/rrds"



7. Edit the configuration file of the master node:

# vim/etc/ganglia/gmond.conf

Cluster {

name = " unspecified "

Owner = "Unspecified"

Latlong = "Unspecified"

url = "Unspecified"

}

Revision changed to

Cluster {

Name = "OpenStack"

Owner = "Unspecified"

Latlong = "Unspecified"

url = "Unspecified"

}

Udp_send_channel {

Mcast_join = 239.2.11.71

Port = 8649

TTL = 1

}

Revision changed to

Udp_send_channel {

# mcast_join = 239.2.11.71 #注释掉

host = 192.168.13.244 #设置为服务端IP

Port = 8649

TTL = 1

}

Udp_recv_channel {

Mcast_join = 239.2.11.71

Port = 8649

bind = 239.2.11.71

}

Revision changed to

Udp_recv_channel {

# mcast_join = 239.2.11.71 #注释掉

Port = 8649

# bind = 239.2.11.71 #注释掉

}


8. Start the service

#/etc/init.d/ganglia-monitor Start

Starting Ganglia Monitor Daemon:

#/etc/init.d/gmetad Start

Starting Ganglia Monitor Meta-daemon:

#/etc/init.d/apache2 Start

[OK] Starting apache2 (via Systemctl): Apache2.service.


9. View service Status

# PS aux | grep ganglia

Ganglia 68442 0.0 0.0 146112 62400? SSL 10:51 0:00/usr/sbin/gmond--pid-file/var/run/gmond.pid


# PS aux | grep Gmetad

Nobody 74365 0.2 0.0 185024 16192? Sl 10:53 0:02/usr/sbin/gmetad--pid-file/var/run/gmetad.pid


# PS aux | grep apache2

Root 68286 0.0 0.0 12864 10240? Ss 10:51 0:00/usr/sbin/apache2-k Start

Www-data 68289 0.0 0.0 303360 13120? Sl 10:51 0:00/usr/sbin/apache2-k Start

Www-data 68290 0.0 0.0 303360 13120? Sl 10:51 0:00/usr/sbin/apache2-k Start




10, monitored node compute and storage installation configuration Gmond

[Email protected]:~# apt-get Install ganglia-monitor-y


Configure the gmod.conf to copy the Controller node.

[Email protected]:~# scp/etc/ganglia/gmond.conf 192.168.13.243:/etc/ganglia/

[Email protected]:~# scp/etc/ganglia/gmond.conf 192.168.13.245:/etc/ganglia/


Start monitor

[Email protected]:~#/etc/init.d/ganglia-monitor Restart

Stopping Ganglia Monitor Daemon:gmond.

Starting Ganglia Monitor Daemon:gmond.



11, Login Ganglia monitoring platform

http://192.168.13.244/ganglia/

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/8C/BF/wKioL1h3Go3x1N9VAASoN4BlTtc186.png-wh_500x0-wm_ 3-wmp_4-s_1642985154.png "title=" capture. PNG "alt=" Wkiol1h3go3x1n9vaason4blttc186.png-wh_50 "/>

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>


This article is from the "Technical Achievement Dream" blog, please be sure to keep this source http://andyliu.blog.51cto.com/518879/1891368

Installing ganglia monitoring in an OpenStack cluster

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.