RedHat / CentOS Install and Configure Cacti Network Graphing Tool

by on April 20, 2009 · 92 comments· LAST UPDATED December 21, 2013

in , ,

Cacti is a network graphing tool similar to MRTG. How do I install and configure common options to collect SNMP data and various other data (such as system load, network link status, hard disk space, logged in users etc) into an RRD?

From the official project site:

Tutorial details
DifficultyEasy (rss)
Root privilegesYes
RequirementsNone
Estimated completion time20m

Cacti is a complete frontend to RRDTool, it stores all of the necessary information to create graphs and populate them with data in a MySQL database. The frontend is completely PHP driven. Along with being able to maintain Graphs, Data Sources, and Round Robin Archives in a database, cacti handles the data gathering. There is also SNMP support for those used to creating traffic graphs with MRTG.

Required software(s)

You need to install the following software on RHEL / Fedora / CentOS Linux:

  1. MySQL Server : Store cacti data.
  2. NET-SNMP server - SNMP (Simple Network Management Protocol) is a protocol used for network management.
  3. PHP with net-snmp module - Access SNMP data using PHP.
  4. Apache / lighttpd / ngnix webserver : Web server to display graphs created with PHP and RRDTOOL.

Install the Cacti software on CentOS / RHEL

First, login as root user and type the following command to install mysql, apache and php:
# yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd

Configure MySQL server

First, set root password:
# mysqladmin -u root password NEWPASSWORD

Create cacti MySQL database

Create a database called cacti, enter:
# mysql -u root -p -e 'create database cacti'
Create a user called cacti with a password called zYn95ph43zYtq, enter:
# mysql -u root -p

mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'zYn95ph43zYtq';
mysql> FLUSH privileges;
mysql> \q

Install snmpd

Type the following command to install net-snmpd
# yum install net-snmp-utils php-snmp net-snmp-libs
Configure snmpd, open /etc/snmp/snmpd.conf
# vi /etc/snmp/snmpd.conf
Append / modify it as follows (see snmpd.conf man page for details):

com2sec local     localhost           public
group MyRWGroup v1         local
group MyRWGroup v2c        local
group MyRWGroup usm        local
view all    included  .1                               80
access MyRWGroup ""      any       noauth    exact  all    all    none
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root  (configure /etc/snmp/snmp.local.conf)
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

Save and close the file. Turn on snmpd service:
# /etc/init.d/snmpd start
# chkconfig snmpd on

Make sure you are getting information from snmpd:
# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
Sample ouptut:

IP-MIB::ipAdEntIfIndex.10.10.29.68 = INTEGER: 2
IP-MIB::ipAdEntIfIndex.67.yy.zz.eee = INTEGER: 3
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1

Install cacti

First, make sure EPEL repo is enabled. Type the following command to install cacti:
# yum install cacti

Install cacti tables

Type the following command to find out cacti.sql path:
# rpm -ql cacti | grep cacti.sql
Sample output:

/usr/share/doc/cacti-0.8.7d/cacti.sql

Type the following command to install cacti tables (you need to type the cacti user password):
# mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.7d/cacti.sql

Configure cacti

Open /etc/cacti/db.php file, enter:
# vi /etc/cacti/db.php
Make changes as follows:

 
/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "zYn95ph43zYtq";
$database_port = "3306";
 

Save and close the file.

Configure httpd

Open /etc/httpd/conf.d/cacti.conf file, enter:
# vi /etc/httpd/conf.d/cacti.conf
You need to update allow from line. Either set to ALL or your LAN subnet to allow access to cacti:

 
#
# Cacti: An rrd based graphing tool
#
Alias /cacti    /usr/share/cacti
 
<Directory /usr/share/cacti/>
        Order Deny,Allow
        Deny from all
        Allow from 10.0.0.0/8
</Directory>
 

Another option is create /usr/share/cacti/.htaccess file and password protect the directory. Finally, restart httpd:
# service httpd restart

Setup cacti cronjob

Open /etc/cron.d/cacti file, enter:
# vi /etc/cron.d/cacti
Uncomment the line:

*/5 * * * *     cacti   /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

Save and close the file.

Run cacti installer

Now cacti is ready to install. Fire a webbrowser and type the url:
http://your.example.com/cacti/
OR
http://your.server.ip.address/cacti/
Just follow on screen instructions. The default username and password for cacti is admin / admin. Upon first login, you will be force to change the default password.

How do I configure SNMP data collection?

SNMP can be used to monitor server traffic. Once installed login to cacti.
=> Click on Devices

