Cacti tool is an open-source web-based network monitoring and system monitoring graphing solution for IT business. Cacti enable a user to poll services at regular intervals to create graphs on resulting data using RRDtool. Generally, it is used to graph time-series data of metrics such as network bandwidth utilization, CPU load, running processes, disk space, etc.
In this how-to, we are going to show you how to install and set up a complete network monitoring application called Cacti using Net-SNMP tool on RHEL, CentOS and Fedora systems using YUM and DNF package manager tool.
Cacti Required Packages
The Cacti required the following packages to be installed on your Linux operating systems like RHEL / CentOS / Fedora.
- 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 the network.
- RRDTool : A database tool to manage and retrieve time series data like CPU load, Network Bandwidth, etc.
Note: The installation instructions were shown here are written based on CentOS 7.5 Linux distribution.
Installing Cacti Required Packages on RHEL / CentOS / Fedora
First, we need to install following dependency packages one-by-one using the default package manager tool as shown.
Install Apache
# yum install httpd httpd-devel [On RHEL/CentOS 7/6] # dnf install httpd httpd-devel [On RHEL/CentOS 8 and Fedora 30]
Install MySQL
# yum install mysql mysql-server [On RHEL/CentOS 6]
MariaDB is a community-developed fork of the MySQL database project and provides a replacement for MySQL. Previously the official supported database was MySQL under RHEL/CentOS and Fedora.
Recently, RedHat makes a new transaction from MySQL to MariaDB, as MariaDB is the default implementation of MySQL in RHEL/CentOS 8/7 and Fedora 19 onwards.
# yum install mariadb-server -y [On RHEL/CentOS 7] # dnf install mariadb-server -y [On RHEL/CentOS 8 and Fedora 30]
Install PHP
# yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli OR # dnf install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli
Install PHP-SNMP
# yum install php-snmp OR # dnf install php-snmp
Install NET-SNMP
# yum install net-snmp-utils net-snmp-libs OR # dnf install net-snmp-utils net-snmp-libs
Install RRDTool
# yum install rrdtool OR # dnf install rrdtool
Staring Apache, MySQL, and SNMP Services
Once you’ve installed all the required software’s for Cacti installation, let’s start them one-by-one using following commands.
On RHEL/CentOS 6 and Fedora 18-12
[root@tecmint ~]# service httpd start [root@tecmint ~]# service mysqld start [root@tecmint ~]# service snmpd start
On RHEL/CentOS 8/7 and Fedora 19 Onwards
[root@tecmint ~]# systemctl start httpd.service [root@tecmint ~]# systemctl start mariadb.service [root@tecmint ~]# systemctl start snmpd.service
Configure System Start-up Links
Configuring Apache, MySQL and SNMP Services to start on boot.
On RHEL/CentOS 6 and Fedora 18-12
[root@tecmint ~]# /sbin/chkconfig --levels 345 httpd on [root@tecmint ~]# /sbin/chkconfig --levels 345 mysqld on [root@tecmint ~]# /sbin/chkconfig --levels 345 snmpd on
On RHEL/CentOS 8/7 and Fedora 19 Onwards
[root@tecmint ~]# systemctl enable httpd.service [root@tecmint ~]# systemctl enable mariadb.service [root@tecmint ~]# systemctl enable snmpd.service
Install Cacti on RHEL / CentOS / Fedora
Here, you need to install and enable the EPEL Repository. Once you’ve enabled the repository, type the following command to install Cacti application.
# yum install cacti [On RHEL/CentOS 7] # dnf install cacti [On RHEL/CentOS 8 and Fedora 30]
Configuring MySQL Server for Cacti Installation
We need to configure MySQL for Cacti, to do this we need to secure a newly installed MySQL server and then we will create Cacti database with user Cacti. If you’re MySQL is already installed and secured, then don’t need to do it again.
# mysql_secure_installation
Create MySQL Cacti Database
Login into MySQL server with a newly created password and create Cacti database with user Cacti and set the password for it.
On RHEL/CentOS 6 and Fedora 18-12
[root@tecmint ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 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 database cacti; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'tecmint'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH privileges; Query OK, 0 rows affected (0.00 sec) mysql> quit; Bye
On RHEL/CentOS 8/7 and Fedora 19 Onwards
[root@tecmint ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3 Server version: 5.5.41-MariaDB MariaDB Server Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> create database cacti; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'tecmint'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> FLUSH privileges; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> quit; Bye
Install Cacti Tables to MySQL
Find out the database file path using RPM command, to install cacti tables into newly created Cacti database, use the following command.
# rpm -ql cacti | grep cacti.sql
Sample Output:
/usr/share/doc/cacti-1.2.6/cacti.sql OR /usr/share/doc/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.
[root@tecmint ~]# mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql Enter password:
Configure MySQL settings for Cacti
Open the file called /etc/cacti/db.php with any editor.
# vi /etc/cacti/db.php
Make the following changes and save the file. Make sure you set password correctly.
/* make sure these values reflect your actual database/host/user/password */ $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cacti"; $database_password = "your-password-here"; $database_port = "3306"; $database_ssl = false;
Configuring Firewall for Cacti
On RHEL/CentOS 6 and Fedora 18-12
[root@tecmint ~]# iptables -A INPUT -p udp -m state --state NEW --dport 80 -j ACCEPT [root@tecmint ~]# iptables -A INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT [root@tecmint ~]# service iptables save
On RHEL/CentOS 8/7 and Fedora 19 Onwards
[root@tecmint ~]# firewall-cmd --permanent --zone=public --add-service=http [root@tecmint ~]# firewall-cmd --reload
Configuring Apache Server for Cacti Installation
Open file called /etc/httpd/conf.d/cacti.conf with your choice of editor.
# vi /etc/httpd/conf.d/cacti.conf
You need to enable 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.
Alias /cacti /usr/share/cacti <Directory /usr/share/cacti/> Order Deny,Allow Deny from all Allow from 172.16.16.0/20 </Directory>
In the latest version of Apache (ex: Apache 2.4), you may need to change according to the following settings.
Alias /cacti /usr/share/cacti <Directory /usr/share/cacti/> <IfModule mod_authz_core.c> # httpd 2.4 Require all granted </IfModule> <IfModule !mod_authz_core.c> # httpd 2.2 Order deny,allow Deny from all Allow from all </IfModule> </Directory>
Finally, restart the Apache service.
[root@tecmint ~]# service httpd restart [On RHEL/CentOS 6 and Fedora 18-12] [root@tecmint ~]# systemctl restart httpd.service [On RHEL/CentOS 8/7 and Fedora 19 onwards]
Setting Cron for Cacti
Open file /etc/cron.d/cacti.
# vi /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.
#*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
Running Cacti Installer Setup
Finally, Cacti is ready, just go to http://YOUR-IP-HERE/cacti/ & follow the installer instruction through the following screens. Enter the default login details and hit Enter button.
User: admin Password: admin
Next, change default Cacti password.
Accept Cacti License Agreement.
Next, the screen shows Pre-installation Checks for Cacti installation, please correct the suggested settings in your /etc/php.ini
file as shown and restart Apache after making changes.
memory_limit = 800M max_execution_time = 60 date.timezone = Asia/Kolkata
Similarly, you also need to grant access to the MySQL TimeZone database for user Cacti, so that the database is populated with global TimeZone information.
mysql> use mysql; mysql> GRANT SELECT ON mysql.time_zone_name TO cacti@localhost; mysql> flush privileges;
Please choose the installation Type as “New Install“.
Make sure all the following directory permissions are correct before continuing.
Make sure all of these Critical Binary Locations and Versions values are correct before continuing.
Please choose the default Data Source Profile to be used for polling sources.
Please, choose the Device Templates that you wish to use after the Cacti Install.
Set the Server Collation in your MySQL configuration file /etc/my.cnf under the [mysqld] section as shown.
[mysqld] character-set-server=utf8mb4 collation-server=utf8mb4_unicode_ci
Your Cacti Server is almost ready. Please confirm that you are happy to proceed.
For more information and usage please visit the Cacti Page.
Hi, Please help. I have done everything right. All commands are executed without errors. For some reason. I cannot go past the “your mysql database is not populated” please help.
Thanks, it works. and how to upgrade?
I am facing this issue with mysql error when try to deploy it.
This guide is much easier to follow than the manual on Cacti, thank you. I’m having trouble with the Pre-Installation Checks. I went into the /etc/php.ini and changed the three settings you say to, but it only corrects the errors on the PHP (cli) section, not the (web) section. I’ve restarted apache about a dozen times, restarted MariaDB, and it’s not recognizing it. I can’t continue to the next section from here.
Rebooting my server fixed this issue.
@Daniel,
Could you share the errors here? so that we can have a solution for you…
I am getting no output from this command.
Sorry, this is the comment.
Thanks for the tutorial, but it was not so easy for me since it was no more than the first login, and what I did was edit the following file:
and look for the line that says: session.auto_start = 0 and changed it to: session.auto_start = on.
and went on with the installation.
I have installed this by following all the steps. But when I try to login with
admin/admin
nothing happens. I can’t see any error in the logs.Any idea?
I have the same situation as Salman, log in with admin/admin nothing happens.
I found the solution on login with the user “admin” and password admin. Add two
//
on this line: $cacti_cookie_domain = ‘cacti.net’; found here: ~$ sudo nano /usr/share/cacti/include/config.phpHi,
I changed the date.timezone = “Asia/Kabul” in php.ini but still when I open cacti shows the date.timezone error, please help me to solve this issue.
uncomment ;date.timezone = America/New York in /etc/php.ini and restart apache, it should work.
date.timezon >= Error, I couldn’t fix, I tried to install cacti in Centos7 and it in VMware, please help me to install
I have disabled Selinux, still cannot fix the issue and cannot continue the “next” step. Please help
Dear Ravi,
I am new in Cacti and just following your step to install Cacti. I got /usr/share/cacti/log/ “Not writable” at Installation Wizard page. I have tried chown -R apache.apache /usr/share/cacti/log/ and chown -R root.root /usr/share/cacti/log/ still cannot not fix the issue and cannot continue “next” step. Please help
@Clive,
This is likely an SELinux issue, check the context set on the log directory or else you can disable SELinux to fix it.
Thanks Ravi’s information. It is working now when I disable the selinux. Thank you very much.
Your mixing too many things in one post, Do it for one Os release, it will be better.
@Gurudatta,
But, most of these instructions are similar on these mentioned Linux distributions..
Why my graphs are empty after still a hour
Forbidden
You don’t have permission to access
/cacti/
on this server.I am facing this error while visit
http://localhost/cacti/
.Please give me solutions.
Thanks.
@Dev,
Please check your Cacti installation and also enable access to IP address on Apache. If you still get same error, check the logs for solution.
I have an error, while running the following command.
Please how to to do fix?
@Aung,
Could you share what error you getting while importing cacti database into MySQL?
Thanks for your reply. I have get this error message.
ERROR 1049 (42000): Unknown database ‘/usr/share/doc/cacti-0.8.8b/cacti.sql’
@Aung,
Have you created cacti database with user and privileges?
I ran into the below error.
MySQL TimeZone Support
ERROR: Your Cacti database login account does not have access to the MySQL TimeZone database. Please provide the Cacti database account “select” access to the “time_zone_name” table in the “mysql” database, and populate MySQL’s TimeZone information before proceeding.
and I followed these following instructions to resolve.
No package mariadb-server available.
What to do?
@Bhushan,
Add the MariaDB official Yum repository to install Mariadb.
My Cacti Graphs are not showing. Where should I check?
Thanks for your post. You can add epel repo installation to the post for CentOS7 with “yum install epel-release -y”
Hi, could you updated this guide for the latest version of cacti? seem there are some file permission needed for it to install the template.
I have installed Cacti but its not polling. It simply shows a white box with cacti logo.
Hi Ravi,
Great article, thank you.
It is just that I got stuck in running the Cacti installer. When I go to http://127.0.0.1, I got the infamous “You don’t have permission to access /cacti/ on this server” error.
I read through the documentation and various forums but it seems I cannot understand what is wrong and cannot get pas this error.
My /etc/httpd/conf.d/cacti.conf is:
My network is 192.168.1.x network and I am running Fedora 27 on x86_64.
Any ideas on what I am missing?
Thank you.
@Tolga,
Please add the following lines to your cacti.conf file and restart the apache server.
Thanks @Ravi!
mysql -u cacti -p raju < /usr/share/doc/cacti-1.1.28/cacti.sql
Enter password:
ERROR 1044 (42000): Access denied for user 'cacti'@'localhost' to database 'raju'
hi. I am getting the above error. can you please help me with this?
@Raju,
Better to import Cacti.sql to Cacti database using root and then grant permission to whole Cacti database as cacti user..
i want a guide to install the cacti
Hi,
Getting below error, please advise, thanks
# mysql -u cacti -p cacti < /usr/share/doc/cacti-1.1.24/cacti.sql
Enter password:
ERROR 1045 (28000): Access denied for user 'cacti'@'localhost' (using password: YES)
Forbidden
You don't have permission to access /cacti on this server.
@Sanmao,
Have you created Create MySQL Cacti Database? Please follow instructions carefully..
i create the database but still, i am getting the error.
MariaDB [(none)]> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY ‘raju’; Query OK, 0 rows affected (0.02 sec)
is that ok?
@Raju,
Yes the MySQL query for granting permission on Cacti database to user cacti is correct. Could you please check the logs or post error here?
Hi, I am install cacti successfully, but when i install plug-ins, it can’t work and i am install older version of cacti it is work fine please resolve this issue.
@Arpit,
What errors you see while installing cacti Plugins? could you share here so that we can help you out.
ERROR: Your MySQL TimeZone database is not populated. Please populate this database before proceeding.
If I want use domain-name to access to my cacti server, instead of ip address. How could we do this?
For example: cacti.abc.com, instead of typing my ip address 192.168.X.X.
Thanks
@Danza,
Create a local virtualhost on Apache and point DocumentRoot to Cacti directory and in your desktop machine add local domain to hosts file.
when i tape ‘yum install cacti’ it says that no package cacti are available. What should i do ?!
@Maurin,
First, you need to enable EPEL Repository in your system to install Cacti package.
when entering on browser
http://myIP/cacti then it’s showing
This page isn’t working
103.74.227.22 is currently unable to handle this request.
HTTP ERROR 500
but when I enter
http://myIP/cacti/install
then install screen appears.
what could be the problem, and how to get rid of it.
Note: I turned off my firewall still the same problem.
hey Brother..
i have done everything .
only problem i am facing now is that when i enter
http://103.xx.101.10/cacti – its shows
This page isn’t working
103.xx.101.10 is currently unable to handle this request.
HTTP ERROR 500
but if i enter
http://103.xx.101.10/cacti/install/
then the install screen is working.
what could be the problem and how to solve it ?
I’m also getting a 500 error, I’ve gone through the procedures 3 times. What fixed it?
I am getting an error.
Error: your MYSQL timezone database is not populated. please populate the database before proceeding
I found many solutions on via google but none is working for me.
the most popular solutions are
1) shell> mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
when I run the above command it shows an arrow like this ( —-> ), after that I don’t know what to do.
2) second solution was
grant select on mysql.time_zone_name to cacti@localhost identified by ‘**your pass**)
when I run this second solution command it accepts it but still error is same.
please help ASAP
@Sam,
Try these commands to fix that MYSQL timezone database is not populated error.
it will solve your problem..
thanks for the reply
now I am having an error at cacti installation wiz screen as
Spine Binary File Location: The path to Spine binary.
/usr/local/spine/bin/spine (X)
means there is some problem with the location of the file or maybe the file is not on correct location, or maybe the file is not present on the server
i found out that i have to install the spine manually done installing it and configuring it
im not getting how to set spine file location
second main issue im facing is that snmp queries not writable error at directory permissions checks screen
i saw a video a person entered command
# chown -R apache:apache cacti
and the issue got resolved ..but he entered this command in a directory names as “html” . may be he created it or whatever ..i cant find this directory
please help
my cron job never runs. If I run it mannually I get following error:
Thanx Ravi! Everything is working great so far with one hiccup. All the devices report ‘Up’. I add the create graphs for the device but when I view the graphs they are all blank. However, if I click on the graph in real-time the graph is populated. I am not sure what to do at this point any ideas?
Thanks
jack
Will these instructions work on Fedora 25 server?
@Jack,
Yes, you can easily install Cacti on Fedora 25 by following these instructions..
Hello,
I having this error “FATAL: Cannot connect to MySQL server on ‘localhost‘. Please make sure you have specified a valid MySQL database name in ‘include/config.php‘ ” When I tried to connect the webserver. I am installing in a hyper-V enviorment with host also in same subnet . Do I need to change anything from the above? the “localhost ” would remain the same right ?
this one settled now as I had to change the password on database !
@Deepak,
Please include the correct host and database settings in include/config.php file and make sure your MySQL is running..
Ravi,
Maybe it’s just me but to get back to the last comments in this thread on your webpage I’ve had to hit the newer comments button literally about 15 times. You really need a button that takes everyone to the end.
@Jason,
Actually its difficult to show all comments in one page, it will make the page bigger in size and leads to slow loading, that’s the reason we have to break the comments into pages for easier navigation..
Nick,
In the instructions
GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY ‘tecmint’;
So you might want to try the password “tecmint” versus “YES”
I have run all the steps successfully as best I can validate. I’m running the latest Fedora with Apache 2.4 and I can’t get to http://localhost/cacti or http://localIPAddress/cacti or http://127.0.0.1/cacti.
Any hints?
@Jason,
I think Cacti installation was not successful, try to follow the instructions again carefully and see, if you still gets same error try to view the logs files of cacti and see what error it showing there?
I seemed to have missed something. When I type: [root@tecmint ~]# mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql
(This is the correct location of the cacti.sql db on my machine)
Where is that password coming from? Am I creating a user called cacti on the local machine? I tried editing the db.php so that the $database_username was 'cacti' and the password was [password] but I get access denied when I use that password. I also tried creating a user on the local host named 'cacti' and giving it a password but I get the same error.
Just to be clear, the error I get after attempting to use any passwords I’ve set is:
ERROR 1045 (28000): Access denied for user ‘cacti’@’localhost’ (using password: YES)
@Nick,
Have you followed Set MySQL Password and Create MySQL Cacti Database sections in the article carefully? if not try to follow these steps and set root password (if not set) and create cacti user as shown…then you can able to import cacti database to cacti db..
Dear Support,
I have a problem on show cacti.log on cacti. It say “Error /usr/share/cacti/log/cacti.log is not readable“. I try to give full permission to user apache and cacti but it still got same error.
[root@localhost log]# ll /usr/share/cacti/log/cacti.log
-rwxrwxrwx. 1 apache cacti 1606 Nov 26 03:00 /usr/share/cacti/log/cacti.log
@Leng,
I think you should assign permission apache user like:
Hi, Ravi
I followed step by step for centos7 and when i go to http://YOUR-IP-HERE/cacti/
I have this message : You don’t have permission to access /cacti/ on this server.
Why ? how can i resolve it ?
thank you
@Karim,
Make sure you’ve disabled SELinux mode, if not disable it and try again..
Hi, i am from Paris and i followed your tutorial, i have this error at this step ;
mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql
Enter password: (what is the password ???)
ERROR 1045 (28000): Access denied for user 'cacti'@'localhost' (using password: YES)
Could you help me ? I use CentOS 7.2
I have the same error. I think it has something to do with the way the guide sets the username compared to the default username but I can’t figure it out.
Hi,
I have configured cacti. It was asking for the login details as well but at the password change page it is showing below error:
“The requested URL /auth_changepassword.php was not found on this server.”
Please suggest.
Dear Ravi,
Thanks for your support , one more thing ..it seems to be a time mismatch in cacti time range..i have edited RTC to local timezone but still my graphs are not showing on current timings instead they are shown with a differnce of 5 hours. My timezone is Asia/Karachi
@Aun,
I think you should sync your sever time with NTP, here is the guide on how to do it: https://www.tecmint.com/install-ntp-server-in-centos/
Dear Ravi,
Hope you are fine. I have installed cacti as per your guide and I have then added Localhost in devices and template of load average, I am getting NAN value in graphs, should i wait for 24 hours to get it to poll ??
I have disabled SElinux and run this command as you told (php /usr/share/cacti/poller.php), I hope for your usual support..
@Aun,
Yes, I am find, hope you too as well, yes you should wait at least 24 hours after running poller.php script to gather data and generate report using graphs..
Hi Ravi,
I get Http Error 500 when i go http://serverip/cacti…please help
@Aun,
It seems your Cacti installation was not successful, I suggest you to follow instructions carefully and step-by-step to avoid any issues..
Please provide configure guide in network monitor tool for cacti.
Assalamu ‘alaikum wa rahmatullahi wa barakatuh.
Dear Ravi,
I really appreciated your effort doing this. I have only one problem encountered which is [ERROR: FILE NOT FOUND] /usr/share/cacti/log/cacti.log.
Would you please advise if I have to create manually the cacti.log file. Thank you very much in advance.
Kind regards,
Ali
@Ali,
Yes, you can create manually that Cacti log file as shown:
All set Ravi. Your the man.
[OK: FILE FOUND]
Thank you so much. ^_^
Hi,
I have been trying to install cacti monitoring tools for one of our internal server, unforfunalty im facing this issue while the installation process going on..
Step: Install Cacti Tables to MySQL
# /usr/share/doc/cacti-0.8.8b/cacti.sql
[root@localhost ~]# mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8b/ cacti.sql
-bash: /usr/share/doc/cacti-0.8.8b/: No such file or directory
What could be the issue for the above step?
@Cvaa,
The error is self explanatory, the file
cacti.sql
doesn’t exist on the specified location, do you see the file under/usr/share/doc/cacti-0.8.8b/
directory?Ravi,
Can you ping me offline to discuss the issue I am having?
@Chris,
You can contact me at [email protected] for any Cacti related issues, I will love to help you till the problem gets sorted.
Still no luck….Built a new VM server and did the same install, without any security loaded. Any ideas are welcome.
I have cacti working as shown in this howto. I appreciate all your effort. It has been a learning experience…
My issues are that the RRD background is shown and the SNMP is capturing stats.
I do not get any actual graph data.
If you can contact me offline or respond soonest. RHEL 7.2 with SELINUX permissive.
I can send pics if you need them. Debugging shows snmp working and the DB talking…..
tried 777 etc before and get the same results…thank in advance.
@Chris,
Thanks for appreciating our efforts in creating such easy article for you guys, regarding your issue, just give a day to pull the data from the server, or else you can manually run the poller.php script to update the graphs on the fly..
HI
under settings there is a – RRDTool Default Font Path option
what do i need to put in this field?
@Max,
No need to add anything, we are not using any fancy fonts for graphs, just skip this step and continue cacti installation.
I’m done the installation. Now i’m facing problem to add device, I added my pc to devices but the status is unknown, no graph is generate and just showing broken image. Any solution?
@Max,
Have you disabled SELinux mode? could you share the screenshot of the graph with us? so that we can help you out..
Hi Ravi,
Yes, I already disabled SELinux mode. Please refer link below.
Screenshot: http://www.filetolink.com/b1f31c8311
@Max,
Check two things, first check the logs under /var/log/ what error exactly you seeing in the logs and secondly try to run the following command and see what output you getting on the screen, share both results with me..
HI Ravi,
I re-install cacti from the scratch but now I have the same problem all guys have in http://192.168.8.102/cacti/install/index.php
[NOT FOUND] Cacti Log File Path: The path to your Cacti log file.
/usr/share/cacti/log/cacti.log
[ERROR: FILE NOT FOUND].
so please if there is any solution for this because i searched and i didn’t
find the solution.
thanks Ravi for your support
@Erramah,
This should resolve your issue.
It’s works!.. awesome.. thanks Ravi.
Dear,
I follow everything from this guidelines but after I entering to browser by using http://myip/cacti/, there was error : FATAL: Cannot connect to MySQL server on ‘localhost’. Please make sure you have specified a valid MySQL database name in ‘include/config.php’
What should I do? Your advise is much appreciated.
Thank you.
Dear Ravi,
Problem was resolved after I reconfigure the include.php. But the problem now, the graph doesn’t appear, it’s showing broken image. Kindly assist. Looking forward for you reply.
Thank you.
@Misterbux,
Try to disable SELinux and see..
Dear Ravi,
I will try and revert back to you the outcome.
Thanks.
Hello Ravi,
Thank you for these useful information I really appreciate you. I really need using cacti in my work. so I followed all the steps correctly. however, when I entered my ip add http://ipadd/cacti it is showed nothing, I changed all the value to allow my ip but nothing is change. then after I followed some posts but I really lost and many issues raised. Now I am getting The requested URL cacti was not found on this server.
@Erramah,
It seems your Cacti installation wasn’t successful, try following the instructions carefully again and make sure your SELinux is in disabled mode..If you don’t know how to make SELinux to disable state, try reading our article here: https://www.tecmint.com/disable-selinux-temporarily-permanently-in-centos-rhel-fedora/
Re:
[NOT FOUND] Cacti Log File Path: The path to your Cacti log file.
/usr/share/cacti/log/cacti.log
[ERROR: FILE NOT FOUND]
This should resolve your issue.
mkdir /var/log/cacti
touch /var/log/cacti/cacti.log
/usr/share/cacti/log is a symlink to /var/log/cacti which doesn’t exist
I got the same error as Saguu
@Samuel,
May I know on which Linux distribution version you guys trying? so that I can setup locally on my VM to test it myself and will give you proper solution to this problem. I still think its something that Cacti was not installed properly or may be bug in the cacti release..
@Ravi
For informations : CentOS 6.8 and cacti version 0.8.8h from repo el6
@Saguu,
Thanks for sharing Linux OS information, will give a try right away with solution…stay tuned till then..
Hello, I just try again in a moment. But it still does not work. It seems that this is a problem of authorization on file .. What do you think?
Nice job ! Perhaps, i have a problem with http://ip/cacti/install/index.php
In this page, i have this error :
[NOT FOUND] Cacti Log File Path: The path to your Cacti log file.
/usr/share/cacti/log/cacti.log
[ERROR: FILE NOT FOUND]
Have you an idea for this ?
Regards,
Saguu
@Saguu,
I don’t think your Cacti installation was successful, please try to re-install again and see..
Nice try but it’s the second installation (clean VM). I followed your tutorial step by step. :(
For informations : CentOS 6.8 and cacti version 0.8.8h from repo el6
Thank you! Very clear and concise!
Hello,
Please could someone advise, I am not getting any graphs and it displays broken image.
mysql> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| cacti |
| mysql |
| test |
+——————–+
I am only using username root on mysql…
vi /etc/cron.d/cacti
*/5 * * * * root /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
vi /etc/cacti/db.php
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “root”;
$database_password = “xxxxxxxx”;
$database_port = “3306”;
$database_ssl = false;
cd /usr/share/cacti/
ls -ls
8 -rw-r–r– 1 root root 5860 May 9 16:20 about.php
8 -rw-r–r– 1 root root 5348 May 9 16:20 auth_changepassword.php
16 -rw-r–r– 1 root root 14690 May 9 16:20 auth_login.php
12 -rw-r–r– 1 root root 10366 Jun 15 12:26 cacti.log
20 -rw-r–r– 1 root root 20257 May 9 16:20 cdef.php
0 lrwxrwxrwx 1 root root 18 Jun 14 12:24 cli -> /var/lib/cacti/cli
28 -rwxr-xr-x 1 root root 26620 May 9 16:20 cmd.php
8 -rw-r–r– 1 root root 6731 May 9 16:20 color.php
24 -rw-r–r– 1 root root 23082 May 9 16:20 data_input.php
36 -rw-r–r– 1 root root 33807 May 9 16:20 data_queries.php
60 -rw-r–r– 1 root root 57419 May 9 16:20 data_sources.php
32 -rw-r–r– 1 root root 31482 May 9 16:20 data_templates.php
8 -rw-r–r– 1 root root 6108 May 9 16:20 gprint_presets.php
4 -rw-r–r– 1 root root 3657 May 9 16:20 graph_image.php
16 -rw-r–r– 1 root root 13060 May 9 16:20 graph.php
12 -rw-r–r– 1 root root 9438 May 9 16:20 graph_settings.php
20 -rw-r–r– 1 root root 17980 May 9 16:20 graphs_items.php
40 -rw-r–r– 1 root root 39491 May 9 16:20 graphs_new.php
60 -rw-r–r– 1 root root 57810 May 9 16:20 graphs.php
12 -rw-r–r– 1 root root 10229 May 9 16:20 graph_templates_inputs.php
20 -rw-r–r– 1 root root 18710 May 9 16:20 graph_templates_items.php
28 -rw-r–r– 1 root root 25602 May 9 16:20 graph_templates.php
44 -rw-r–r– 1 root root 42189 May 9 16:20 graph_view.php
8 -rw-r–r– 1 root root 6480 May 9 16:20 graph_xport.php
56 -rw-r–r– 1 root root 57011 May 9 16:20 host.php
20 -rw-r–r– 1 root root 18756 May 9 16:20 host_templates.php
4 drwxr-xr-x 2 root root 4096 Jun 14 12:24 images
4 drwxr-xr-x 5 root root 4096 Jun 14 12:24 include
4 -rw-r–r– 1 root root 2323 May 9 16:20 index.php
4 drwxr-xr-x 2 root root 4096 Jun 14 12:24 install
4 drwxr-xr-x 3 root root 4096 Jun 14 12:24 lib
0 lrwxrwxrwx 1 root root 15 Jun 14 12:24 log -> /var/log/cacti/
4 -rw-r–r– 1 root root 2838 May 9 16:20 logout.php
4 drwxr-xr-x 2 root root 4096 Jun 14 12:24 plugins
28 -rw-r–r– 1 root root 24716 May 9 16:20 plugins.php
8 -rw-r–r– 1 root root 4310 May 9 16:20 poller_commands.php
4 -rw-r–r– 1 root root 3374 May 9 16:20 poller_export.php
20 -rwxr-xr-x 1 root root 18596 May 9 16:20 poller.php
4 drwxr-xr-x 5 root root 4096 Jun 14 12:24 resource
0 lrwxrwxrwx 1 root root 18 Jun 14 12:24 rra -> /var/lib/cacti/rra
8 -rw-r–r– 1 root root 7475 May 9 16:20 rra.php
0 lrwxrwxrwx 1 root root 22 Jun 14 12:24 scripts -> /var/lib/cacti/scripts
12 -rw-r–r– 1 root root 10819 May 9 16:20 script_server.php
8 -rw-r–r– 1 root root 6202 May 9 16:20 settings.php
8 -rw-r–r– 1 root root 6227 May 9 16:20 templates_export.php
8 -rw-r–r– 1 root root 5771 May 9 16:20 templates_import.php
20 -rw-r–r– 1 root root 19673 May 9 16:20 tree.php
44 -rw-r–r– 1 root root 42623 May 9 16:20 user_admin.php
60 -rw-r–r– 1 root root 58501 May 9 16:20 utilities.php
Thanks tecmint for responding to my post. The problem was symbolic link to log file
Hi!
Thanks for manual, just installed on Centos 6.8. When allowing 80 port in firewall better to use insertion (iptables -I), because in my case, rules was added after reject rule, and http service was unavailable
Hi, for installing plugins on Cacti, do i need to install anything else, do you have a manual for this version of Cacti 0.8.8g?
Regards,
@Pablo,
No you don’t need to install anything else, other than Cacti and this article shows instructions for the cacti 0.8.8b version and I am sure there’s nothing much difference in Cacti 0.8.8g.
Hi. I make what is missing?
http://prntscr.com/ba6os9
Images do not appear :/
@Volkan,
Thanks for sharing the screenshot, I think it’s due to SELinux, could you disable it and check again?
Thank you Ravi. I could not find a solution, and erased everything :D Now I’ll try to install again. (CentOS 6.8 64BIT)
@Volkan,
Good luck, and make sure to follow instructions carefully, if you stuck somewhere around while installing Cacti, do comment here, I will love to help you out..
Thank you Ravi. I found my mistake.;
#*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
I delete the # sign :D
Now it is running smoothly.
I’ll try to build add-ons. (plugins)
@Volkan,
I am glad that finally you found the mistake yourself and corrected, good luck for rest of things..
HI Ravi,
Just want to know why my graph all show “rrd file does not exist”?
@Dennis,
Please let me know what’s the group:owner permission of rrd files and directory? it should be apache:apache to function properly..
[root@hpdcentos3 ~]# ls -l /usr/share | grep rrd
drwxr-xr-x. 2 root root 6 Nov 21 2015 rrdtool
[root@hpdcentos3 ~]# ls -l /usr/share/cacti/lib | grep rrd
-rw-r–r–. 1 root root 91557 Feb 8 03:26 rrd.php
@Dennis,
It should be user/group apache, change the rrd directory and files ownership to apache recursively as shown
now my graph doesnt show any CPU utilization.
@Dennis,
After making changes, did you ran the poller.php file manually to collect data?
Hi Ravi, how to run the poller.php?
@Dennis,
Here is the command to execute and populate cacti graphs with data..
Hi Ravi,
thanks, I’ve run the command you gave me. But my poller time seems a bit off, it seem to be pulling data from my servers at 8 hrs late. i check all timezones are set to +8 including the ones in php.ini file. Please advise.
@Dennis,
Better sync your server time with NTP, here is the guide on how to do it https://www.tecmint.com/install-ntp-server-in-centos/
Hi Ravie,
Have setup NTP and configured according to yout tutorial. here is my system date.
[root@hpdcentos3 local]# date
Fri Jun 3 14:20:52 MYT 2016
[root@hpdcentos3 local]# timedatectl
Local time: Fri 2016-06-03 14:21:11 MYT
Universal time: Fri 2016-06-03 06:21:11 UTC
RTC time: Fri 2016-06-03 06:21:11
Time zone: Asia/Kuala_Lumpur (MYT, +0800)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
[root@hpdcentos3 local]# date -R
Fri, 03 Jun 2016 14:21:36 +0800
[root@hpdcentos3 local]# date
Fri Jun 3 14:21:40 MYT 2016
[root@hpdcentos3 local]#
but my graph is still 8hr late.
did i miss anything??
@Dennis,
Everything seems perfect, don’t know why such delay in generating graphs, let me dig into this and get back to you..
what is the cacti user password?
@Nick,
It should be admin as username and password as admin, try it and see..
After installing and doing all the steps of the guide I go to my cacti page and see just a blank page. Please your help I’m trying to install this server for 2 weeks now.
Thanks
@Gabriel,
Sorry to hear that, may I know on which Linux distributions you’re trying? and you’ve followed cacti installation instructions correctly, could you give a try again? or else give me access to your server, let me setup for you for free.
Hello Ravi,
Thanks for your reply, I’m installing Cacti on CentOS 6.3. I’ve followed all the instructions. I should re-install again?
Regards,
@Pablo,
Give a re-try and see, if you still not able to install properly, will help out in setting up.
Ravi, i just finished the re-install and the cacti server started and is working now, a little weird, thank you for your help anyway.
Regards,
@Gabriel,
Good to know that finally you managed to install Cacti successfully…
If you could please I can give you access through TV.
@Gabriel,
Please mail the TeamViewer details to [email protected] with suitable timing to connect.
I followed all the steps and all I see is a blank page, please your help with this.
@Plaza,
Please let me know on which Linux distributions you’re trying to install cacti? have you installed all required packages correctly?
hi, t have error “SNMP ERROR” when t try “add new device”, pls help me fix this
it is also not pulling any data from my servers using snmp but data from network switches came thru.
Hi, my graphs are 8hours late. How do i go about this? Thx
@Dennis,
I think you should sync your system time with NTP to have proper graphs based on correct time, just check your system time is correct?
hi Ravi,
i read in another forum that suggest to install webmin. After i install & configured admin hardware time setting, my graph time is accurate.
@Dennis,
Thanks for sharing your findings, and I am glad that it finally showing correct graphs based on time…
Where’s the cacti path installed?
@Banu,
There isn’t any one place, the Cacti tool gets installed all over the file-system, but the main configuration files resides under /etc/cacti directory..
In case of mysql is not on localhost you also need to enable network access for httpd (SElinux) else you will have errors like :
FATAL: Cannot connect to MySQL server on ‘192.168.1.10’. Please make sure you have specified a valid MySQL database name in ‘include/config.php’
setsebool -P httpd_can_network_connect=1
I have a problem same as Jhay, When I have got “FATAL: Cannot connect to MySQL server on ‘10.0.0.1’. Please make sure you have specified a valid MySQL database name in ‘include/config.php’”.
My server is running on 10.0.0.1.
I have created cacti database on mysql, and mysql is working fine. How I can solve?
@Zaya,
Please add the 10.0.0.1 IP address in db.php file under /etc/cacti/ directory like this:
I hope it will solve your MySQL connectivity problem..
When I try to start mysql service I get the following error
[vagrant@server1 /]$ sudo service mysqld start
Redirecting to /bin/systemctl start mysqld.service
Failed to start mysqld.service: Unit mysqld.service failed to load: No such file or directory.
What file or directory is missing?
Dear Mr. Ravi Saive, thank you for a great explanation.
Dear Mr. Ravi Can you please provide some thorough tutorial on oracle DBA administration. from very first installation to common problems manage/troubleshoot oracle 11G/12C. I will be thankful to you.
@Subhasish,
We’ve already covered about Oracle related articles, here is the installation of Oracle 11g and 12c:
https://www.tecmint.com/oracle-database-11g-release-2-installation-in-linux/
https://www.tecmint.com/oracle-12c-installation-in-centos-6/
Hi
I have error on Cacti Installation which is “FATAL: Cannot connect to MySQL server on ‘localhost’. Please make sure you have specified a valid MySQL database name in ‘include/config.php'” pls help me to fix this
@Jhay,
It’s clear that the MySQL cacti database doesn’t exits on the server, have you created Cacti database in the MySQL server, before attempting installation? Please create one as instructed it this article and try again the installation..
Hi Sir @Ravi Saive, I already fixed my problem. I noticed the password that i set in MySql Settings for cacti was not match to my root password. I am now able to use CACTI. Thank you for your response and thanks for this great tutorial. Hope you post a tutorial of Installation and configuration of Samba file server and Squid proxy server. God bless you Sir….
@Jhay,
That’s good to hear that you’ve fixed problem yourself and thanks for appreciating my work. Yes, we’re already covered about Samba and Squid server related articles here, you can go through it.
https://www.tecmint.com/setup-samba-file-sharing-for-linux-windows-clients/
https://www.tecmint.com/configure-squid-server-in-linux/
Keep visiting and God bless you too brother..:)
Hi,
I have finished Cacti installations but i still can’t see graphs. For rrd files RRDTools says ‘ERROR: opening ‘/usr/share/cacti/rra/localhost_load_1min_5.rrd’: No such file or directory’.. I’ve tried changing the group ownership of rra directory to apache as mentioned above but it didn’t work.
What I’m supposed to do next? Hope that there’s someone who can help here.
Thanks!
@Jolene,
It seems that rrdtool tool didn’t generating those files, it could be the permission issues on /usr/share/cacti/ directory or try to rebuild Poller Cache from System Utilities (bottom of console).
I have another problem, that all graps are not showing anything, they are empty, just none.
Where the problem could be?
@Aleksei,
Please check your SELinux settings and try to disable it and run the poller cron again and see the graphs are generating or not. Also check logs for any errors..
Hi, on the step where you find the location of Cacti.sql and then need to use the cacti user password, when/where was the step to create the cacti user account and assign a password?
Very newb to linux, and using this to help teach myself some setups.
Thanks!
@Bob,
Run the following command to locate the location of Cacti.sql file.
Under “Create MySQL Cacti Database” section, you will find instructions to create Cacti database, user and password..
Would you please help me, i want monitor bind 9.8.2 statistic by cacti which has been installed according to your professional document, please investigate a way, i couldn’t find it
Hi
after successful installation of cacti, i get server not found error as per following.
Forbidden
You don’t have permission to access /cacti/ on this server.
Apache/2.2.15 (CentOS) Server at 172.15.220.14 Port 80
@Rohan,
This is due to enabled SELinux issue, just disable or set it to permissive mode and try again…
Hello,
I have some problems after installing cacti. I am new in the linux and it is very difficult to resolve them.
Fist when I go to Cacti console > settings I received a message error “http://192.168.5.5/cacti/settings.php. It may be down for maintenance or configured incorrectly ”
The second problem is weathermap plugin wasn’t created tables in cacti databes, I created them manualy. Weathermap editor is successfully completed and it is work, but when I created something on new map It doesn’t appear as map in Network Weathermaps.
Also I receive that message error when try to use realtime plugin “The Image Cache Directory directory does not exist. Please first create it and set permissions and then attempt to open another realtime graph. ”
There are problems also with syslog and discover plugins but they are not important for me.
Could you please help me as tell me what is needed to do. I really need to have this work.
Many thanks, great article!! works like a charm.. :)
Hi there, I followed your guide to the letter, but after the install/setting up cron (and even rebooting the server), only thing I get is a blank webpage.
How can I find out why?
@Thomas,
Have you installed PHP and php modules correctly as described in the article?
Yes I did. With the exact command as stated above.
Just for sake of argument, I’ve done it again (yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli and yum install php-snmp), but it says this so it should be good.
Package php-mysql-5.3.3-46.el6_6.x86_64 already installed and latest version
Package 1:php-pear-1.9.4-4.el6.noarch already installed and latest version
Package php-common-5.3.3-46.el6_6.x86_64 already installed and latest version
Package php-gd-5.3.3-46.el6_6.x86_64 already installed and latest version
Package php-devel-5.3.3-46.el6_6.x86_64 already installed and latest version
Package php-5.3.3-46.el6_6.x86_64 already installed and latest version
Package php-mbstring-5.3.3-46.el6_6.x86_64 already installed and latest version
Package php-cli-5.3.3-46.el6_6.x86_64 already installed and latest version
Nothing to do
Package php-snmp-5.3.3-46.el6_6.x86_64 already installed and latest version
Nothing to do
@Thomas,
I suggest you to check following things:
1. Please cross check that all the required packages are installed for cacti
2. Please check cacti database is created and imported cacti tables into cacti database
3. In db.php file add the correct MySQL settings
4. Check Apache configuration and make sure to allow cacti from your IP address
After checking all the above things, try to browse again. If you still not able to see the cacti page, just send me your server details I will setup for you…
Hi Ravi,
Here you go:
[root@metamon01s ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
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> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| cacti |
| mysql |
| test |
+——————–+
4 rows in set (0.11 sec)
mysql> quit
Bye
[root@metamon01s ~]# rpm -ql cacti | grep cacti.sql
/usr/share/doc/cacti-0.8.8b/cacti.sql
[root@metamon01s ~]# mysql -u cacti -p cacti show tables from cacti;
+—————————+
| Tables_in_cacti |
+—————————+
| cdef |
| cdef_items |
| colors |
| data_input |
| data_input_data |
| data_input_fields |
| data_local |
| data_template |
| data_template_data |
| data_template_data_rra |
| data_template_rrd |
| graph_local |
| graph_template_input |
| graph_template_input_defs |
| graph_templates |
| graph_templates_gprint |
| graph_templates_graph |
| graph_templates_item |
| graph_tree |
| graph_tree_items |
| host |
| host_graph |
| host_snmp_cache |
| host_snmp_query |
| host_template |
| host_template_graph |
| host_template_snmp_query |
| plugin_config |
| plugin_db_changes |
| plugin_hooks |
| plugin_realms |
| poller |
| poller_command |
| poller_item |
| poller_output |
| poller_reindex |
| poller_time |
| rra |
| rra_cf |
| settings |
| settings_graphs |
| settings_tree |
| snmp_query |
| snmp_query_graph |
| snmp_query_graph_rrd |
| snmp_query_graph_rrd_sv |
| snmp_query_graph_sv |
| user_auth |
| user_auth_perms |
| user_auth_realm |
| user_log |
| version |
+—————————+
52 rows in set (0.02 sec)
mysql> quit
Bye
[root@metamon01s ~]# vi /etc/cacti/db.php
/* make sure these values refect your actual database/host/user/password */
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “metamon01s.mydomainname.com”;
$database_username = “cacti”;
$database_password = “%my db cacti user password%”;
$database_port = “3306”;
$database_ssl = false;
[root@metamon01s ~]# vi /etc/httpd/conf.d/cacti.conf
# On httpd 2.4, change “Require host localhost” to “Require all granted”.
# On httpd 2.2, change “Allow from localhost” to “Allow from all”.
Alias /cacti /usr/share/cacti
# httpd 2.4
Require all granted
# httpd 2.2
Order deny,allow
Deny from none
Allow from all
# mod_security overrides.
[root@metamon01s ~]#
Thanks for the help so far.
@Thomas,
Thanks for the detailed information, still you see blank page? Can I have a look into the server? send me details to [email protected]
I fixed this issue:
TL;DR firewall rule config error.
The firewall commands to add -A INPUT -p udp -m state –state NEW -m udp –dport 80 -j ACCEPT and -A INPUT -p tcp -m state –state NEW -m tcp –dport 80 -j ACCEPT are added behind the -A INPUT -j REJECT –reject-with icmp-host-prohibited rule, so it blocks traffic on port 80 before allowing it, regardless of apache…
Figured this out by spinning up a second vm -with a gui- and checking if the localhost could access it (which it could), and troubleshooting from there.
Is it possible to get data related to mysql database in cacti.
Like number of queries executed for second.
Number of reads, no of writes etc.
Thanks a bunch, this was very helpful.
Sir if you know any other way kindly guide me.Thank you.
Hope you must be fine by grace of God. I am facing a problem in my thesis which is about to change the link data rate depending upon the buffer occupancy i-e if the buffer space is filled above threshold then increase the link data rate and if the buffer is occupied below threshold then reduce the link data rate. Now the problem exists in determining the buffer space occupied. For this I am using” ifconfig” and “netstat”.
For ifconfig the output for switch AS-1 eth1 is as follows (by using netstat I was getting the same output):
AS-1-eth1 Link encap:Ethernet HWaddr 7a:81:df:f1:29:74
inet6 addr: fe80::7881:dfff:fef1:2974/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1
RX packets: 88 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 57 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 1000
RX bytes: 12266 (12.2 KB) TX bytes: 9052 (9.0 KB)
Now I am thinking, packets in queue= RX packets-TX packets=88-57=31packets (31 packets are in the buffer). Am I thinking in the right direction?
For “ifconfig” kindly check the following link
http://www.computerhope.com/unix/uifconfi.htm, Kindly just go through the overview, I know your time is really precious and sorry to bother you, kindly reply me as soon as possible. Thanks in advance.
I’m having the problem that the graphs are showing empty.
I’ve wait several minutes/hours and still is showing no data at all.
this is true for one host I added and also the localhost.
@Ditmar,
If there isn’t any network traffic on the localhost, then it difficult to generate graphs….there must be some data to generate graphs…
it all installed correctly but my graphs are not showing, all I see is a little black box with and white X in the middle, anything missing ?
Hello and thank you for the tutorial.
The installation went good but the graphs on localhost are empty (Data values are NaN) do you know why ?
Thanks
@Flz,
Wait for 24 hours, let server generate graphs for your system…
hey Flz, I am having this same issue, did you end up fixing it ?
thanks
Hi,
Now I’m facing error here, please review the below error and kindly do the needful.
[root@testserver ~]# mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql
Enter password:
ERROR 1045 (28000): Access denied for user 'cacti'@'localhost' (using password: YES)
[root@testserver ~]# cat /etc/cacti/db.php
<?php
/*
+————————————————————————-+
| Copyright (C) 2004-2013 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+————————————————————————-+
| Cacti: The Complete RRDTool-based Graphing Solution |
+————————————————————————-+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+————————————————————————-+
| http://www.cacti.net/ |
+————————————————————————-+
*/
/* 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 = "cacti";
$database_port = "3306";
$database_ssl = false;
Please first create cacti user in mysql and then restore cacti database. Please follow the instructions carefully…
My graphs does not shows… a got this message:
RRDTool Says:
ERROR: opening ‘/usr/share/cacti/rra/localhost_load_1min_5.rrd’: No such file or directory
@Marcelo,
It seems “localhost_load_1min_5.rrd” file is missing, better use find command to find the file and move to the given location.
After that try to Rebuild Poller Cache from the console under System Utilities..
Hi,
I apologies as I’m still facing the issue, even uninstalled the mysql packages and tried, it didnt work. Please look at the following, looks same issue. I heard from my colleague that root is unaware of the mysql password but I’m not that clear in that concept.
[root@testserver ~]# mysql -u root -ptest123
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
========================================================================================
[root@testserver ~]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
========================================================================================
Thanks
Hi,
I tried the following, then also I’m getting error, please have a look at the error and kindly suggest to fix.
[root@testserver ~]# mysql -u root -p test123
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
thanks
R.Pugazhendhi
@Pugazhendhi,
Please don’t put space betweek -p and password, try this.
Hi,
Thanks. Issue resolved. I have been using wrong password. Once I change it error cleared. thanks and apologies
Thanks
Hi,
When I access the mysql i’m getting the following error. Please help me to fix the error.
[root@testserver ~]# mysqladmin -u root password test123
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’
Thanks
R.Pugazhendhi
@pugazhendhi,
No, you can’t use mysqladmin to connect to mysql shell, use the following command.
Hi,
Firstly thanks for your immediate reply, I tried the following, then also I’m getting error, please have a look at the error and kindly suggest to fix.
[root@testserver ~]# mysql -u root -p test123
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
thanks
R.Pugazhendhi
How to monitor the remote server . Please add that for fedora21. Nice tutorial at all
can anyone help with the login and password?
@George,
login as ‘admin’ and password as ‘admin’.
hi there…
i installed cacti fans v0.8.7g on a virtual environment now cant seem to login to the default cacti-server login, but everything seem to b working though…
upon creating database. It creates it but doesn’t write the second line and so does with the next flush privileges line, AND do not create a database. it creates a line but says 0-Rows affected.
“mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY ‘IDENTIFIED’;
Query OK , 0 rows affected (0.09 sec)”
It creates the database cacti.sql file though as i can locate the cacti.sql file’s location. but when I go installing the table it says ” ERROR 1049 (42000): Unknown database ‘cacti'”.
Send help please.
Excuse for the typo
“mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY ‘the=password-i-set’;
i have already installed cacti but i canot access it the graphs its shows me with snmp error information
SNMP Information
SNMP error
snmp.conf is just http://paste.ubuntu.com/10408567/
i need help if you know it the problem
@Tewelde,
Can you share the screenshot?
how can i share the screenshot
Use any third party online image upload and share the link to the screenshot.
http://postimg.org/image/6pfhypf27/
@Tewelde,
Thanks for the screen grab, will update you with solution…
any progress on cacti @ravi?
@Tewelde,
Almost completed..give us 1-2 days will publish….
Hmm, so u r not on your words, 1-2 days period has already been over.
Just giving final touch..tomorrow you will get the article…..
Hiii
When I install cacti in centos 6.4
I faced lits of problem I m not able to install cacti in my server
Still I get error
Cannot retrieve repository expel and path incorrect plz give me any suggestion and resolve my problem as soon as possible
HI…After I navigate ipaddress/cacti/
I see this error
What should I do
Thanks for helping
FATAL: Cannot connect to MySQL server on ‘localhost’. Please make sure you have specified a valid MySQL database name in ‘include/config.php’
@Stella,
Please add the correct MySQL database settings in the cacti config file…
I have a query regarding cacti. Cacti is network monitoring tool. So I have installed it on centos-5-64bit server. Its working fine with localhost.
Now I have added another server in it. But graphs are not getting generated for it.
Is there any configuration required for the newly added server end? Like nagios, we have to setup client end.
The current 8.8b release has a broken graphs.php. It appears to have been broken fixing a security issue. You’ll hit it when you try to add a graph to a tree. this is the one you want to replace it with http://svn.cacti.net/viewvc/cacti/branches/0.8.8/graphs.php?view=markup&pathrev=7458
I somehow got my graphs to show, I’m not sure what made it show. I have updated the graphs.php as per the link afterwards but am not seeing any difference.
However, I still cannot get the timezone correct, it is still using UTC even though php.ini is set to a different timezone. My General information in Cacti is showing UTC time while date section shows default timezone as UTC and local/master value of date.timezone Asia/Hong_Kong
Data are not being recorded to the graph until the next day. The graph appears with NaN values until the next day. This is a test machine that is turned off daily. I’ve tried restarting and turning the machine off after adding a new device and graph and it always needs a night before values show. I’m not sure where to change the time or why it is taking so long for data to be valid on the graph.
@tzetuo,
Why not sync your localtime using NTP? here is the article, please go through it.
https://www.tecmint.com/install-ntp-server-in-centos/
I finally got it working. Thanks for all the help.
Hi, thanks for the how-to on getting cacti installed. I currently have it on Fedora 20 with cacti 0.8.8b. Having set the file to “Allow from all”, I’m still not able to access it from another computer using the IP/cacti. It is still giving me the “You don’t have permission to access /cacti on this server.”
I’m also having different time for my logs and graphs that is different from the system time. I have 11:30am on the system and the log would show 3:30am. Graph shows correct time on the axis but log time for “From date time to date time”.
Lastly, I’m having all my data show as nan. The “Log File” under utilities is green and doesn’t appear to be any error. The devices I’m testing with is a cisco swtich and a Windows 7 computer both using snmp. The device recognizes the information but yet I’m still getting nan.
Any idea on how to resolve this? Thank you!
@Cheung,
Are you able to access cacti interface from localhost? like http://localhost/cacti? If yes, then you must add your IP address from where you accessing it to the cacti.conf file and restart the apache service..
About logs timing, you need to check logs and cacti configuration files and specify time if there needed…
@Ravi,
Thanks for the reply, I am able to access the interface through localhost/cacti. I’ve tried using both allow from all and allow from the specific ip address, both will still not allow me to access through another computer. I’ve even tried turning the firewall off for testing.
My graphs are also still getting NaN instead of actual values.
Hi, sorry for my bad english.
Just want to ask how can i deal with this error
[root@cacti ~]# mysqladmin -u root password cacti
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)’
Check that mysqld is running and that the socket: ‘/var/lib/mysql/mysql.sock’ exists!
[root@cacti ~]# mysqldadmin -u root password cacti
bash: mysqldadmin: command not found
I’m just newbie in linux platform and I saw your website tutorial very useful. Hope you anyone can help me with this one.
Thanks in advance.
The error indicates that your mysqld service is not yet strated, you need to start or restart it using below command.
After restarting, run the following command to connect to mysql shell.
Hi, just want to ask if you know how to solve “Valiadation Error” whenever I tried to add device to a tree graph.
Thanks! :)
Dear Sir,
Please tell me that it will show system by system usages or a complete internet usages by network. and I want to some server status like apache, mysql, etc.
Thanks
Sandeep Rawat
Dear Sandeep,
Cacti tool has features to monitor everything which runs on network.
Hi done installation logged in ok. But when I want to add device I get “SNMP error” on the GUI and I have this error in the Cacti log
10/12/2014 12:19:51 PM – CMDPHP: Poller[0] WARNING: SNMP Get Timeout for Host:’41.87.1.11′, and OID:’.1.3.6.1.2.1.1.1.0′
will appreciate your help.
Hi, first of all i want to thank you for putting up this helpful tutorial and I really want you to know that your website really helped me a lot.
BTW, I just want to ask some questions about cacti. Whenever I tried to add a device to a custom Graph Tree it always throws an error “Validation Error”
Please help me :)
PS: If you can also put some tutorials how to add/configure device/monitor it and also the network basic and advance :) It will be an early birthday gift for me.
Thank you so much!
Hello Ravi, please share me a tutorial to setting snmpd in linux client for this cacti
Instructions alredy included in the article, please follow correctly…
Hi Ravi,
I have installed cacti successfully, while creating new graph getting below error from rrd. Please help
“rrd ERROR: opening ‘/usr/local/cacti/rra/test_pc_proc_33.rrd’: No such file or directory “
Hi Ravi,
excellent article, but after installation. I have no problem with the localhost graphs , but when i import hosttemplates liek apache. They are not showing data. connectivity is fine between cacti server and client. Even the selinux is disabled. The main problem is graphs showing no data, i suppose this is due to cacti unable to pull the data..any suggestions on this helps a lot. Thanks in advance
Hi, Tnx for tutorial,
How we can access cacti with domain name instead of IP address, like this:
domainname.com/cacti instead of IP-add/cacti?
Tnx!
If your domain is configured as top level domain under Apache, You can access cacti under it.
Hi All,
My cacti become a sometimes does not draw a traffic data on graphs.
And when I do restart the Server then it’s runs well and draws traffic data for a period of about 12 hours has been suspended from the drawing again and so.
Please advise
Hi All,
When i try to install this got this error. i am using CentOS 4 version.
yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-mysql
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.
Could you please suggest on this.
The error related to repo server or your network connection, try to run the following serious of command.
Hello Ravi,
Thanks a lot for the steps on Cacti installation.
I followed the same steps and successfully installed cacti, but i am unable to view the graphs. All my graphs shows me 0 load.
hi Ravi
I running on fedora 20, everything is fine, but i only can access the cacti using http://localhost/cacti. but when i use http://myIP/cacti, its forbidden with error ‘You don’t have permission to access /cacti on this server.’ i already add my IP in allow list as per below;
# httpd 2.2
Order Deny,Allow,
Deny from all
Allow from 192.168.0.0/24
i need to allow my LAN user to access the cacti.
Use online tools to get your IP address and add that IP in allow list, and then try to access the page.
Why runlevel 4 is used in /sbin/chkconfig –levels 345 httpd on ???
We got a support dep. that need to run the graf on a wall monitor without login… any ideas ?
installed cacti successfully but have one prob, inbound line is overshadowed by outbound, any idea on how they can be shown concurrently?
hiiii ravi sir ,
i install cacti ..for my mpls network router …i have to create monthly device availability report from cacti … how to create availability report …can u help me for that…
i install cacti on fedora 14 . install successfully . add 3 advices but status not changing. status showing unknown.
Hi Ravi,
I followed each and every step and installed successfully but I am unable to see any graphs, please help me.
Thanks,
KK.
Any errors your getting on the screen?
Pls. help, i follow everything but i’m not able to successfully work it out. if I type the address/cacti/install its only returning a blank page. I know that apache is working.. Thank you.
I am able to generate the graphs for localhost but we i try to create device for remote machine, i am getting the SMTP error.
Below are the cacti logs
CMDPHP: Poller[0] WARNING: SNMP Get Timeout for Host:’x.x.x.x’, and OID:’.1.3.6.1.2.1.1.3.0′
Please revert back asap
My graph are not loading.
Disable SELinux.
i got this error
Forbidden You don’t have permission to access /cacti on this server
plz help me
Please add your IP address in allow list.
yes i alredy add this line Allow from 10.30.25.0/24 in /etc/httpd/conf.d/cacti.conf
cacti server is not working. Forbidden You don’t have permission to access /cacti on this server this error
is resolve.
when i added other host, report on cacti “SNMP errors”
Hi, i want to add other host to monitor, please give me instruction !
Thanks !
Hi,
plz helpe me Forbidden
You don’t have permission to access /cacti/ on this server.
Apache/2.2.15 (CentOS) Server at 108.61.40.185 Port 80
http://108.61.40.185/cacti/
Please add your IP address in Allow list.
ok Allow list all but
this notload anything
http://108.61.40.185/cacti/
What error code you getting on the browser?
Error code does not have white screen
What’s your Apache error logs saying? have you checked?
Dear Ravi,
I have trouble with ICMP protocol, from the server can ping this device but from Cati, it show that can not ping ( ICMP ping Timed out ) when I choose ICMP at Ping method.
Ping Method
The type of ping packet to sent.
NOTE: ICMP on Linux/UNIX requires root privileges.
I dont know how to fix it, I set 777 permission at ( chmod 777 /usr/bin/php ) , ( chmod 777 /usr/share/cacti/ ) and stop IP tables.
Many thanks,
It’s something related to permission, you should follow the below guide at cacti forums.
http://forums.cacti.net/about15639.html
Hi,
You should edit this example of cron job
#*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
remove # sign in front
some people like me can just copy this as is and then will have troubles with device status unknown in cacti
Cheers.
There is an error
Getting 500:internal server Error any idea….
Did you made any changes to httpd.conf? What error_log saying, can you post here error messages, if any.
I am not able to post error log. I am getting error Page not found while I am posting error log
Hi Ravi,
SElinux disabled… found no any changes..
What should be done now..
Please help.
while doing tcpdum host MYIP(x.x.x.x).. i get only following message :
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
15:39:13.660448 IP 10.70.3.20.44770 > 10.3.0.253.snmp: GetRequest(28) system.sysDescr.0
15:39:13.663583 IP 10.3.0.253.snmp > 10.70.3.20.44770: GetResponse(185) system.sysDescr.0=[|snmp]
15:39:13.664026 IP 10.70.3.20.51972 > 10.3.0.253.snmp: GetRequest(28) system.sysUpTime.0
15:39:13.666679 IP 10.3.0.253.snmp > 10.70.3.20.51972: GetResponse(32) system.sysUpTime.0=813142904
15:39:13.666881 IP 10.70.3.20.41630 > 10.3.0.253.snmp: GetRequest(28) system.sysName.0
15:39:13.669512 IP 10.3.0.253.snmp > 10.70.3.20.41630: GetResponse(35) system.sysName.0=”KAT122B”
15:39:13.669662 IP 10.70.3.20.51272 > 10.3.0.253.snmp: GetRequest(28) system.sysLocation.0
15:39:13.672405 IP 10.3.0.253.snmp > 10.70.3.20.51272: GetResponse(81) system.sysLocation.0=[|snmp]
15:39:13.672607 IP 10.70.3.20.47664 > 10.3.0.253.snmp: GetRequest(28) system.sysContact.0
15:39:13.675827 IP 10.3.0.253.snmp > 10.70.3.20.47664: GetResponse(43) system.sysContact.0=[|snmp]
:::::::::::::::::::::::::
Only name , location , and other general information is being pulled..
what can i do..??
If possible, try to disable SELinux, then give a try.
I checked all the possible things related prob.. still couldn’t find any solution… I have configured all the steps and also able to browse cacti login page.. but no graph generated even for local host…
I tried to see the tcpdump of my host… was seen tht there is SNMP processing… but still unable to find graph..
Please help.
Hi Ravi,
Thanks for providing great article. I am trying to configure cacti on my localsystem , which have centos 6.4. After follow complet instruction, when i browse this, it’s showing blank page. I have added ip in conf file and also restart httpd service. But did not get sucess.
Can you please help me regarding this ?
Thanks,
Manoj
Hi..
I was able to install the cacti…but i cant get any graph now.. but the graph was bale to extract when i manually poll the data …
So please help me how to get graph for traffic and all in cacti..
Bikash.
HI i am new to rhel and was configuring Cacti.. but when i try to install the packages.. i get the follwing error;
[root@localhost ~]# yum install cacti
Setting up Install Process
No package cacti available.
Nothing to do
::::::::::::::::::::::::::::::::::::::;
[root@localhost ~]# yum install rrdtool
Setting up Install Process
No package rrdtool available.
Nothing to do
……………………………………
Please help
Hi,
Install EPEL Repository and update yum. After that it will be done.
Thanx very much. works well on centos 6.4 with epel. Thank you for the info
Hi everyone,
I’m struggling with the following error with my server…
can any one get me out of this issue.
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /usr/share/cacti/lib/adodb/adodb.inc.php on line 833
thank you… in advance…
Raghavendra Gujjar…
[email protected]
To fix this error, you need to increase the memory in your php.ini and restart the web server.
This error is displayed if you forget to load the initial database. I increased the memory up to 1G and still got the error. Once I loaded the /usr/share/doc/cacti/cacti.sql file into MySQL the error went away and the install page displayed.
Hi Ravi,
the error is gone but still not working i am get The website cannot display the page error 500
Thanks for help
:)
Hi Ravi,
Thanks for you post !!! i did all the stepes one by one and i got the next error
Starting httpd: httpd: apr_sockaddr_info_get() failed for Cacti
httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
Can you help with this error in addition I didn’t get the login screen.
Thanks
To fix this error, just open your /etc/hosts file and add correct machine hostname. To get machine hostname use command.
So, add correct hostname along with your IP address to your /etc/hosts file. Like
Restart Apache again. that’s it all set go.
I follow every step. But no images shows on the screen, even no warning, I wonder why?
Run poller.php from the terminal and wait for sometime and see.
Hi, is Cacti capable of monitoring storage? monitor your hard disk and it will send a email that if it is near full?
Yes, But you need to configure it.
Can you give a link or a tutorial on how am I going to configure. many thanks
I follow every step. But no images shows on the screen, even no warning, I wonder why?
[root@test ~]# yum install cacti
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: less.cogeco.net
* extras: less.cogeco.net
* updates: centos.bhs.mirrors.ovh.net
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package cacti available.
Nothing to do
[root@test ~]#
Which OS version you using?
centos 5.9
Centos 5.9 32bit
Please enable Epel repository and try to install again.
Hi Ravi,
Great instructions/notes.
I’ve gotten up to the point of running cacti in my browser – getting the ole 403 Forbidden message.
I’m running Fedora 18 in a VM. My host OS is Windows 7; and I’m running VirtualBox (in case this makes a difference)
Anyway, I’ve specified my guest/Fedora IP in …/cacti.conf; restarted httpd.service. I’ve changed it back to 127.0.0.1 and restarted httpd.service… I’m also running Firewall and selected http and https as trusted for the current zone and added 3306 to “ports”.
Still no luck. Iptables.service is not running.
Any suggestions?
-Rich
Can you able to browse http://localhost/cacti? What error you getting?
Forbidden
You don’t have permission to access /cacti on this server.
Forbidden
You do not have permission to access this server.
I’m running http 2.4.4-2
If I change cacti.conf to “Require all granted” (under httpd 2.4), I get a blank browser. I guess that’s some type of progress. I feel I’m missing something simple.
-Rich
Sir,
I have follow all steps but i am getting error
Forbidden
You don’t have permission to access /cacti on this server.
please help me
please reply in my email id
Please add correct IP address of your machine to “Allow” list of cacti.conf file.
Hi,
Do you know where to configure about email notifications? for example the system is up or down, you’ll be notified something like that.
thanks in advanced.
Great instructions. Finally was able to install and run Cacti on a CentOS linux box.
I ran into a problem when installing Cacti tables to MySQL.
I had to change the permissions on the cacti.sql file inorder to install the tables.
Other than that, this recipe works great.
Thanks for sharing.
Thanks Ravi for your excellent instructions …
I am still getting “FATAL: Cannot connect to MySQL server on ‘localhost’. Please make sure you have specified a valid MySQL database name in ‘include/config.php’ ”
I am sure i have configured db.php properly as per the right credentials…
—–
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cacti”;
$database_password = “titan#12”;
$database_port = “3306”;
$database_ssl = false;
Ravi, Please help me in this case…
Is MySQL service is started? and port is open on firewall? can you post the output of the following command.
Thank you Ravi for the prompt response.
Below is the output of the given command.
o/p: -bash: telnet: command not found
in my box , the db.php is residing in “/var/www/cacti”
Thanks in advance…
Gopi.
telnet package is not installed, install it tbis way.
And then again post the output command.
Yeah! i will try and update the status…
Thnx/Gopi
Ravi, installed telnet and below is the output…
——————————————————————
[root@XXXXXXXXX~]# telnet localhost 3306
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
4
5.0.95?.7i+:~/l,S=rLc/^m)!jrConnection closed by foreign host.
[root@sbcloudlymem02 ~]#
Below is the output after install
…….
[root@machineName ~]# yum install telnet
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.mirror.nac.net
* base: centos.mirror.nac.net
* extras: centos.vipernetworksystems.com
* rpmforge: mirror.hmc.edu
* updates: mirror.wiredtree.com
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package telnet.i386 1:0.17-41.el5 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
telnet i386 1:0.17-41.el5 base 57 k
Transaction Summary
================================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 57 k
Is this ok [y/N]: y
Downloading Packages:
telnet-0.17-41.el5.i386.rpm | 57 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : telnet 1/1
Installed:
telnet.i386 1:0.17-41.el5
Complete!
[root@machineName ~]# telnet localhost 3306
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
4
5.0.95?.7i+:~/l,S=rLc/^m)!jrConnection closed by foreign host.
[root@machineName ~]#
Everything seems to be fine, I don’t know why you getting such error. If you don’t mind can I have your server IP address to check from the browser. Or create a testdb.php file under your website root directory and add the following lines and replace MySQL settings as per your needs and browse the file and post the output.
Do You have any tutorial regarding on plugins, like the “monitor tab maybe”
thanks
No idea, can you tell us about it so we could think of creating an article on this.
Why this tutorial not including configure snmp for cacti. I think cacti is 100% useful if it configure using snmp for trap any statistic interface both from the host and remote host :)
Forbidden
You don’t have permission to access /cacti on this server.
Don’t Work
Hi,
All installed as per these excellent instructions however I do not get any graph images showing – just a broken link where the image should be showing.
It looks like a possible permissions issue but can not see where it could be. The yum install cacti placed the website directory structure /usr/share/cacti as with root permissions and everything else appears to work fine.
Cent OS 6.3 clean and minimal install then installed as per your instructions.
Any ideas?
Thanks
Andy
Hi Ravi,
Sorry about the first post, i have made corrections:
My cacti.conf looks like this:
Alias /cacti /var/www/html/cacti/
Order Deny,Allow
Deny from all
Allow from 172.227.244.21
but still:
Forbidden
You don’t have permission to access /cacti/ on this server.
Apache/2.2.3 (CentOS) Server at 172.227.244.21 Port 80
both mysqld and httpd services are running.
After making corrections, have you restarted Apache? If yes, then you must define proper IP address in Allow section. Have you tried from the localhost?
Yes i did the needful, both localhost and my IP are tripping. if i type my IP or localhost in the browser the apache test web page opens nicely.
Hi,
me too having same problem. tried using the ip and localhost both with no luck.restarted the HTTPD service too
Hi,
am getting an error on the web browser:
Forbidden
You don’t have permission to access /cacti/ on this server.
Apache/2.2.3 (CentOS) Server at 197.231.244.21 Port 80
My cacti.conf looks like this:
Alias /cacti /var/www/html/cacti/
Order Deny,Allow
Deny from all
Allow from 172.227.244.0/22
Check the IP address of your machine and add that IP in allow list and check again.
Thank so much
help me !
I don’n log on to Cacti
Asking questions are in fact nice thing if you are
not understanding anything fully, but this piece of writing presents nice understanding even.
Hey i’ve tried this 3 times, and each time Cacti works but no graphs show, like no image at all, not even a broken image link just no graph image, Any ideas?
Poller shows this when i run it:SYSTEM STATS: Time:0.5038 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:1 RRDsProcessed:0
Is there some permissions or something that needs to be set for this to work?
hello!
I configure httpd and mysql and cron but when i type in browser ,i just view a empty page
Hi,
even am facing the same problem ..
Hello,
I am facing the same problem
Have you solved it now?
Run the poller.php script to fix this issue.
Did nobody got this error message:
Error: Package: php-devel-5.3.3-14.el6_3.i686 (updates)
Requires: php = 5.3.3-14.el6_3
Installed: php-5.4.10-1.el6.remi.i686 (@remi)
php = 5.4.10-1.el6.remi
Available: php-5.3.3-3.el6_2.8.i686 (base)
php = 5.3.3-3.el6_2.8
Available: php-5.3.3-14.el6_3.i686 (updates)
php = 5.3.3-14.el6_3
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest
So I did, someone knows how to resolve this ?
Thanks
You have older version php which is conflicting with php 5.4, first remove the older php with the following commands.
and then try again…
Thanks Ravi for your quick response,
That is going well so far, but when I try to startup the cacti install webinterface I got the following error message:
FATAL: Cannot connect to MYsql server on myhostname, Please make sure you have specified a valid mysql databasename in ‘/include/config.php’
Please put correct database name, localhost and user details in config.php.
I am receiving the same error,
Fatal: Cannot connect to MySql Server on my hostname, Please make sure you have specified a valid mysql database name in ‘/include/config.php’
I understand I need to vi to config.php and apply the correct parameters; however can someone tell me where to find this file.
I assume it was under /var/www/html/cacti but the path mention is not a valid path
use the /etc/cacti/db.php file and add the correct mysql parameters.
Hi!
Please help me!
Alias /cacti /usr/share/cacti
# httpd 2.4
Require host localhost
# httpd 2.2
Order deny,allow
Deny from all
Allow from 172.16.16.0/20
in this section , when I restart apache it didn’t start and give me a error that Reqire or Order or Deny or Allow not allowed here
@safa,
The article is updated, please replace the old content in cacti.conf with updated one. It will work 100%
please use this default user name admin and password admin. it works
I have only two options regarding Graph types :
*Graph templated base
*Unix-Get mounted partitions
at the console, under management section, click devices. then click localhost. change host template from local linux machine to ucd/net snmp host. click save at the bottom of screen. only after that snmp – interface statistics option available.
Well, I did not notice the default ones
Thanks man :)
I have logged in
Ravi,its done,
I was using localhost/cacti so I changed to use my-local-IP/cacti and edited my proxy settings
1 more question for now
which username and password I must use
I have tried that this moment, but still the same error
is there any service that should be restarted upon this config ?
Abbas, restart httpd service like below.
Hey , Really great instruction installing cacti.However I am facing a little problem.
When I reach to the point of Running cacti installer set up I get the following error:
Forbidden
You don’t have permission to access /cacti on this server.
Apache/2.2.15 (CentOS) Server at localhost Port 80
P.S : I am new at unix
@Abbas,
Did you added Allow from 127.0.0.1 in /etc/httpd/conf.d/cacti.conf file to allow access to localhost?
After that, restart httpd service. It will fix the problem.
Can anyone help me in setting up a cacti for monitor only my network devices. Please if any one could be me with the commands and the interface also. Console screen
Thank you Very much . I have configured Cacti with out any error.
Hi,
I have installed cacti in CentOS. Currently, the installation was successful, but it is not allowing me to go to the next screen after login. After I give admin/admin, the page is getting refreshed and its not moving to the next screen, where we can see the “force password change” page. Please help in giving some solution to it.
@Venkat,
I think you have login session problem, set 777 writes to /tmp folder and /var/lib/php/session. it should work.
Hi Ravi excellent tutorial very good I came all excellent
ravi I have only one question?
What I have to use user and password for logging
please help I want to implement that service
in my work.
Thanks.
Att;
0mar.
[email protected]
my friend thanks I’ll try it and I confirm.
my friend nothing more I would like to do a how-to
openvpn with linux and windows clients interested me much
know how to configure it.
Thanks agains ….
My thanks everything ok the problem was me that not read good the document.
all ok.
thanks, my friend very very good good how to.
Dear Venkat,
Please give the new password and confirm password for cacti use.
Hope this will be solve your issue.
Thanks…….
Great Instructions!!!! Do you have anyting on adding plugins like routerconfigs or realtime
thanks for the tutorial bro ; )
Before step “Running Cacti Installer Setup” you need to open for HTTP in IPTABLES firewall….
nano /etc/sysconfig/iptables
Add the following:
-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
and restart IPTABLES:
service iptables restart