Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and use Ganglia under Linux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to install and use Ganglia under Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Ganglia is a distributed monitoring system under cross-platform scalable, high-performance computing systems, such as clusters and grids. It is based on hierarchical design, it uses a wide range of technologies, such as XML data representation, portable data transfer, and RRDtool for data storage and visualization.

Install and configure Ganglia

Follow these steps to install monitoring tools on the primary node server.

1. Enable the EPEL repository, then install Ganglia and related tools: # yum update & & yum install epel-release# yum install ganglia rrdtool ganglia-gmetad ganglia-gmond ganglia-web

In this step above, along with Ganglia, you will install some applications with the following functions:

Rrdtool,Round-Robin database, which is a tool for storing and graphically displaying data that changes over time; ganglia-gmetad is a daemon that collects data from monitored hosts. Both the monitored host and the master node host need to install Ganglia-gmond (monitoring daemon itself); ganglia-web provides a Web front end to display the historical data and graphics of the monitoring system. two。 Configure authentication for the Ganglia Web interface (/ usr/share/ganglia) using the basic authentication features provided by Apache.

If you want to learn more about advanced security mechanisms, please refer to the authorization and authentication section of the Apache documentation.

To accomplish this, we need to create a user name and set a password to access resources protected by Apache. In this case, we first create a user name called adminganglia, then assign it a password, which will be stored in / etc/httpd/auth.basic (you can choose another directory and / or file name at will, as long as Apache has read access to it. )

# htpasswd-c / etc/httpd/auth.basic adminganglia

Enter the password to adminganglia twice to complete the password setting.

3. Modify the configuration file / etc/httpd/conf.d/ganglia.conf:Alias / ganglia / usr/share/gangliaAuthType basicAuthName "Ganglia web UI" AuthBasicProvider fileAuthUserFile "/ etc/httpd/auth.basic" Require user adminganglia4. Edit / etc/ganglia/gmetad.conf:

First, use the gridname directive to set a descriptive name for the grid.

Gridname "Home office"

Then, use the data_source directive, followed by the cluster name (server group), the polling interval (seconds), and the IP address of the host of the primary node and the monitored node:

Data_source "Labs" 60 192.168.0.29 Labs 8649 # master node data_source "Labs" 60 192.168.0.32 # monitored node 5. Edit / etc/ganglia/gmond.conf.

A) make sure the configuration of the cluster is similar to the following.

The name of the data_source instruction in cluster {name = "Labs" # gmetad.conf owner = "unspecified" latlong = "unspecified" url = "unspecified"}

B) in udp_send_chanel, comment out mcast_join:

Udp_send_channel {# mcast_join = 239.2.11.71host = localhostport = 8649ttl = 1}

C) in udp_recv_channel, comment out the mcast_join and bind sections:

Udp_recv_channel {# mcast_join = 239.2.11.71 # # comment outport = 864 bind = 239.2.11.71 # # comment out}

Save and exit.

6. Open the 8649/udp port and use SELinux to ensure that the php script (run through Apache) can connect to the network: # firewall-cmd-- add-port=8649/udp# firewall-cmd-- add-port=8649/udp-- permanent# setsebool-P httpd_can_network_connect 17. Restart Apache, gmetad, gmond and make sure they have Boot enabled. # systemctl restart httpd gmetad gmond# systemctl enable httpd gmetad httpd

At this point, we can now open the Web page of Ganglia, http://192.168.0.29/ganglia, and log in with the credentials set in step 2.

8. On the Ubuntu host, you only need to install Ganglia-monitor, which is equivalent to ganglia-gmond:$ sudo aptitude update & & aptitude install ganglia-monitor9 on CentOS. Edit the / etc/ganglia/gmond.conf file of the monitored host. It is the same file as on the host of the primary node Except for the commented-out cluster, udp_send_channeludp_recv_channel should not be commented here: cluster {name = "Labs" # The name in the data_source directive in gmetad.confowner = "unspecified" latlong = "unspecified" url = "unspecified"} udp_send_channel {mcast_join = 239.2.11.71host = localhostport = 8649ttl = 1} udp_recv_channel {mcast_join = 239.2.11.71 # comment outport = 8649bind = 239.2.11.71 # comment out}

Then restart the service.

$sudo service ganglia-monitor restart10. Refresh the page, and you will see various statistics and graphical display of the two hosts in Home office grid / Labs cluster (use the drop-down menu to select the cluster, in this case, Labs):

Using the menu button (as noted above), you can get information about each server and cluster. You can also use the compare hosts Compare Hosts tab to compare the status of all servers in the cluster.

You can use regular expressions to select a set of servers, and you can immediately see a comparison of their performance:

One of my favorite features is a friendly summary interface for mobile, which can be accessed through the Mobile option. Select the cluster you are interested in, and then select a host.

Thank you for reading! This is the end of the article on "how to install and use Ganglia under Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report