How to monitor linux server with Cacti

Would you like to learn how to do a Cacti Linux monitoring installation on Ubuntu Linux? In this tutorial, we are going to show you how to install snmp and configure Cacti to monitor a computer running Ubuntu Linux using Cacti and Spine.

• Ubuntu version: 20.04

What is Cacti?

Cacti is an open-source platform for data monitoring that is completely PHP driven.

On the Web interface, users are able to use Cacti as a frontend to RRDtool, create Graphs and populate them with data stored in MySQL.

Cacti also has SNMP support for users to create graphs in order to perform network monitor.

Tutorial – Cacti SNMP Configuration on Linux

First, we are going to install and configure the SNMP service on a computer running Ubuntu Linux.

On the Linux console, use the following commands install the required packages.

$ apt-get update
$ apt-get install snmpd snmp

Delete the snmpd.conf file content and edit the snmpd.conf file.

$ echo > /etc/snmp/snmpd.conf
$ nano /etc/snmp/snmpd.conf

Here is the content of the snmpd.conf file.

rocommunity Greencloud
syslocation planet Salad
sysContact Server <[email protected]>;

In our example, we used the SNMP community name Greencloud.

In our example, we used the SNMP location planet Salad.

In our example, we used the SNMP Contact Server.

You need to change our configuration to reflect your environment.

Restart the SNMP service.

$ service snmpd restart

Use the following command to test the SNMP communication.

$ snmpwalk -v2c -c Greencloud

You have successfully installed the SNMP service on Ubuntu Linux.

You are now able to use a network monitoring tools like Cacti to get remote information from this computer.

Tutorial – Cacti Monitor Linux using SNMP

Now, we need to access the Cacti server dashboard and add the Linux computer as a Host.

Open your browser and enter the IP address of your web server plus /cacti.

In our example, the following URL was entered in the Browser:

http://your server ip/cacti

On the login screen, use the default username and default password.

• Default Username: admin
• Default Password: admin

You can refer to how to install Cacti here: How to install and Configure Cacti on Ubuntu 20.04

After a successful login, you will be sent to the Cacti Dashboard.

On the Cacti dashboard screen, access the Configuration menu and select the Devices option.

Click on the plus sign on the top right part of the screen to add a new device.

Perform the following configuration and click on the Create button.

• Description – Enter a description
• Hostname – Enter the IP address of your server
• Device Template – Net-SNMP Device
• SNMP Version – 2
• Downed Device Detection – SNMP Uptime

Select the template that meets your network monitoring needs

Select the desired disks.

Select the desired disk partitions.

Select the desired network interfaces.

Important! On the bottom right part of the screen, select the option named: In/Out Bits (64-bit)

Click on the Create button located on the bottom-right part of the screen.

Go to the Management menu and select the Devices options.

Wait 5 minutes and check if your Linux server device was added to the list.

Configure Cacti Graph Tree

Go to the Management menu and select the Trees options.

Click on the plus sign on the top right part of the screen to add a new tree.

Add a description and click on the Create buton.

On the Tree properties screen, click on the Edit tree properties button.

Enable the Publish option.

Drag the desired device or specific graph to the left part of the screen.

Click on the Save button.

Click on the finish editing the tree button.

The Cacti tree configuration was finished.

Cacti Monitoring Linux Server

Select the Graphs tab on the top left part of the screen.

Locate the desired Cacti tree where the Linux server was included.

Click on device name that you configured to the Linux server.

You are now able to use Cacti as monitor solution to monitor Linux servers using SNMP.

                               Good Luck!

On this page