Cacti is an open source web based network monitoring tool designed as
the front end application for the RRDtool (Round-Robin database tool),
it allows a user to poll the services at a interval of time and
resulting in the graph format.
Cacti is generally used to get a graph data for the cpu and network bandwidth utilization, it monitors the network traffic by polling a router or switch via snmp.
Here is the small tutorial about installing Cacti on CentOS 6 / RHEL 6.
Install the following PHP extension.
Make the services are started at start up.
Start the following services.
Extract downloaded file.
Move the extracted files to document root.
Make the changes accordingly.
Add the cactiuser, this user must be created in such a way that logs and graphs directory can be accessed.
Add the following entry in the crontab to poll every five min.

Scroll down for the options, please select New Install for the new installation and then click Next.

It will show you, if there is any package is missing which is mandatory for the cacti.

Enter User Name and Password (Default admin / admin)

You must change the default password.

The following shows the dashboard of the cacti.

Now you can start configuring the Cacti to monitor your devices.
Cacti is generally used to get a graph data for the cpu and network bandwidth utilization, it monitors the network traffic by polling a router or switch via snmp.
Here is the small tutorial about installing Cacti on CentOS 6 / RHEL 6.
Requirements:
Install the following packages for the Cacti setup.[root@localhost ~]# yum install httpd php php-mysql php-snmp mysql mysql-server net-snmb rrdtool net-snmp-utils
|
[root@localhost ~]# yum install php-xml php-session php-sockets php-ldap php-gd
|
[root@localhost ~]# chkconfig httpd on
[root@localhost ~]# chkconfig mysqld on
[root@localhost ~]# chkconfig snmpd on
|
[root@localhost ~]# service httpd start
[root@localhost ~]# service snmpb start
[root@localhost ~]# service mysqld start
|
Database:
Create a database for Cacti, if you are configuring the MySQL for the first time; take a loot at How to secure the MySQL.
[root@localhost ~]# mysql –u root –p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>
Create Cacti database.Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>
mysql> create database cacti;
Grant permission to the newly created database.
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘cactipassword’;
mysql> flush privileges;
mysql> flush privileges;
Download Cacti:
Download cacti using the following command, latest release can be found here.[root@localhost ~]# wget http://www.cacti.net/downloads/cacti-0.8.8b.tar.gz
|
[root@localhost ~]# tar -zxvf cacti-0.8.8b.tar.gz
|
[root@localhost ~]# mv cacti-0.8.8b /var/www/html/cacti
|
Configure Cacti:
Import the default database to the cacti database.
[root@localhost ~]# mysql cacti < /var/www/html/cacti/cacti.sql -u root -p
Edit the config file to specify the database type, name, hostname, user and password information.[root@localhost ~]# vi /var/www/html/cacti/include/config.php
|
/* make sure these values reflect your actual database/host/user/password */ $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cactiuser"; $database_password = "cactipassword"; $database_port = "3306"; $database_ssl = false; |
[root@localhost ~]# useradd -d /var/www/html/cacti -s /sbin/nologin cactiuser
[root@localhost ~]# cd /var/www/html/cacti/
[root@localhost ~]# chown -R cactiuser rra/ log/
|
*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
Install Cacti:
Visit the following url to start the installation of cacti. http://your-ip-address/cacti. Click on Next to continue.
Cacti Installation Main Page
Cacti Installation Type
Cacti Packages List
Cacti Login Page
Cacti Password Change
Cacti Dashboard
0 comments:
Post a Comment