Configuration document of the distributed monitoring system Ganglia

Source: Internet
Author: User
Tags rrd rrdtool

I. ganglia Components

Ganglia includes the following programs, which transmit monitoring data in XML format to achieve monitoring results. Gmetad is used to collect data from various clusters and update the data to the RRD database. Gmond collects local monitoring data and sends it to other machines. Collect monitoring data from other machines for gmetad to read. The default listening port 8649 Web Front-end is a Web-based monitoring interface. It needs to be installed on the same node as gmetad, fetch data from gmetad, read the RRD database, and generate images, displayed. Ii. ganglia's Working ModelGanglia's data collection can work in Unicast (unicast) or multicasting (Multicast) mode. The default mode is multicast. Unicast: Send the monitoring data collected by the user to a specific machine. multicast across network segments is supported: send the monitoring data collected by yourself to all machines in the same network segment, and collect the monitoring data sent by all machines in the same network segment. Because it is sent in the form of a broadcast package, it must be within the same network segment. However, different transmission channels can be defined within the same network segment. 3. Install GangliaThe installation of ganglia is very simple. It is divided into two parts: Monitoring Management Terminal (gmetad) and client (gmond) installation. The installation script has been written, which is not described here. The recommended version is ganglia-3.4.0, which can be installed at http://sourceforge.net/projects/ganglia/files/download. Iv. ganglia ConfigurationHere we introduce a simple ganglia configuration architecture, that is, a Monitoring Management Terminal and multiple clients. We assume that gmond works in multicast mode and has a cluster of cluster1, there are 10 servers (from host1 to host10) in the same network segment. 1. The configuration file of the monitoring management end is gmetad. conf, which can be found in the etc directory where ganglia is installed. The configuration of this file is very simple and is described as follows: the data_source "cluster1" host1 host2xml_port 8651interactive_port 8652rrd_rootdir "/var/lib/ganglia/rrds" data_source parameter defines the cluster name and nodes in the cluster. Because the multicast mode is used, each gmond node has all the monitoring data of the nodes in cluster1, so you do not need to write all nodes into data_source. It is recommended that no less than two data entries be written. When the host 1 node crashes, it will automatically find the host 2 node to fetch data. Xml_port defines an interactive port for data collection. If this parameter is not specified, the default value is 8651. You can use Telnet to obtain all the data of the client collected by the monitoring management end. Interactive_port defines the port for the Web end to obtain data. This port must be specified when configuring the ganglia Web monitoring interface. The rrd_rootdir parameter defines the storage path of the RRD database. After gmetad collects the monitoring data, it is updated to the corresponding RRD database under this directory. The data_source parameter is used to define a monitoring cluster. To monitor multiple application systems, you can define data_source "My cluster" 10 localhost my.machine.edu: 8649 1.2.3.5: 8655data_source "my grid" 50 1.3.4.7: 8655 grid.org: 8651 grid-backup.org: 8651data_source "another source" 1.3.4.7: 8655 1.3.4.8 when defining a cluster node, you can use host name, IP address and other forms, you can also add a port. If you do not add a port, the default port is port 8649. You can also set the data collection frequency, such as "10 localhost, 50 1.3.4.7: 8655, data is collected every 10 seconds and 50 seconds. 2. After the client configuration client monitoring is installed, the configuration file is located in the etc directory where ganglia is installed and named gmond. conf. This configuration file is a little complicated and is described as follows: globals {daemonize = yes # Run setuid = Yes user = Nobody # debug_level = 0 # debug level max_udp_msg_len = 1472 mute = No # Dumb, this node will no longer broadcast any data it has collected to the network. Deaf = No # deaf child, this node will no longer receive data packets broadcast by other nodes allow_extra_data = Yes host_dmax = 0/* secs */cleanup_threshold = 300/* secs */gexec = No # whether to use gexec send_metadata_interval = 0} clust Er {name = "cluster1" # Cluster owner of the current node = "Junfeng" # Who is the owner of the node latlong = "unspecified" # coordinates on the Earth, longitude and latitude? Url = "unspecified"} host {location = "unspecified"} udp_send_channel {# UDP packet transmission channel mcast_join = 239.2.11.71 # multicast, working under 239.2.11.71 channel. If the unicast mode is used, write host = host1, in unicast mode, you can also configure multiple udp_send_channel ports = 8649 # listener port TTL = 1} udp_recv_channel {# configure mcast_join to receive UDP packets = 239.2.11.71 # Port = 8649 in 239.2.11.71 # listening port bind = 239.2.11.71 # binding} tcp_accept_channel {Port = 8649 # port listened through TCP protocol, remote clients can obtain monitoring data through link to port 8649. 3. The Web monitoring interface for ganglia configuration on the Web Side of ganglia is based on PHP. Therefore, you need to install the PHP environment. Installation of the PHP environment is not described, you can download ganglia-webat http://sourceforge.net/projects/ganglia/files /. B root directory. We recommend that you download ganglia-web-3.5.7. The Web interface for ganglia configuration is relatively simple. You only need to modify several PHP files. The first one is conf_default.php. You can rename conf_default.php to Conf. PHP. You can also keep it unchanged. ganglia's Web will first find conf by default. PHP. conf_default.php will continue to be found if it cannot be found. The content to be modified is as follows: $ conf ['gmetad _ root'] = "/var/lib/ganglia "; # ganglia web root directory $ conf ['rrds'] = "$ {conf ['gmetad _ root']}/rrds "; # path for ganglia web to read the rrds database $ conf ['dwoo _ compiled_dir '] = "$ {conf ['gmetad _ root']}/dwoo/compiled "; #777 permission $ conf ['dwoo _ cache_dir '] = "$ {conf ['gmetad _ root']}/dwoo/cache "; # requires 777 permissions $ conf ['rdtool'] = "/opt/rrdtool/bin/rrdtool "; # specify the rrdtool path $ conf ['graphdir'] = $ conf ['gweb _ root']. '/graph. d '; # generate the image template directory $ conf ['ganglia _ ip'] = "127.0.0.1"; # gmetad server address $ conf ['ganglia _ port'] = 8652; # gmetad server interactive monitoring data port Publishing 5. Manage GangliaAfter all the configuration operations are completed, you can start the ganglia service. First, start the gmetad service on the monitoring management end:/etc/init. d/gmetad start Apache's Web Service:/usr/local/apache2/bin/apachectl start and then start gmond service on each client:/etc/init. d/gmond start

Configuration document of the distributed monitoring system Ganglia

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.