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

Ganglia installation

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

1. Basic introduction of ganglia

Ganglia is a distributed monitoring system with two Daemon: client-side GangliaMonitoring Daemon (gmond) and server-side GangliaMetaDaemon (gmetad), and GangliaPHPWeb

Frontend (dynamic access based on web) is a software that monitors the performance of the system graphically under Linux. The interface is beautiful and rich, and the function is powerful. Ganglia depends on a web server to display cluster status. Using rrdtool to store data and generate graphs requires xml parsing, so expat is needed, and configuration file parsing requires libconfuse.

Ganglia is a monitoring server, cluster open source software, can use a graph to show the latest hour, the most recent day, the most recent week, the most recent month, the most recent year of the server or cluster cpu load, memory, network, hard disk and other indicators.

The strength of Ganglia lies in that the ganglia server can collect all the client data of the same network segment through one client, and the ganglia cluster server can collect all its subordinate client data through one server. This architecture design means that a single server can manage tens of thousands of machines through different layers. This function is unmatched by other mrtg,nagios,cacti.

Second, preparation of the environment

Server: system Centos6.5 64 bit

Operating environment: installation and enablement of Apache Web Server PHP 5.2 and later PHP JSON extensions

Gmetad service, gmond service (client service for monitoring server service installation)

Client: system Centos6.5 64-bit

Install only the gmond service

1. Install php support

Yum install php-common php-cliphp-gb php

two。 Install ganglia and its related components

Server side: yum install httpd rrdtool rrdtool-devel ganglia-gmetad ganglia-gmondganglia-gmond-python httpd apr-devel zlib-devel libconfuse-devel expat-develpcre-devel

Download the latest version of gweb (https://sourceforge.net/projects/ganglia/files/gweb/) the latest version of this example is 3.7.2 command: wget http://ncu.dl.sourceforge.net/project/ganglia/ganglia-web/3.7.2/ganglia-web-3.7.2.tar.gz download decompress: tar-zxvf ganglia-web-3.7.2.tar.gz need to modify the Makfile file: cd ganglia-web- 3.7.2vim Makefile modifies the default configuration: GDESTDIR = / var/www/html/ganglia2 APACHE_USER = apache

Client side: yum install ganglia-gmond

3. Check status and start related services

Check if httpd is started: service httpd status

Start httpd:service httpd start

Check if gmetad is started: service gmetad status

Start gmetad:service gmetad start

Check whether the local gmond is started: service gmond status

Start gmond:service gmond start

4. Close selinux

If you skip this step, the following exception occurs when you open http:///ganglia2: There was an error collecting ganglia data (127.0.0.1 There was an error collecting ganglia data 8652): fsockopen error: what is Permission deniedSELinux http://wiki.centos.org/zh/HowTos/SELinux View SELinux status: sestatus

Turn off SELinux: command: setenforce 0setenforce this command can immediately switch between Enforcing and Permissive modes, but these changes will not be retained when the system is rebooted. To take effect after the next boot, you need to modify the behavior enforcing of SELINUX= in / etc/selinux/config.

5. Related configuration

Configuration on the client:

Modify / etc/ganglia/gmond.conf

Cluster {

Name = "cluster01"

Owner = "unspecified"

Latlong = "unspecified"

Url = "unspecified"

}

Udp_send_channel {

# bind_hostname = yes # Highly recommended, soon to be default.

# This option tellsgmond to use a source address

# that resolves to themachine's hostname. Without

# this, the metrics mayappear to come from any

# interface andthe DNS names associated with

# those IPs will be usedto create the RRDs.

Mcast_join = 239.2.11.71

Port = 8649

Ttl = 1

}

/ * You can specify as manyudp_recv_channels as you like as well. , /

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

}

Configuration on the server:

Modify the file / etc/ganglia/gmetad.conf

Data_source "cluster01" localhost / / cluster01 is the name of name in cluster in gmond.conf, and localhost needs to be server-side ip.

Gridname "MyGrid"

6. Access the service

The http:///ganglia2/ directory "/ ganglia2" can be modified by GDESTDIR in the Makefile file of ganglia-web, which needs to be recompiled.

Reference: http://www.cnblogs.com/chaoren399/p/6228936.html

Reference: http://www.centoscn.com/p_w_picpath-text/install/2014/0523/3002.html

Reference: http://blog.csdn.net/avilifans/article/details/22685425

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

Servers

Wechat

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

12
Report