Cacti is a network monitoring software that uses the RRDtool which implies the data logging using the graphical method for the system using various shells. It provides advanced graphs with a data monitoring using the user management analysis and provides all features using the Graphical user Interfaces.

How to Configure Cacti with Percona Template on EL 7

Step-1: Install the Pre-requested packages
  1. Cacti
  2. Apache / Httpd
  3. net-snmp
  4. MySQL / MariaDB
  5. php-snmp
# yum install cacti mariadb-server mariadb httpd php-snmp net-snmp
Step-2: Create Database for Cacti and Configure as below

Configuration Path : /var/www/cacti/include/config.php

# vim /var/www/cacti/include/config.php
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "techbrown";
$database_username = "cacti";
$database_password = "cacti";
$database_port = "3306";
$database_ssl = false;
Step-3: The Cacti SQL file

You will find cacti.sql file in /var/www/cacti/cacti.sql, you need to restore it.

# mysql
mysql> use cactidb
mysql> source /var/www/cacti/cacti.sql
Step-4: Check with Apache Configuration.

Configuration Path : /etc/httpd/conf.d/cacti.conf

# vim /etc/httpd/conf.d/cacti.conf
Alias /cacti/ /var/www/cacti/
<Directory /var/www/cacti/>
DirectoryIndex index.php
Options -Indexes
AllowOverride all
order deny,allow
deny from all
allow from
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc on
php_flag track_vars on
Step-5: View the Cacti Portal

Add your IP to view Cacti Portal using URL: http://IPADDRESS/cacti
It will prompt you for username and password
By default it would be Username: admin and Password: admin

Step-6: Once get login follow the given steps

Go to setting and find the path of command which should match with your system path as below.
snmpwalk Binary Path: /usr/bin/snmpwalk
snmpget Binary Path : /usr/bin/snmpget
snmpbulkwalk Binary Path: /usr/bin/snmpbulkwalk
snmpgetnext Binary Path: /usr/bin/snmpgetnext
RRDTool Binary Path: /usr/bin/rrdtool
PHP Binary Path: /usr/bin/php
Cacti Log File Path: /var/www/cacti/log/cacti.log

Step-7: Before Creating host please import Percona Templates

Percona Templates are available on web.

Step-8: Install script from percona downloaded plugins

Default Path : percona-monitoring-plugins-1.0.0/cacti/scripts
Copy these script into /var/www/cacti/scripts in Linux.

Step-9: Now Login into Cacti Portal and select import template option

Browse your templates from Percona Directory path : percona-monitoring-plugins-1.0.0/cacti/templates

Step-10: Before adding device please check if your device is behind firewall then allow port 161 with UDP protocol.
# firewall-config
Step-11: Try to add Host with monitoring templates.

Click on Devices from Management tab –> Add from left—> Add Description and Host-name —-> Select Templates —> Click on Create.

Step-12: Once done please check with SNMP information for any error

It should be as follows:

SNMP Information
Uptime: 309909770
Hostname: www.techbrown.com
Location: Unknown
Contact: techbrown@hotmail.com
Step-13: Wait for some time it will it will show the device will be UP and started generating Graphs.

For adding MySQL Template you need to create MySQL User without any permission on destination host server.

That’s all for now.

How to Fix Dim Screen and Dull Display on Windows 10

Previous article

How to Configure New Relic Server Monitoring on CentOS / RHEL

Next article

You may also like


Leave a reply

Your email address will not be published. Required fields are marked *

More in Linux