Can't get it to show graphs on Debian Sarge

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Dawn
Posts: 5
Joined: Tue Jan 24, 2006 9:45 am

Can't get it to show graphs on Debian Sarge

Post by Dawn »

Hi,

I've searched around for days to get it to work on my debian sarge system. I also read a lot of howtos, searched trough the forums here and I allways have the same problem: No graph's are showing...

To be sure that I do everything correct I used in my last try the instructions from http://www.cacti.net/downloads/docs/htm ... _unix.html.

In the instructions there is no description how to create the user which runs the poller.php-script. I did it in the following way:

Code: Select all

adduser --system --no-create-home cacti
As I said, everything should work as I see except displaying the graphs :(

safe_mode is turned off. The directories log and rra are owned by cacti. The other files are owned by user:users (can that be the problem?).

Debug of Memory Usage:

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1138027054 \
--end=1138113454 \
--title="Localhost - Memory Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2006/01/23 15:37:34 To 2006/01/24 15:37:34\c" \
COMMENT:"  \n" \
--vertical-label="kilobytes" \
DEF:a="/var/www/vhosts/default/httpsdocs/cacti/rra/localhost_mem_buffers_3.rrd":mem_buffers:AVERAGE \
DEF:b="/var/www/vhosts/default/httpsdocs/cacti/rra/localhost_mem_swap_4.rrd":mem_swap:AVERAGE \
AREA:a#FF4105:"Free"  \
GPRINT:a:LAST:"Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"  \
STACK:b#FFC73B:"Swap"  \
GPRINT:b:LAST:"Current\:%8.2lf %s"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s
During the installation, the script told me that it doesn't found the needed tools and I had to adapt the paths values for the tools by searching for them with

Code: Select all

whereis [toolname]
.

When I run poller.php manually via shell I get the following error-message:

Code: Select all

/var/www/vhosts/default/httpsdocs/cacti# php poller.php

Fatal error: Call to undefined function:  mysql_pconnect() in /var/www/vhosts/default/httpsdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 356
That isn't true because otherwise I wouldn't can login to cacti. And I double checked it via login with the created user via phpmyadmin.

At my first try to install cacti, I tried it via apt-get. During the installation I got a information message:
Warning: include path for php has changed!

libphp-adodb isn't longer installed in /usr/lib/adodb. New installation path is now /usr/share/adodb.

Please update your php.ini file. Maybe you must also change your web-server configuration for this.
I've searched in /etc/php4/apache2/php.ini for adodb but I couldn't find anything. Can that be a part of the problem?

It would be nice if anybody can help me or is it impossible to use cacti (which looks very nice) on a debian sarge system?

Greets and THX,
Dawn

PS: I'm using the latest version of cacti: 0.8.6h
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You will need to install php-snmp, php-mysql, php session support (php-ldap if you want to use ldap based auth)
Reinhard
Dawn
Posts: 5
Joined: Tue Jan 24, 2006 9:45 am

Post by Dawn »

As you can see I've got php-snmp, php-mysql and session support installed:

Code: Select all

# dpkg -l php4*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  php4           4.3.10-16      server-side, HTML-embedded scripting-languag
ii  php4-cli       4.3.10-16      command-line interpreter for the php4 script
ii  php4-common    4.3.10-16      Common files for packages built from the php
ii  php4-curl      4.3.10-16      CURL module for php4
ii  php4-domxml    4.3.10-16      XMLv2 module for php4
ii  php4-gd        4.3.10-16      GD module for php4
ii  php4-imap      4.3.10-16      IMAP module for php4
ii  php4-mysql     4.3.10-16      MySQL module for php4
ii  php4-snmp      4.3.10-16      SNMP module for php4
PHP-Info: https://ndsrootie.kicks-ass.net/cacti/phpinfo.php

Any other ideas?
Dawn
Posts: 5
Joined: Tue Jan 24, 2006 9:45 am

Post by Dawn »

Is it perhaps possible to set special rights for /usr/bin/snmpwalk, /usr/bin/snmpget, /usr/bin/snmpbulkwalk, /usr/bin/snmpgetnext, /usr/bin/rrdtool? I don't think that I've to set special rights for /usr/bin/php
Dawn
Posts: 5
Joined: Tue Jan 24, 2006 9:45 am

Post by Dawn »

Jipiiiii it works :)

I found the problem:
I had to run: dpkg-reconfigure php4-mysql as root and then select Yes to the "Should MySQL be added to /etc/php4/(cli|cgi)/php.ini? "

I hope that helps others like me :)

Greets and THX for all who helped me,
Dawn

PS: Does anyone know whats the best way to include cactid with a non apt-get installation?
cafeschintze
Posts: 1
Joined: Wed Feb 01, 2006 6:49 pm

Post by cafeschintze »

Great! It just helped me on my Debian system. Thank you!
leibniz
Posts: 1
Joined: Sun Feb 05, 2006 3:05 pm
Location: Regina, Canada

Post by leibniz »

Nice find, Dawn!

It also fixed my cacti graph problem. Was missing the mysql module in /etc/php4/cli/php.ini (was in /etc/php4/apache2/php.ini)

Thanks for posting the fix!
aleks
Posts: 1
Joined: Mon Feb 13, 2006 4:30 am
Contact:

Post by aleks »

thank you very much!

it helped me to address this issue on debian :)
brearick
Posts: 1
Joined: Fri Jun 30, 2006 11:36 am

Post by brearick »

Thanks! This also helped with my installation.
- Bryan
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests