Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Installation on FreeBSD, graphs are drawn ... but empty...

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific
Author Message
jvanhambelgium



Joined: 10 Jan 2003
Posts: 33
Location: Antwerpen (Belgium)

PostPosted: Sun Jan 12, 2003 2:52 pm    Post subject: Installation on FreeBSD, graphs are drawn ... but empty... Reply with quote

Hi,

I've taken my FreeBSD devil and installed all components that are required for the CACTI to operate ; no probs
btw, GREAT front-end for the RRDTOOL Ian, this is really one of the best I have ever seen !!!

My installation seems to work, but I've made a very simple test with a ping to my local router and measure respons. The graph is drawn but no graphics representation occurs ;

1) When checking from the Cacti menu "Cron Printout" and I select "Show Output" I get returned

perl /www/htdocs/cacti/scripts/ping.pl 172.29.45.129 1.584
This looks good 1.5ms RTT

2) Cron is working correctly, with only the "ping" datasource active I don't see any errors on my error_log of Apache on /www/logs/access_log

Jan 12 13:05:00 devil /usr/sbin/cron[7492]: ( root ) CMD ( /usr/local/bin/php /www/htdocs/cacti/cmd.php > /dev/null 2 > & 1 )
(I'm running that crontab as root)

What more is required ? If I change parameters on the graphs like Y-axis or scaling everything is displayed on the fly.

Also I'm not certain about MySQL in the picture ... are the results of such "ping" scripts inserted in the database ?? When I do a tail -f of rrd.log I don't see "update" entries every 5 minutes ... should I or is the data going straight into my CACTI MySQL database ?

There seem no problems with the data-sources, all exist, permissions are OK, no errors on access_log/rrd.log etc.

Any clue guys ? something that pops into your minds ?



Best regards,
Jan
Back to top
jvanhambelgium



Joined: 10 Jan 2003
Posts: 33
Location: Antwerpen (Belgium)

PostPosted: Mon Jan 13, 2003 2:05 pm    Post subject: Follow-up on my issue Reply with quote

Hi,

Aaarrcchh, after some mangling with path something is cooking, but I still seem to experience 1 issue I cannot explain ;

1) When doing a manual execute (as root) from the script cmd.php I clearly see "something" is updated on my 2 RRD's with values that seem to resemble "ping" times to my WLAN PC and my router

devil# tail -f rrd.log

01/13/2003 12:21 PM - CMD: /usr/local/rrdtool-1.0.40/bin/rrdtool update /www/htdocs/cacti/rra/pingwlan.rrd --template pingwlan N:2.089
01/13/2003 12:21 PM - CMD: /usr/local/rrdtool-1.0.40/bin/rrdtool update /www/htdocs/cacti/rra/pingrouter.rrd --template pingrouter N:2.043


2) However, when running exactly the same command from cron, even as the same user, nothing is updated ?!
Why is this, I haven't got a clue ....

I have read some postings on CRON beeing picky about the directory it is running in, so the actual script that is called upon is called "poll.sh" and what is on poll.sh ?

devil# more /www/htdocs/cacti/poll.sh
cd /www/htdocs/cacti
php cmd.php

So, apach is running under "nobody" , mysql is running under root I guess
cron is running under root, all directories have a full permissions for everyone...but still...cron is not doing what is it supposed do...

Cron seems to work ; (scheduled each minute)

devil# pwd
/www/htdocs/cacti
devil# tail -f /var/log/cron

Jan 13 12:25:00 devil /usr/sbin/cron[3394]: (root) CMD (/www/htdocs/cacti/poll.sh)
Jan 13 12:26:00 devil /usr/sbin/cron[3402]: (root) CMD (/www/htdocs/cacti/poll.sh)
Jan 13 12:27:00 devil /usr/sbin/cron[3410]: (root) CMD (/www/htdocs/cacti/poll.sh)
Jan 13 12:28:00 devil /usr/sbin/cron[3420]: (root) CMD (/www/htdocs/cacti/poll.sh)
Jan 13 12:29:00 devil /usr/sbin/cron[3430]: (root) CMD (/www/htdocs/cacti/poll.sh)
Jan 13 12:30:00 devil /usr/sbin/cron[3444]: (root) CMD (/www/htdocs/cacti/poll.sh)


I don't get any errors for output, just values as 'updated' when executing manually...

Jeezes, since I'm not that much working on UNIX I don't see a logical explanation ?! Some bright mind ?

Regards,
JAn
Back to top
ACIS



Joined: 15 Jan 2003
Posts: 2
Location: Riga (Latvia)

PostPosted: Wed Jan 15, 2003 4:17 am    Post subject: Just the same problem Reply with quote

I'd noticed one thing:
when I manualy run command
"php /u01/app/apache2/htdocs/cacti/cmd.php "
from php /u01/app/apache2/htdocs/cacti/ directory
I can see in rrd.log something like:
"01/15/2003 12:11 PM - CMD: /u01/app/rrdtool/bin/rrdtool update /u01/app/apache2/htdocs/cacti/rra/oracle_procss_rrd.rrd --template oracle_procss_rrd N:131"

but when I run just the same from other directory
I have long error output with messages like:
"Warning: rrdtool_function_create(include/config.php) [http://www.php.net/function.rrdtool-function-create]: failed to create stream: No such file or directory in /u01/app/apache2/htdocs/cacti/include/rrd_functions.php on line 86

Warning: rrdtool_function_create() [http://www.php.net/function.rrdtool-function-create]: Failed opening 'include/config.php' for inclusion (include_path='.:/usr/local/lib/php') in /u01/app/apache2/htdocs/cacti/include/rrd_functions.php on line 86

Warning: rrdtool_function_create(include/functions.php) [http://www.php.net/function.rrdtool-function-create]: failed to create stream: No such file or directory in /u01/app/apache2/htdocs/cacti/include/rrd_functions.php on line 87

Warning: rrdtool_function_create() [http://www.php.net/function.rrdtool-function-create]: Failed opening 'include/functions.php' for inclusion (include_path='.:/usr/local/lib/php') in /u01/app/apache2/htdocs/cacti/include/rrd_functions.php on line 87

Warning: rrdtool_function_create(include/database.php) [http://www.php.net/function.rrdtool-function-create]: failed to create stream: No such file or directory in /u01/app/apache2/htdocs/cacti/include/rrd_functions.php on line 88
....."

something wrong inside this script with path mapping in "include/database.php" and others "include.."

Please, get me know if you got some solution

P.S. Platform: SunOS herbe 5.8 Generic_108528-15 sun4u sparc SUNW,Sun-Fire-280R
#
Back to top
ACIS



Joined: 15 Jan 2003
Posts: 2
Location: Riga (Latvia)

PostPosted: Wed Jan 15, 2003 5:09 am    Post subject: write your own script Reply with quote

to solve the case described I'd just wrote script run_cmd.sh and call it from crontab instead of cmd.php

#
# set environment variables (call script with PATH and other definition)
. /u01/app/set_inst
# go to cacti root
cd /u01/app/apache2/htdocs/cacti
# call original sript
php /u01/app/apache2/htdocs/cacti/cmd.php

# end of file

now I have normal output in rrd.log, but something wrong was happened with graphs yesterday while I investigated settings. Now I see "X" with "cacti/rrdtool graph" text ,
but it's out of this topic

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group