=> Select Localhost

=> Make sure SNMP options are selected as follows:

Fig.01: SNMP configuration

Fig.01: SNMP configuration

Finally, click on Save button.

How do I create SNMP graphs?

Click on "Create Graphs for this Host" link on top right side.

Select SNMP - Interface Statistics

Select a graph type (such as In/Out bytes with total bandwidth)

Finally, click on Create button.

How do I view graphs?

To view graphs click on Graphs tab. Here is sample graph from one my own box:

Fig.02: Cacti in Action - Memory, CPU and Network Usage

Fig.02: Cacti in Action - Memory, CPU and Network Usage


(Fig.02: Cacti in action)

Fig.03: Cacti in Action Disk, Load average and User stats

Fig.03: Cacti in Action Disk, Load average and User stats

Further readings:

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 92 comments… read them below or add one }

1 Jason April 22, 2009 at 1:30 am

Good post. Thanks for your great site.

You can find many more templates and help at the cacti forums.

Reply

2 kelly February 20, 2011 at 5:58 pm

Good post is there one on how to install plugins after cacti is up and going ?

Reply

3 Rudi June 3, 2009 at 9:43 am

The latest version of cacti (cacti-0.8.7d) requires that you edit include/config.php with the MySql details.

Reply

4 amarnadhreddy June 4, 2009 at 12:23 pm

Thanks for details giving for “cacti” installation

Reply

5 Tait June 26, 2009 at 5:26 pm

Great details for doing this, definitely saved me some headaches with the snmp stuff.

Reply

6 nandanm1 July 16, 2009 at 2:10 pm

First I had difficulties installing cacti on CentOS 5.3 as “yum install cacti” did not work. I resolved this by installing and enabling rpmforge-release packages.

Now I am not able to locate “db.php” file. Help!

Reply

7 Jason July 16, 2009 at 6:30 pm

Have you used locate to find it?

I don’t see db.php on my centos system. Maybe you’re missing something.

Reply

8 sarmed October 12, 2011 at 4:46 am

the db.php file mentioned here is /var/www/cacti/include/config.php in some versions. hope it helps.

Reply

9 Rudi July 16, 2009 at 6:57 pm

lol, as per my previous comment you need to edit include/config.php.

Reply

10 nandanm1 July 17, 2009 at 4:08 pm

Thanks Guys! I had missed out on this: “First, make sure EPEL repo is enabled. Type the following command to install cacti”

It worked fine after disable the rpmforge-release packages and reinstalled cacti by enabling EPEL repo.

I got this information here: http://www.linuxquestions.org/questions/red-hat-31/yum-install-cacti-does-not-work-on-centos-5.3-any-suggestions-740509/

Reply

11 ruben August 10, 2009 at 3:49 pm

hi ive already installed cacti on my centos distro 5.xx – problem is i cant find the db.php on the cacti directories, what could be the problem with this..anyone have idea…?

Reply

12 nixCraft August 10, 2009 at 3:54 pm

@ruben,

Did you enabled EPEL repo and installed cacti?

Reply

13 Eric August 22, 2009 at 11:09 am

Vivek, thanks for your tips however, the graph values always say “NAN”, is there any thing should i check ? I ran MRTG and nagios on the same machine where the cacti was installed.

I tried re-installing cacti on a fresh rhel 5.3 machine but still “NAN” as show on the graph value.

Thanks for this tips once again.

– Eric

Reply

14 sarmed October 12, 2011 at 4:57 am

I have the same problem. well you able to solve it?

Reply

15 sarmed October 12, 2011 at 4:57 am

running on CentOS 5.5

Reply

16 Harry August 25, 2009 at 9:51 pm

Hi, when I go to change it to SNMP, it says “SNMP error” in red when I go back to the device to add graphs, etc. What did I do wrong? snmpd is running, etc. Thanks for the help.

Reply

17 Russell February 16, 2014 at 12:21 am

Did you ever figure this out?? I’m having the same issue.

Reply

18 very August 25, 2009 at 10:38 pm

I fixed the connect error, but when I try to use the OID to log network info, I get

snmpget -v 1 -c “public” localhost .1.3.6.1.4.1.4413.4.1
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.4413.4.1

Also, in Cacti, it does not let me chose “SNMP – Interface Stats”, it only gives me an option for “SNMP – Generic OID Template”. Help please :)

(sorry if I sent this multiple times, it was not working :/)

Reply

19 saulw November 20, 2010 at 1:23 am

hi

i have the same problem, please if you fixed it please tell me!

