Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've recently installed cacti on my virtual server (media temple (dv)).

Everything seems to work except I cannot see any graphs. In addition, the cacti log file directory is "Not Found".

The value set in Cacti for the log file is: /usr/share/cacti/log/cacti.log

This file exists, but perhaps it is not accessible by Apache?

Would this be the cause of my lack of graphs in Cacti, and if so, how do I enable the apache user to have access to the above file so that I do not get this error?


Edit: Fixed the broken images issue by doing the following:

ln -s /usr/bin/perl /perl
ln -s /usr/bin/rrdtool /rrdtool

Think this is necessary due to Plesk. There is NaN data in them, but at least they work.

share|improve this question

1 Answer 1

Cacti requires some extra love, specially for the rrds.

Make sure that all the cacti files are owned by the apache user, you can easily do that by executing the following command

chown -R apache:apache CACTIDIRECTORY

In case you want a more fine tuned approach, just make sure that the directory "rra", "scripts" and the directory "log" belong to the apache user.

Also in order to populate the graphs you need to have a cron running every X minutes (by default it's 5 minutes), make sure that cacti has installed this cron under /etc/cron.d otherwise check /var/log/cron.log (or equivalent) to see that this process is running, you can diagnose the process by executing the following on the command prompt

su - apache -c "php /PATH_TO_POLLER/poller.php"

Executing this manually will show any kind of problems that cacti may have writing its information

share|improve this answer
Thanks for this. I did the chown, however now Cacti is completely broken. It now states it cannot connect to my database: "FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'" ... I have readded the mysql user that is specified in the config.php to mysql, but nothing...? –  mootymoots Jan 22 '11 at 11:54
I have also just accessed mysql over SSH with the credentials in config.php and it accessed fine? –  mootymoots Jan 22 '11 at 12:00
So I've fixed the database error by changing the chown to: chown -R root:apache CACTIDIRECTORY - still no graphs though. –  mootymoots Jan 22 '11 at 12:22
This sounds extremely suspicious... cacti should be able to connect to the database even if the files are owned by apache, check the permissions and also please, run the rest of diagnostics I suggested you in order to see where's the issue –  lynxman Jan 22 '11 at 21:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.