RedHat / CentOS Install and Configure Cacti Network Graphing Tool

Posted on in Categories , , , , last updated December 21, 2013

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:

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 [email protected] 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:

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

94 comment

  1. Good post. Thanks for your great site.

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

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

  3. 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!

  4. Have you used locate to find it?

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

  5. 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…?

  6. 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

  7. 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.

  8. 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 :/)

  9. 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?)

  10. 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.

  11. 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.

  12. Hi,

    I’m stuck at step:

    “service httpd restart”

    I got a error:

    [[email protected] 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]
    [[email protected] init.d]#

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

    [[email protected] /]# 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
    [[email protected] /]#

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

  14. 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)

  15. 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.

  16. 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

    [[email protected]]# 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.

  17. 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)

  18. 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

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

  20. 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”

  21. 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.

  22. 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!

  23. 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

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

  25. 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

  26. 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.

  27. 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

    1. 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.

  28. 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

    1. Seun d

      Kind of a late response but;

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

    2. Disabled SELinux
      [[email protected]]# vi /etc/sysconfig/selinux
      [[email protected]]# setenforce 0

  29. 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

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

    thanks.
    Eususph

  31. 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.

    1. 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?

  32. 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

  33. 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

  34. 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
  35. 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

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

      reboot your server

  36. 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!

  37. 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….

  38. 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………………………………

  39. 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.

  40. 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

  41. 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

  42. Dear Sha_sha,

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

    Thanks.

  43. 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

    1. 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.

      1. 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

  44. 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 :(

    1. 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

      1. 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.

        1. “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
          #############################################

          1. 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 .

      2. 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 :)

        1. 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.

          1. 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.

  45. 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.

  46. 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 ?

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

  47. 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.

  48. 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.
    
  49. Can cACTI be used to monitor Mysql & apache Statistics like no of reads, No of writes, how many visitors etc?

  50. Hi,
    Great post – got cacti installed, but because I’m doing this on VirtualBox with CentOS 6.7 in a virtual machine, I can’t then hit the server on the browser. I can ssh to the VM with

    ssh -l root -p 61000 127.0.0.1

    Any idea how I hit it with a browser?

Comments are closed.