ill be very thankful

Reply

20 very August 25, 2009 at 10:39 pm

I fixed the connect error, but when I try to use the OID to log network info, I get
http://pastebin.com/f15dbdb45

Also, in Cacti, it does not let me chose “SNMP – Interface Stats”, it only gives me an option for “SNMP – Generic OID Template”. Help please :)

(sorry if I sent this multiple times, it was not working :/ Also, pastebinned what happened as the site keeps not posting my comment?)

Reply

21 Harry August 25, 2009 at 10:51 pm

Sorry for flooding, I have no idea how to edit posts. I am using Ubuntu as my server, if it matters :/ I could not find any Ubuntu install guide for cacti.

Reply

22 Rajan August 27, 2009 at 6:34 am

Was a very helpful guide to install cacti.
I couldn’t find /etc/cacti/db.php as well – but, I have entered similar information in config.php file in the INSTALL directory. Seems to work. Am able to open the Web interface.

Reply

23 Matosh August 28, 2009 at 10:00 pm

Hi,

I’m stuck at step:

“service httpd restart”

I got a error:

[root@DW init.d]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 161 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_ldap.so into server: /etc/httpd/modules/mod_ldap.so: undefined symbol: apr_ldap_ssl_init
[FAILED]
[root@DW init.d]#

Reply

24 Matosh August 28, 2009 at 10:23 pm

I forgot to mention, on that server I have Oracle DB 10g running also.

[root@DW /]# find ./ -name httpd.conf
./usr/local/apache2/conf/httpd.conf
./usr/local/apache2/conf/original/httpd.conf
./root/app/httpd-2.2.9/docs/conf/httpd.conf
./root/app/backup/httpd/conf/httpd.conf
./etc/httpd/conf/httpd.conf
[root@DW /]#

As you can see I have few “htttpd.conf” file

Reply

25 OJ September 18, 2009 at 9:52 am

Good post, do you have a follow up on how to configure remote machines for CACTI?

Reply

26 Thanh_Vietnam November 5, 2009 at 7:40 am

Hi all!
How to config to monitor many server linux with cacti?

Reply

27 Tom November 7, 2009 at 3:21 am

Running: RedHat Enterp 6.0, 2.6.29.4-1.el6.i686.PAE
I have problem with installing Cacti, related to php-snmp/net-snmp-utils/xorg-X11

How I can solve this with redhat 6.0?

cacti-0.8.7e-1.el5.rf.noarch from rpmforge has depsolving problems
–> Missing Dependency: net-snmp-utils is needed by package cacti-0.8.7e-1.el5.rf.noarch (rpmforge)
cacti-0.8.7e-1.el5.rf.noarch from rpmforge has depsolving problems
–> Missing Dependency: php-snmp is needed by package cacti-0.8.7e-1.el5.rf.noarch (rpmforge)
rrdtool-1.3.8-2.el5.rf.i386 from rpmforge has depsolving problems
–> Missing Dependency: xorg-x11-fonts-Type1 is needed by package rrdtool-1.3.8-2.el5.rf.i386 (rpmforge)
Error: Missing Dependency: xorg-x11-fonts-Type1 is needed by package rrdtool-1.3.8-2.el5.rf.i386 (rpmforge)
Error: Missing Dependency: net-snmp-utils is needed by package cacti-0.8.7e-1.el5.rf.noarch (rpmforge)
Error: Missing Dependency: php-snmp is needed by package cacti-0.8.7e-1.el5.rf.noarch (rpmforge)

Reply

28 ldg November 23, 2009 at 5:58 am

Note if you are using PHP 5.3, to generate the graphs you will need to edit some of the files or turn off all errors to suppress warnings about deprecated functions.

Reply

29 jose December 18, 2009 at 12:49 pm

I already have a cacti installed on a debian enviroment working fine.

Now with Centos 5.3 under Apache 2.x with dependencies ok (cacti installed via rpmforge) cacti works BUT don’t generates any RRD graph ? What’s going on ?

I’ve algo installed the sources of cacti into a new vhost by myself with the same results, there are some problems related to safe mode = on. But they’re solved or it seems to be solved since a don’t see any erros at this point:

