LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-10-2006, 06:07 AM   #1
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Rep: Reputation: 15
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
 
Old 10-10-2006, 06:53 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 10-10-2006, 07:07 AM   #3
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Original Poster
Rep: Reputation: 15
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';

Last edited by Braynid; 10-10-2006 at 07:14 AM.
 
Old 10-10-2006, 07:46 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
no i mean the actual destination directory for the data files, not the rrdtool binary itself, e.g. /var/local/cacti/rrd or something.
 
Old 10-10-2006, 08:00 AM   #5
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Original Poster
Rep: Reputation: 15
On slocate: rrdtool. I get:
/usr/share/doc/rrdtool/
/usr/share/rrdtool

which one ?
 
Old 10-10-2006, 09:43 AM   #6
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
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
As you can see, www-data has read and write access, and everyone else has only read access.

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
 
Old 10-10-2006, 04:09 PM   #7
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Original Poster
Rep: Reputation: 15
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 .
drwxr-xr-x 11 root root 4096 2006-10-10 11:43 ..
-rw-r--r--  1 root root    0 2006-10-10 09:34 .placeholder
The folder /usr/share/rrdtool has the following configuration:
Code:
drwxr-xr-x   3 root root  4096 2006-10-10 12:18 rrdtool
Root is also my cacti user...
 
Old 10-10-2006, 10:29 PM   #8
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
As I said, my memory is a bit rusty, but try running:
Code:
/usr/share/cacti/site/poller.php
That script may be somewhere else on your machine. See if it throws any errors. Make sure that that command is being run every five minutes by cron. In /etc/crontab:
Code:
*/5 * * * *     admin   /usr/share/cacti/site/poller.php > /dev/null 2>&1
Where admin is the user to run that script.

I hope this helps
--Ian
 
Old 10-11-2006, 01:20 AM   #9
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Original Poster
Rep: Reputation: 15
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
I will try to google it some more.
If you need to know i use PHP5, and in php.ini i have:

Code:
; Allow or prevent persistent links.
mysql.allow_persistent = On
As for compatibylity with mysql i have this (displayed with phpinfo() ):
Code:
Active Persistent Links 	0 
Active Links 	                0 
Client API version 	        5.0.22 
MYSQL_MODULE_TYPE 	        external 
MYSQL_SOCKET 	                /var/run/mysqld/mysqld.sock 
MYSQL_INCLUDE 	                -I/usr/include/mysql 
MYSQL_LIBS 	                -L/usr/lib -lmysqlclient

Last edited by Braynid; 10-11-2006 at 01:57 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cacti Problem mblames Fedora 3 08-20-2007 05:42 AM
Cacti problem #2 Braynid Linux - Newbie 2 10-05-2006 11:32 AM
Another cacti problem Braynid Linux - Newbie 8 10-05-2006 07:35 AM
Problem with cacti. ARCIS_house Linux - Newbie 1 05-26-2006 03:20 AM
raxnet cacti madhaquer Slackware 1 11-10-2003 02:33 PM


All times are GMT -5. The time now is 11:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration