In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "the overview and working principle of Ganglia". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Overview
Ganglia is an open source cluster monitoring project launched by UC Berkeley, designed to measure thousands of nodes. The core of Ganglia consists of gmond, gmetad, and a Web front end. It is mainly used to monitor the system performance, such as cpu, mem, hard disk utilization, Imax O load, network traffic and so on. It is easy to see the working status of each node through the curve, which plays an important role in reasonably adjusting and allocating system resources and improving the overall performance of the system.
Each computer runs a daemon named gmond that collects and sends metrics data. The host that receives all the measurement data can display the data and pass a compact form of the data into the hierarchy. It is precisely because of this hierarchical pattern that Ganglia can be well extended. Gmond brings very little system load, which makes it a piece of code running on each computer in the cluster without affecting user performance. All this data is collected multiple times, which can affect the performance of nodes. The "jitter" in the network occurs when a large number of small messages appear at the same time, which can be avoided by keeping the node clock consistent.
Gmetad can be deployed on any node in the cluster or an independent host connected to the cluster through the network. It communicates with gmond through unicast routing, collects the status information of the nodes in the area, and stores it in the database in the form of XML data.
The data is processed by the RRDTool tool, and the corresponding graphic display is generated, which is provided to the client intuitively in the way of Web.
2. Working principle
Ganglia includes the following programs, which transfer monitoring data through XDL (compressed format of xml) or XML format to achieve the monitoring effect. The nodes in the cluster collect and publish node status information by running gmond, then gmetad polls the information collected by gmond periodically, and then stores it in rrd database, which can be queried and displayed by web server.
Gmetad this program is responsible for periodically collecting data from each datasource to each cluster and updating it to the rrd database. It can be understood as the server. Gmond collects the monitoring data of this machine, sends it to other machines, collects the monitoring data of other machines, and communicates with each other through udp. The file format is xdl. The collected data is available for Gmetad to read. By default, port 8649 listens to the gmetad request and sends the file in xml format. You can think of it as a client.
Web front-end is a web-based monitoring interface, which is usually installed on the same node as Gmetad (you also need to confirm whether it can not be on the same node, because ms can configure the address and port of gmetad in the configuration file of php). It takes data from Gmetad, reads the rrd database, generates pictures, and displays them.
Figure (1)
As shown above, gmetad periodically goes to the gmond node or gmetad node to get data. A gmetad can set multiple datasource, each datasource can have multiple backups, and a failure can also go to other host to fetch data.
If it is in muticast mode, the gmond will also transmit data to each other through multicast. Gmond itself has udp send and receive channels, as well as a tcp recv channel. The udp channel is used to send or receive data to other gmond nodes, and tcp is used to export xml files, mainly accepting requests from gmetad. Gmetad has only tcp channel. On the one hand, he sends requests to datasource, on the other hand, he uses a tcp port to publish xml files collected by himself. By default, port 8651 is used. So gmetad can get xml data from both gmond and other gmetad.
The internal module diagram of the Gmond node is as follows:
Figure (2)
As shown above, the internal structure of the Gmond node is mainly composed of three modules, the first is the collect and publish module, which periodically calls some internal instructions to obtain metric data, and then publishes the data to other gmond nodes through the udp channel. The second is the Listen Threads module, which listens for udp data sent by other gmond nodes and then stores the data in memory. The third is the XML export thread module, which is mainly responsible for publishing the data in xml format, such as handing it to gmetad.
The composition of the whole Ganglia system includes the following aspects:
1. Gmetad: collect the data of each node and save it to the database
2. Gmond: collect the information of the local machine and send data
3. Rrdtool: Round Robin Database Tool is a powerful drawing engine, and many tools such as MRTG can call rrdtool drawing.
4. Apache: web server
5. Php: execution environment, webfrontend is developed using php
6. 1 monitoring server
7. N monitored machines
(figure 3)
The entire working process of Ganglia is shown above:
1. The management node communicates with the proxy node through the host list address in the gmetad.conf configuration file.
two。 The management node collects machine operation information for each agent node, which is transmitted through the XML protocol.
3. The management node collects the XML protocol of the agent node and parses it into the data format needed by the management node.
4. Then the rrdtool tool is called by the PHP program of the management node to convert the data into graphics.
5. The graphical data can be seen when the user enters the url address of the management node on the browser.
This is the end of the introduction to the overview and working principle of Ganglia. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.