RRDTool cacti problem
Hey guys, i've tried to spare you by posting to the cacti forums about this but they don't seem to reply so here goes:
I have cacti up and running on my ubuntu server rc 6.06 with Apache/2.0.55 (Ubuntu) PHP/5.1.2 mod_ssl/2.0.55 OpenSSL/0.9.8a. If it's of any importance it is the .tar.gz that i have installeb becouse with 'apt-get install cacti' it instals cacti on php4 and i's giving me some bad errors. So cacti is now installed and i've created a new device and some graphics for it, but i can only see the name of the graphic as seen in the picture below. The host is a generic snmp host, i have instaleed 'snmpd' on the linux machine and the snmp is running. I have up and running 'rrdtool', the path in cacti for rrdtool is correct but i get this error: RRDTool Command:GRAPH ACCESS DENIEDRRDTool Says:GRAPH ACCESS DENIED What is the problem? Thanks. http://img220.imageshack.us/img220/7886/cactiav5.jpg |
sounds like a file system permissions issue. i would assume that the cacti daemon is running as the "cacti" user so the location where the RRD's are meant to be being written to needs to be either owned by the cacti user or set with sufficiently broad permissions so as to allow them to write to it. concentrate on the former method, maybe using the chown tool to change the ownership of the directory, or possibly changing the location to a more suitable one if that was an option during configuration. it seems strange that this error would occur after a formal installation process so i'd wonder if this location was changed somehow.
|
The location is '/usr/bin' the file has the same owner as the cacti database, root. The chmod is read write execute for owner, and read and execute for the others. I can't think of any location change, beside that cacti has a 'path' option and the location of 'rrdtool' is se properly.
Oh, and i've done mysql> GRANT ALL ON cacti.* TO root@localhost IDENTIFIED BY 'pass'; |
no i mean the actual destination directory for the data files, not the rrdtool binary itself, e.g. /var/local/cacti/rrd or something.
|
On slocate: rrdtool. I get:
/usr/share/doc/rrdtool/ /usr/share/rrdtool which one ? |
On my machine (Debian Sarge), the rrd data is stored in /var/lib/cacti/rra.
There is one file for each data source, and "ls -l" gives: Code:
-rw-r--r-- 1 www-data www-data 47836 2006-10-10 21:20 localhost_mem_buffers_3.rrd The directory /var/lib/cacti/rra is owned by the user that runs the cronjob to update the database, in my case admin. This directory has permissions of "rwxrwxrwx". (I know this is probably bad, but it works :)) I seem to remember that the ownership / permissions of this directory were a problem when I installed cacti. Unfortunately, it was a long time ago that I setup cacti, so I can't remember much more than that :) I hope this helps --Ian |
There's my problem right there. in the /cacti/rra folder i have only this:
Code:
drwxr-xr-x 2 root root 4096 2006-10-10 09:34 . Code:
drwxr-xr-x 3 root root 4096 2006-10-10 12:18 rrdtool |
As I said, my memory is a bit rusty, but try running:
Code:
/usr/share/cacti/site/poller.php Code:
*/5 * * * * admin /usr/share/cacti/site/poller.php > /dev/null 2>&1 I hope this helps --Ian |
Sure was helpful to run poller.php. First of all the file didn't have the 'x' flag on even for the owner, i had to chmod it. Then i run the script and it gave me this error:
Code:
Fatal error: Call to undefined function: mysql_pconnect() in /var/www/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 356 If you need to know i use PHP5, and in php.ini i have: Code:
; Allow or prevent persistent links. Code:
Active Persistent Links 0 |
All times are GMT -5. The time now is 01:05 PM. |