[root@ www]# php /var/www/cacti/cmd.php
12/18/2009 01:23:27 PM – CMDPHP: Poller[0] Host[1] DS[3] CMD: perl /var/www/cacti/scripts/linux_memory.pl MemFree:, output: 24404
12/18/2009 01:23:27 PM – CMDPHP: Poller[0] Host[1] DS[4] CMD: perl /var/www/cacti/scripts/linux_memory.pl SwapFree:, output: 1995568
12/18/2009 01:23:27 PM – CMDPHP: Poller[0] Host[1] DS[5] CMD: perl /var/www/cacti/scripts/loadavg_multi.pl, output: 1min:0.22 5min:0.24 10min:0.19
12/18/2009 01:23:27 PM – CMDPHP: Poller[0] Host[1] DS[6] CMD: perl /var/www/cacti/scripts/unix_users.pl , output: 1
12/18/2009 01:23:27 PM – CMDPHP: Poller[0] Host[1] DS[7] CMD: perl /var/www/cacti/scripts/unix_processes.pl, output: 148
12/18/2009 01:23:27 PM – CMDPHP: Poller[0] Time: 0.0422 s, Theads: N/A, Hosts: 1

[root@www]# php /var/www/cacti/poller.php
12/18/2009 01:19:13 PM – POLLER: Poller[0] NOTE: Poller Int: ‘300’, Cron Int: ‘300’, Time Since Last: ‘252’, Max Runtime ‘298’, Poller Runs: ‘1’
12/18/2009 01:19:13 PM – SYSTEM STATS: Time:0.4268 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:0

SELinux is disabled.
PHP 5.1.6 (cli) (built: Apr 7 2009 08:00:04)

Still unable to get rrd data created and view default localhost graphs.

Any ideas ? Thanks in advance.

Reply

30 jose December 18, 2009 at 12:50 pm

I forget, cacti version is Version 0.8.7e

Reply

31 beto January 21, 2010 at 3:14 pm

thanx for the tutorial!

if someone had the same problema as i:
after the installation, i had to manually copy the files of cacti to the default folder of apache using the command:
# mkdir /var/www/html/cacti
# cp /usr/share/cacti/*.* /var/www/html/cacti/

(SO CentOS 5.4)

Reply

32 bharat January 22, 2010 at 5:30 am

Hey after installing cacti using yum in my cent OS server…..I get a blank page when I try accessing http://myserver.com/cacti
All packages and configurations are done as per your post….. please help……..!!!!

Reply

33 sarmed October 12, 2011 at 4:53 am

Try editing the file /etc/httpd/conf.d/cacti.conf.

Edit the line “allow from”

Hope it helps.

Reply

34 anonymous February 18, 2010 at 3:26 pm

I am getting not getting any information from snmpd after I type this command on fedora.
snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex

Could someone help? and also can

Reply

35 anonymous February 20, 2010 at 8:18 am

I found the solution for this.
Adding this line on the top of rocommunity public in the snmpd.conf file will resolve the problem.

Reply

36 Hullu February 26, 2010 at 7:04 pm

Hi anon!

Adding what line? I have same problem.. CentOS 5.3! Thanks..

Reply

37 anonymous March 2, 2010 at 3:09 pm

Add this “rocommunity public” without quotes in snmpd.conf. This is just a quick and dirty way but its best if you read through http://net-snmp.sourceforge.net/tutorial/tutorial-4/demon/snmpd.html.

Reply

38 ZeRoY April 2, 2010 at 10:52 am

Cheers man, great Post! Helped me a lot :D

Reply

39 apmellott April 8, 2010 at 8:01 pm

thanx for the tutorial!

if someone had the same problema as i:
after the installation, i had to manually copy the files of cacti to the default folder of apache using the command:
# mkdir /var/www/html/cacti
# cp /usr/share/cacti/*.* /var/www/html/cacti/

(SO CentOS 5.4)

You can use the “mv” command (without quotes to rename/move a folder).
# mkdir /var/www/html/cacti
# mv /usr/share/cacti /var/www/html/cacti
(there is a space between the two folder locations)

I installed this with a little help from http://www.linux.com/community/blogs/installing-cacti-on-centos-5.html. Other than that, it ran like a champ. I’ve been using it for a few days now and it’s great to be able to monitor my network traffic — I even caught someone streaming today with the data collected.

Honestly, there are a lot of posts here from folks who aren’t quite to the point where they should be installing tools like Cacti. I’ve used various Distros over the past few years and still feel like I’m a novice when it comes to Linux management. This site is a great source but also know your personal limitations.

Keep up the good work!

CentOS 5.4 Final
Apache Version 2.2.3
PHP Version 5.1.6
Cacti Version 0.8.7-e
Linux 2.6.18-164.15.1.el5 #1 SMP Wed Mar 17 11:37:14 EDT 2010 i686 i686 i386 GNU/Linux
Running on a “toaster”

