• Get In Touch
January 12, 2017

How to Install and Configure Ganglia Monitor on Ubuntu 16.04

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Ganglia is an open source scalable distributed monitoring software tool for high-performance computing systems that can be used to view live statistics metrics such as average CPU load and network utilization for multiple systems.

Ganglia uses XML for data representation, RRDtool for data storage and visualization and XDR for compact, portable data transport. It uses carefully engineered data structures to achieve very low overheads and high concurrency. Currently Ganglia is used by thousands of clusters around the world.

In this tutorial, we will learn how to install Ganglia server on Ubuntu 16.04.

Requirements

  • A server runing Ubuntu-16.04 on your system.
  • A non-root user with sudo privileges setup on your server.

Update the System

Before starting, you will need to update the system’s package repository database with the latest version. You can do this with the following command:

sudo apt-get update -y
sudo apt-get upgrade -y

Once your system is up to date, you can proceed to the next step.

Installing LAMP Stack

Before starting, you will need to install LAMP on your server.
You can install it by running the following command:

sudo apt-get install apache2 mariadb-server php7.0 libapache2-mod-php7.0 php7.0-mbstring php7.0-curl php7.0-zip php7.0-gd php7.0-mysql php7.0-curl php7.0-mcrypt

Once installation is complete, start the apache service and enable it to start on boot with the following command:

sudo systemctl start apache2
sudo systemctl enable apache2

Installing Ganglia Server

Ganglia consists of three main components Ganglia Monitoring Daemon, Ganglia Meta Daemon and the Ganglia PHP Web Front-end.

  1. Ganglia Monitoring Daemon : It listens to the cluster message channel and stores the data in-memory then and answer requests for an XML description of the cluster state.. Gmond runs on each system you want to monitor and monitor changes in the host state.
  2. Ganglia Meta Daemon : The Ganglia Meta Daemon runs on the master nodes and collects information from multiple client machines.
  3. Ganglia PHP Web Front-end: : It is used to displays all the gathered information from the client machines via web pages.

You can install Ganglia by just running the following command:

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

Once installation is complete, you can proceed to the next step.

Configure Ganglia Master Node

First, you will need to copy the Ganglia configuration file to the Apache conf folder with the following command:

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

Next, edit the gmetad.conf file:

sudo nano /etc/ganglia/gmetad.conf

Change the following line:

data_source "my cluster" 50 192.168.15.110:8649

Where 192.168.15.110 is the master node IP address.

Save and close the file. Then edit gmond.conf file:

sudo nano /etc/ganglia/gmond.conf

Change the file as shown below:

cluster {
  name = "my cluster"  ## Name assigned to the client groups
  owner = "unspecified"
  latlong = "unspecified"
  url = "unspecified"
}

udp_send_channel   {
  host = 192.168.15.110   ## Master node IP address
  port = 8649
  ttl = 1
}

udp_recv_channel {
  port = 8649
}

tcp_accept_channel {
  port = 8649
}

Save and close the file. Then start ganglia-monitor, gmetad and apache services with the following command:

sudo systemctl start ganglia-monitor
sudo systemctl start gmetad
sudo systemctl restart apache2

Once you are done, you can proceed to the next step.

Install and Configure Ganglia Client

Next, you will need to install the Ganglia package on each client you want to monitor.

You can install it by running the following command:

sudo apt-get install ganglia-monitor

Once installation is complete, edit the following configuration file:

sudo nano /etc/ganglia/gmond.conf

CHange the file as shown below:

cluster {
  name = "my cluster"     ## Cluster name
  owner = "unspecified"
  latlong = "unspecified"
  url = "unspecified"

udp_send_channel {
  host = 192.168.15.110   ## IP address of master node
  port = 8649
  ttl = 1
}

#You can specify as many udp_recv_channels as you like as well.
#udp_recv_channel {
#  mcast_join = 239.2.11.71
#  port = 8649
#  bind = 239.2.11.71
#}


tcp_accept_channel {
  port = 8649
}

Save and close the file, then start ganglia-monitor service with the following command:

sudo systemctl start ganglia-monitor

Once you are done, you can proceed to the next step.

Configure Firewall

Before accessing Ganglia, you will need to allow port 8649 through UFW firewall. By default UFW is disabled on your system, so you need to enable it first.

You can enable it with the following command:

sudo ufw enable

Once UFW firewall is enabled, you can allow port 8649 by running the following command:

sudo ufw allow 8649

You can now check the status of UFW firewall by running the following command:

sudo ufw status

Access e thGanglia Web Interface

Once everything is up to date. It’s time to access the Ganglia Web interface.

Open your web browser and type the URL http://192.168.15.110/ganglia. You should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1575350515.png” alt=”” />

If you want to view a perticular node graphs, select the particular node you want from the Grid Choose Node drop-down box.

For example if you want to see the graphs of Ubuntu client node with name Vyom-PC.local.lan, choose this Node from drop-down box. You should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1717957850.png” alt=”” />

You can also access lots of interesting information about each node individually and in groups.

Conclusion

Congratulations! You have successfully installed the Ganglia monitoring server on Ubuntu 16.04. You can now easily install, explore, and play around with Ganglia as per your need.

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]