How to install & Configure Ganglia Monitoring server on Ubunu 20.04

Ganglia is a free & open-source Monitoring tool.It is used for show live statistics and metrics, such as CPU load and network utilization for multiple systems.It supports high-performance computing systems, clusters and networks.

Install Ganglia on ubuntu

Update the system.

apt-get update

Install apache2 web server.

apt-get install apache2

Start & Enable the apache2 service.

systemctl start apache2.service
systemctl enable apache2.service

Install PHP & Modules.

Install Repository.

apt-get install software-properties-common
&
add-apt-repository ppa:ondrej/php

Update the packages.

apt-get update

Install PHP7.2 & modules.

apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-gmp php7.2-curl 
&
apt-get install php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd 
&
apt-get install php7.2-xml php7.2-cli php7.2-zip

Configure the default PHP file for apache2.

vim /etc/php/7.2/apache2/php.ini

Check & Set the following values:

file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
max_input_vars = 1500
date.timezone = America/Chicago

Restart the apache2 service.

systemctl restart apache2.service

Install Ganglia

Update the system.

apt-get update

Download Ganglia.

apt-get install ganglia-monitor rrdtool gmetad ganglia-webfrontend

Select Yes. To automatically restart the apache2 service.

 

Fig 1

Start & Enable the Ganglia Service.

systemctl start ganglia-monitor.service
&
systemctl enable ganglia-monitor.service

Check the status of Ganglia service.

systemctl status ganglia-monitor.service

Here is the command output.

● ganglia-monitor.service
     Loaded: loaded (/etc/init.d/ganglia-monitor; generated)
     Active: active (running) ; 2min 52s ago
       Docs: man:systemd-sysv-generator(8)
      Tasks: 2 (limit: 1160)
     Memory: 1.5M
     CGroup: /system.slice/ganglia-monitor.service
             └─16092 /usr/sbin/gmond --pid-file /var/run/gmond.pid

Configuration of Ganglia Server.Open gmetad.conf file.

vim /etc/ganglia/gmetad.conf

Add the following llines.

data_source "mycluster" 50 localhost server-ip:8649

Open gmond.conf file.

vim /etc/ganglia/gmond.conf

Provide the cluster name.

cluster {
name = "cluster-name"
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"
}

Change the following lines.

udp_send_channel {
/*  mcast_join = 239.2.11.71  */
  port = 8649
  ttl = 1
}


udp_recv_channel {
/*  mcast_join = 239.2.11.71 */
  port = 8649
/*  bind = 239.2.11.71 */
}

Now, Copy the configuration file of Ganglia to apache2 virtual host directory.

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

Restart the Services.

systemctl restart ganglia-monitor 
&
systemctl restart gmetad
&
systemctl restart apache2

Access Ganglia web-interface.

http://server-ip/ganglia

Here is the output.

 

Fig 2

 

Install Ganglia Clients

apt-get install ganglia-monitor

Open the configuration file.

vim /etc/ganglia/gmond.conf

Provide the Ganglia Master server ip address.

udp_send_channel {
 host = ganglia-masterserver-ip-address
  port = 8649
  ttl = 1
}

Start the Service.

systemctl start ganglia-monitor

Now Ganglia Server is ready to monitor client server.

 

Leave a Reply