Reply

40 David April 27, 2010 at 7:47 pm

I have set up cacti numerous times for various organizations, but not enough to have all the steps of it down.

This was definitely the most helpful walkthrough I have found thusfar.

Thank you.

Reply

41 Thanh April 29, 2010 at 4:08 am

How to config and setup cacti to get CPU information. I setup a cacti server, can monitor Ram, DIsk, traffice… but can not monitor CPU infor.
Please help me!
Thanks!

Reply

42 Taro May 28, 2010 at 7:03 am

This tutorial helped me a lot. thanks!

I followed this tutorial and now I can access the web interface.
but i have a “SNMP Information SNMP error” on a device page.
I can snmpwalk to the device in CLI.

Any idea what could be a cause for this issue?

Thanks

Reply

43 randil Wijerathne May 31, 2010 at 6:19 am

Realy Good one.
Thx

Reply

44 Bill July 13, 2010 at 4:57 pm

Nice post. Once I figured out it’s easier if you choose the MySQL, PHP, et al. during the initial installation things went swimmingly.

Reply

45 shiva August 3, 2010 at 1:27 pm

After installation i am using this command
# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex

i am geeting command is not found output pls help me

Reply

46 P Willadino September 8, 2010 at 2:53 pm

I`m having a weird problem on both places I installed cacti (following this guide): Cacti is working and making graphs, but I can`t create anything traffic-related (which all seem to be under SNMP – Interface stats or something). The only Graph option I get for SNMP is “Generic OID”. I can’t find anything over the net, and it seems someone here asked for help but no one answered, so I’m hoping an extra call will help us both.

Thanks.

Reply

47 Donnie September 23, 2010 at 3:28 pm

Append / modify it as follows (see snmpd.conf man page for details):

com2sec local localhost public
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
view all included .1 80
access MyRWGroup “” any noauth exact all all none
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root (configure /etc/snmp/snmp.local.conf)
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

Im stuck here! Where in that config files does this stuff go? Im kinda new to this so i know im a newbie. I would really appreciate some help. Running CentOS 5.5

Reply

48 Seun d September 30, 2010 at 8:46 am

hey

open the config file with text editor by going to Computer/etc/snmp/snmpd.conf

when u open replace the line that start with

com2sec local localhost public with the config provided and then save.

Reply

49 Seun d September 30, 2010 at 8:40 am

Hello all.

This is really a great post, I I had issues login in to caccti, got the error message as bellow,can someone help please….

Forbidden

You don’t have permission to access /cacti/ on this server.
Apache/2.2.3 (CentOS) Server at localhost Port 80

Reply

50 TK November 22, 2010 at 4:30 pm

Seun d

Kind of a late response but;

Your issue is an Apache permissions issue. chown / chmod the files in /usr/share/cacti/

Reply

51 Tin Tun Aung Kyaw April 3, 2012 at 11:04 am

Disabled SELinux
[root@cacti]# vi /etc/sysconfig/selinux
[root@cacti]# setenforce 0

Reply

52 Mazhar November 26, 2010 at 7:02 pm

Thanks for the docs. I am getting the following error

# tail -f /var/log/cacti/cacti.log
11/26/2010 01:53:26 PM – CMDPHP: Poller[0] WARNING: SNMP Get Timeout for Host:’localhost, and OID:’.1.3.6.1.2.1.1.1.0′
11/26/2010 01:53:31 PM – CMDPHP: Poller[0] WARNING: SNMP Get Timeout for Host:’localhost’, and OID:’.1.3.6.1.2.1.1.1.0′

Thanks in advance.
Mazin

Reply

53 Eusuph December 21, 2010 at 4:45 am

thanks, its working, great How to.
i am new in linux world but this make me to establish cacti for my network.

thanks.
Eususph

Reply

54 Rashid December 31, 2010 at 7:22 am

Nice one good post.

Reply

55 sisir sabat February 12, 2011 at 3:11 pm

sir,
i was advised to first load centos ver 5.4 then redhat ver 5, pl advise me as what to do

Reply

56 Samuel Adu Asare March 9, 2011 at 2:59 pm

Thank you so much for sharing your knowledge us. please I am having some little challenge with accessing cacti from another pc but it’s working on the localhost. please any help.

Reply

57 emir March 22, 2011 at 9:14 pm

did you follow this

You need to update allow from line. Either set to ALL or your LAN subnet to allow access to cacti:

#
# Cacti: An rrd based graphing tool
#
Alias /cacti /usr/share/cacti

