For those who don’t know about Ganglia, is open-source software that provides monitoring and analytics across network systems and runs on all major operating systems, including Ubuntu. It uses XML for data representation, XDR for compact, portable data transport, and RRDtool for data storage and visualization and can scale to handle clusters with 2000 nodes. Ganglia is a complete enterprise-grade server and log monitoring system which brings together data from diverse systems and databases into a single platform. For more about Ganglia, please visit its homepage.

Install Apache2 HTTP Server

Apache2 HTTP Server is the most popular web server in use. so install it since Ganglia needs it. To install Apache2 HTTP on the Ubuntu server, run the commands below. After installing Apache2, the commands below can be used to stop, start and enable the Apache2 service to always start up with the server boots. To verify whether the Apache2 HTTP server is installed and operating, open your browser and browse to the server’s hostname or IP address. If you see a page similar to the one below, then Apache2 is working as expected.

Some versions of Ubuntu won’t have PHP 7.2 available in their default repositories. To install it, you will have to get it from third-party repositories. Run the commands below to add the below third-party repository to upgrade to PHP 7.2 if Ubuntu doesn’t already have it available. Then update and upgrade to PHP 7.2 Next, run the commands below to install PHP 7.2 and related modules. After installing PHP 7.2, run the commands below to open the PHP default config file for Apache2. Then make the changes on the following lines below in the file and save. The value below is a great setting to apply in your environment. After making the change above, save the file and close it. When you’re done making changes, all you have to do is restart Apache2 to reload PHP configurations. To restart Apache2, run the commands below To verify whether PHP 7.2 is installed and find default settings configured with Apache2, create a phpinfo.php file in the Apache2 root directory by running the commands below Then type the content below and save the file. Save the file. then browse to your server hostname followed by /phpinfo.php You should see the PHP default test page.

Install Ganglia Package

Now that Apache2 and PHP are installed, simply run the commands below to install Ganglia sudo apt update sudo apt install ganglia-monitor rrdtool gmetad ganglia-webfrontend Once installed, the commands below can be used to stop, start and enable Ganglia to automatically startup when the server boots up.

Configure Ganglia Service

Ganglia default configuration files are located under the/etc/ganglia directory. Its main configuration file is /etc/ganglia/gmetad.conf and has a basic setup configured in it. You’ll need to make some changes to suit your environment. To validate if Ganglia is installed, run the commands below: You should see Ganglia system status details as shown below: First, you will need to edit gmetad.conf file and define your master node. You can do this with the following command: Make the following highlighted changes to define the server IP address to serve as the master node. After making your changes, save your changes and exit. Next, open /etc/ganglia/gmond.conf and make the highlighted changes to reference the master node. Make the changes below, then save the file. Finally, copy Ganglia’s configuration file to Apache virtual host directory. This can be done by running the commands below: Next, restart ganglia monitor, gmetad, and apache services using the commands below:

Access Ganglia Web Portal

Now that the Ganglia server is installed and access is allowed from the local machine, use the address below to access the Ganglia portal. You should Ganglia’s home page as shown below:

Install Ganglia Clients

Now that the Ganglia server is installed and running, go and install its client software on your desktops and other servers that should be reporting. On Ubuntu and other Debian systems, simply run the commands below to install Ganglia’s client monitor package. After installing the Ganglia client, edit its gmond.conf file to define the master node. Make the following changes: Save and exit, then start the ganglia-monitor service using the following command: In no time, client machines should be reporting to the master node. Congratulations! You have learned how to install the Ganglia monitoring platform on Ubuntu 16.04 | 18.04 LTS servers. You may also like the post below: