Network Monitoring

Network Monitoring
–>Need
*Apache : A Web server to display network graphs created by PHP and RRDTool.
*MySQL : A Database server to store cacti information.
*PHP : A script module to create graphs using RRDTool.
*PHP-SNMP : A PHP extension for SNMP to access data.
*NET-SNMP : A SNMP (Simple Network Management Protocol) is used to manage network.
*RRDTool : A database tool to manage and retrieve time series data like CPU load, Network Bandwidth etc.

Install MySQL

Install PHP

Install PHP-SNMP

Install NET-SNMP

Install RRDTool

Staring Apache, MySQL and SNMP Services

Once you’ve installed all the required software’s for Cacti installation, lets start them one-by-one using following commands.

Starting Apache

Starting MySQL

Starting SNMP

Configure Start-up Links

Configuring ApacheMySQL and SNMP Services to start on boot.

Install Cacti on RHEL / CentOS / Fedora

Here, you need to install and enable EPEL Repository. Once you’ve enabled repository, type the following command to install Cacti application.

Sample Output:

Configuring MySQL Server for Cacti Installation

We need to configure MySQL for Cacti, to do this we need to set password for our newly installed MySQL server and then we will create Cacti database with user Cacti. If you’reMySQL is already password protected, then don’t need to set it again.

Set MySQL Password

To set new password for MySQL server, use the following command. (Note : This is for new MySQL installation only).

Create MySQL Cacti Database

Login into MySQL server with newly created password and create Cacti database with userCacti and set the password for it.

Install Cacti Tables to MySQL

Find out the database file path using RPM command, to install cacti tables into newly createdCacti database, use the following command.

Sample Output:

/var/www/cacti/cacti.sql

Now we’ve of the location of Cacti.sql file, type the following command to install tables, here you need to type the Cacti user password.

cacti < /var/www/cacti/cacti.sql

Configure MySQL settings for Cacti

Open the file called /etc/cacti/db.php with any editor.

Make the following changes and save the file. Make sure you set password correctly.

Configuring Apache Server for Cacti Installation

Open file called /etc/httpd/conf.d/cacti.conf with your choice of editor.

You need to enabled access to Cacti application for your local network or per IP level. For example we’ve enabled access to our local LAN network 172.16.16.0/20. In your case, it would be different.

Finally, restart the Apache service.

Setting Cron for Cacti

Open file /etc/cron.d/cacti.

Uncomment the following line. The poller.php script runs every 5mins and collects data of known host which is used by Cacti application to display graphs.

Running Cacti Installer Setup

Finally, Cacti is ready, just go to http://YOUR-IP-HERE/cacti/ & follow the installerinstruction through the following screens. Click Next button.

ID: admin
PASS : admin

참조 : http://www.tecmint.com/install-cacti-network-monitoring-on-rhel-centos-6-3-5-8-and-fedora-17-12/