Order Deny,Allow
Deny from all
Allow from 10.0.0.0/8

then restart apache?

Reply

58 Avinash.Rao June 26, 2011 at 2:27 am

Hi Guys,

I am using CentOS 5.6 installed with Apache and an open source CiviCRM application. The database is installed on another server for load sharing.

1) How do i install Cacti on the first server which already has Apache + PHP + Perl etc.. without disturbing the existing setup.

2) Can i do remote monitoring? In the sense, can i monitor another server through the network.

Thanks a ton
Avinash

Reply

59 Thanapol July 2, 2011 at 5:58 am

Great !!!

Thank you so much

it work for CentOS 5.2

Reply

60 shylock_1 August 20, 2011 at 6:04 pm

Hello Forum,

I am trying to install cacti package on Red Hat Ent 6 server. I am getting following error when I initiate command:
[code]
@hawk shylock_1]# yum install cacti
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package cacti.noarch 0:0.8.7g-3.el6.rf will be installed
--> Processing Dependency: net-snmp-utils for package: cacti-0.8.7g-3.el6.rf.noarch
--> Processing Dependency: rrdtool for package: cacti-0.8.7g-3.el6.rf.noarch
--> Finished Dependency Resolution
Error: Package: cacti-0.8.7g-3.el6.rf.noarch (rpmforge)
Requires: net-snmp-utils
Error: Package: cacti-0.8.7g-3.el6.rf.noarch (rpmforge)
Requires: rrdtool
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[/code]
I did try with –skip-broken option with yum but all avail.
I noticed RRDtool does not exists for RH el6 server.
Any one knew what score for the installation this package? Please.
Thank you,
shy

Reply

61 kamal December 1, 2011 at 9:51 am

Hi All,

If you are getting error while installing EPEL Repository plz try below..

Install EPEL Repository On 32-bit CentOS Linux 5.5:

# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Reply

62 kamal December 1, 2011 at 11:19 am

Hi,

I have installed everything as mentioned above. However, am getting the below error.
Forbidden

You don’t have permission to access /cacti/ on this server.
Apache/2.2.3 (CentOS) Server at centos Port 80
Please help…

Thanks and Regards

Reply

63 Given March 19, 2012 at 10:10 am

Edit this file /etc/selinux/config
look for
SELINUX=enforcing
to
SELINUX=disabled

reboot your server

Reply

64 Charbel January 5, 2012 at 11:26 pm

Just a small note to say that php-pear-Net-SMTP did not install on a fresh CentOS 6.2 box before I added the community repo listed above.

Either way, thank you for posting!

Reply

65 Charbel January 5, 2012 at 11:29 pm

oh, and to kamal (assuming you figured out your problem by now), i noticed that the iptables service was started by default on my fresh centos install….

Reply

66 kamal January 6, 2012 at 6:55 am

hi charbel… thanks for being update and my cacti has been installed successfully.

Reply

67 nami May 3, 2012 at 6:58 am

when i enter the default username and password, the appear and asked…..

The requested URL /auth_changepassword.php was not found on this server.

what is the problem with the installation??????????????????????
please help me………………………………

Reply

68 kamal May 3, 2012 at 1:40 pm

HI Nami,

The issue seems to be your “document root directive.” Please check the document root it should match with you cacti folder path. As the “auth_changepassword.php” is not under the difined root directive.

For more please check the given below link:

http://thr3ads.net/centos/2012/04/1855206-auth_changepassword

Thanks

Reply

69 Symon July 3, 2012 at 7:15 am

I had a few issues after following this.

First was making sure the URL is appended with a /

eg

http://1.2.3.4/cacti/

Also couldn’t see any websites on a new centos 6 build, disabled iptables and all good.

Thanks for the tutorial.

Reply

70 Milind Kadam July 5, 2012 at 11:29 am

Hi,
Awesome information thanks, but my question is that can we combine nagios and cacti on the same interface ( on same link nagios and cacti).
It is possible?????

Thanks in advanced

Reply

71 Sha_sha July 10, 2012 at 12:32 pm

http://ip address/cacti/

Not Found

The requested URL /cacti/ was not found on this server.
Apache/2.2.3 (CentOS) Server at 10.50.3.206 Port 80

why am not getting cacti..Plz help meee

Reply

72 Sarmed Rahman July 11, 2012 at 7:52 am

Dear Sha_sha,

Please check whether iptables or SELinux is blocking it or not.

Thanks.

Reply

73 shahzaib November 16, 2012 at 7:02 am

Hello,
I am having a weird problem, everything has been installed successfully, and i configured cacti with interfaces as you instruct above, i can see graphs of memory, hdd but its a blank graph not showing any info , just looking like a picture graph which does’nt move , another problem is , there is not interface traffic graph to monitory bandwidth. Can you please help me ? Thanks

Reply

74 Sarmed November 18, 2012 at 3:11 am

I hope that your server is not in production environment. At your own risk, but please make sure all these software are installed

freetype-devel libpng-devel libart_lgpl-devel php-gd mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd net-snmp-utils php-snmp net-snmp-libs crontabs cacti

I used to have similar problems with RHEL based systems. But after compiling this list, the problems were gone.

Reply

75 shahzaib November 18, 2012 at 1:14 pm

Hello,

Thanks for reply, It is a live server but practicing server as i am new to cacti. I can provide you ip/cacti for the server if you ask for it besides all the packages have been installed except php-pear-Net-SMTP on centos 6. One problem has been solved, graph for interface is visible now, but again not showing any info also memory,hdd etc not showing any info. can i install php-pear-Net-SMTP with yum ? i am using centos 6.3 64bit. Can you provide me some link to install php-pear-Net-SMTP properly. I am having problem with compiling php-pear-Net-SMTP .Thanks

Reply

76 shahzaib November 18, 2012 at 5:25 pm

Graph is now displaying info of memory, hdd , user processes, the issue was with csf firewall i used 161 port for snmp to permit udp in/out in CSF.conf. however interface eth0 is still the problem, not showing any traffic bandwidth. I also installed php-pear-Net-SMTP repo from below link :-
rpm -ivh http://mirrors.einstein.yu.edu/epel/beta/6/SRPMS/php-pear-Net-SMTP-1.4.4-1.el6.src.rpm

Reply

77 shahzaib November 19, 2012 at 10:13 am

Somehow cacti working now and showing all the graph including interface eth0. I used version 1 of snmp instead of version 2. Now the next step was to add remote host in cacti. I installed snmp packages into remote host and added the snmpd.conf configuration which is given in guide above. Remote host has been added into snmp successfully and i also created graph for it. But the new problem is, in GRAPHS only localhost is showing but no remote host. I can’t even empty graph for remote host :(

Reply

78 Sarmed November 20, 2012 at 5:58 am

sorry for the late response. I do not understand what the problem is. Are your processor/hdd graphs, as well as bandwidth graphs coming up?

If graphs for some particular host does not come up, try manually running snmpwalk from your console. for example-

snmpwalk -c communitystring 192.168.10.1 -v1

this command should produce a TON of output if you are able to query successfully.

You should also check your graph tree settings from cacti > console. Maybe something is not properly configured there.

I don’t mean to brag, but your could check this for further reference: http://amar-linux.blogspot.com/2012/02/cacti-on-centos-6-setting-up-system.html

Reply

79 shahzaib November 20, 2012 at 7:13 am

The output of localhost(cacti installed server) :-
snmpwalk -v 1 -c public localhhost IP-MIB::ipAdEntIfIndex
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntIfIndex.localhost = INTEGER: 2

The output of remote host :-
snmpwalk -v 1 -c public remotehost IP-MIB::ipAdEntIfIndex
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntIfIndex.remoteip = INTEGER: 2

But the output of “snmpwalk -c communitystring localhost -v1 and snmpwalk -c communitystring remoteip -v1″ is :-
Timeout: No Response from localhost.
Timeout: No Response from remoteip.

Reply

80 Sarmed November 21, 2012 at 3:45 am

“But the output of “snmpwalk -c communitystring localhost -v1 and snmpwalk -c communitystring remoteip -v1″ is :-
Timeout: No Response from localhost.
Timeout: No Response from remoteip. ”

looks like there is some problem with SNMP configuration. Both localhost and remotehost are responding to SNMP queries with communitry string “public” (by default, they do, but limited info). But when you try with your own custom community string e.g “communitystring”, neither localhost nor remotehost responds.

Please check your /etc/snmp/snmpd.conf file. I’m giving a sample configuration for your convenience-

######################################################
########### the community string is myCommunity#############
######################################################

#### allow snmp queries FROM 192.168.10.0/24 network ####
com2sec myUser 192.168.10.0/24 myCommunity

group myGroup v1 myUser
group myGroup v2c myUser

view all included .1

access myGroup “” any noauth exact all all none
#############################################

Reply

81 shahzaib November 21, 2012 at 11:57 am

I used the following settings for localhost and remotehost :-

=============================
com2sec local 192.168.3.0/24 test

group myGroup v1 local
group myGroup v2c local
=============================

And used following snmp walk :-
snmpwalk -c test 192.168.3.150 -v1
snmpwalk -c test 192.168.3.160 -v1

And got ton of output. Looks like things are getting into position. Also i changed back snmp-v1 to snmp-v2 .

Reply

82 shahzaib November 21, 2012 at 8:02 pm

Graph is showing now for local and also for remote with all the info it should have. Snmp was taking so much time to get information for graphs . I read in cacti official site, spine is fast poller engine and i installed spine into server and changed spine and poller path in cacti -> settings and snmp is taking lesser time now but i want to confirm that the command “php poller.php” has to cycle three times interval of 5min to get info for any graph that added recently by me. Is this OK ? That much time is suitable for cacti or i am still doing something wrong? And thanks sarmad for helpful instructions :)

Reply

83 Sarmed November 22, 2012 at 4:47 am

glad I could help :)

I haven’t tried spine yet, so no helpful insights from my part.

And you can check details about the poller log from Cacti > Console> System Utilities > View Cacti Log File.

Reply

84 shahzaib November 27, 2012 at 7:01 am

Thanks Sarmad, gonna perform cacti on the ground today :D and will check the performance of cacti. :)

Reply

85 shahzaib November 30, 2012 at 6:52 am

Hello Sarmad,

I performed cacti to get results of 10 remote hosts and it is working perfect. Thanks to you :). Now i want to know if i can get combined result for all hosts on a single page. For example 2 hosts used 50 bandwidth each. Is there a way that cacti can emerge the both hosts result and show 100 bandwidth on a single page ? So i don’t have to check individual graphs to collect overall bandwidth used by my hosts.

Reply

86 Shane November 28, 2012 at 7:35 pm

Thanks for the great howto. Your hard work is much appreciated!

Reply

87 shahzaib December 1, 2012 at 10:56 am

I performed cacti to get results of 10 remote hosts and it is working perfect. Thanks to you :). Now i want to know if i can get combined result for all hosts on a single page. For example 2 hosts used 50 bandwidth each. Is there a way that cacti can emerge the both hosts result and show 100 bandwidth on a single page ? So i don’t have to check individual graphs to collect overall bandwidth used by my hosts.

Reply

88 shahzaib December 8, 2012 at 6:35 am

Cacti graph is limiting bandwidth to 14Mbyte/sec, i have 10 remote hosts and all of them are not showing bandwidth graph greater than 14Mbyte/sec. Is there some restrictions on bandwith graph for limiting bandwidth ?

Reply

89 sarmed December 21, 2013 at 8:09 am

You could try with 64 bit counters in the poller. We have graphs over 500 Mbps working fine with 64 bit counters.

Reply

90 Richard December 20, 2013 at 7:32 pm

For those with EPEL troubles, the EPEL repository for CentOS 5 is now @
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Reply

91 Kartheek June 16, 2014 at 11:41 pm

Hello Sarmed,

I am having the same problem like shahzaib, I am able install cacti successfully on RHEL 6.5 and unable to view any of the graphs like memory, load, disk and Process. All the graphs are empty. I installed all the libraries which you told but still no luck.

Reply

92 Rajesh June 22, 2014 at 7:02 am

Hi All,

I am unable to get these packages. please help on this.

Downloading Packages:
ftp://192.168.2.11/pub/localyumserver/Packages/php-snmp-5.3.3-22.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 19 - "Given file does not exist"
Trying other mirror.
ftp://192.168.2.11/pub/localyumserver/Packages/php-mbstring-5.3.3-22.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 19 - "Given file does not exist"
Trying other mirror.
ftp://192.168.2.11/pub/localyumserver/Packages/php-devel-5.3.3-22.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 19 - "Given file does not exist"
Trying other mirror.
Error Downloading Packages:
  php-mbstring-5.3.3-22.el6.x86_64: failure: Packages/php-mbstring-5.3.3-22.el6.x86_64.rpm from centos: [Errno 256] No more mirrors to try.
  php-snmp-5.3.3-22.el6.x86_64: failure: Packages/php-snmp-5.3.3-22.el6.x86_64.rpm from centos: [Errno 256] No more mirrors to try.
  php-devel-5.3.3-22.el6.x86_64: failure: Packages/php-devel-5.3.3-22.el6.x86_64.rpm from centos: [Errno 256] No more mirrors to try.

Reply

Leave a Comment

Tagged as: , , , , , , , , ,

Previous Faq:

Next Faq: