Help: rra directory always empty

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

Moderators: Developers, Moderators

Post Reply
animous
Posts: 5
Joined: Tue May 16, 2006 9:53 pm

Help: rra directory always empty

Post by animous »

Hi,

I'm running gentoo, cacti-0.8.6h_p20060108, cactid, apache2, rrdtools, mysql, etc. Retrieving data through SNMP from an router running openwrt.

The poller I'm using is cactid. I've set its path in Settings/Paths and chosen it in Settings/Poller. If I run cactid manually from the command line there are no errors. I don't think it's being called from cacti though. If I go in the database, in poller_time I see entries for every time I call cactid manually (in poller_output also), but no other entries. I understand how poller.php gets called by crond when added to crontab, but how is cactid called? Should it also be in a cron job? The installation page says "After completing these steps, Cacti will spawn Cactid every 5 minutes".

My rra directory is always empty, so I never get any graphs. For debugging purposes I did a chmod a+w on the rra and log directories. I've set the logs to debug and there are no errors in cacti.log. BUT I can see that the "rrd create" command is never called. If I go to Data sources and click on debug mode, I see the "rrd create" command that is supposed to be run. If I run this command manually, the file is created and there are no errors.

I can post logs if needed. Thanks!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Help: rra directory always empty

Post by gandalf »

animous wrote:I understand how poller.php gets called by crond when added to crontab, but how is cactid called?
There is an option under Settings->Poller that switches between cmd.php or cactid.
Please run the php poller.php manually to check this
Reinhard
Last edited by gandalf on Thu May 18, 2006 9:33 am, edited 1 time in total.
animous
Posts: 5
Joined: Tue May 16, 2006 9:53 pm

Post by animous »

Thanks for your answer. Yes, I know there is an option under Settings/Poller that switches between cactid; like I said in my original post, I set it to cactid but cactid never seems to be called. Any idea why?

I called php poller.php manually and I just got more errors. It did a bunch of rrdtool create, but the files were created in /usr/share/webapps/cacti/0.8.6h_p20060108/htdocs/rra. Subsequent commands tried to rrdtool update the same files that were created, but using a path of /var/www/localhost/htdocs/cacti/rra which of course fails because the files don't exist there.

What am I doing wrong?
animous
Posts: 5
Joined: Tue May 16, 2006 9:53 pm

Post by animous »

Here are some logs, hoping it might help diagnose the problem.
Attachments
cacti.log.zip
(8.57 KiB) Downloaded 52 times
animous
Posts: 5
Joined: Tue May 16, 2006 9:53 pm

Post by animous »

Ok the problem when I called poller.php was that I was calling it from where it was installed (/usr/share/webapps/cacti/0.8.6h_p20060108/htdocs). If I call it from /var/www/localhost/htdocs/cacti then the files are created there.

Now I just need the cron job to work.

I still don't understand why cactid didn't work.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

animous wrote:Ok the problem when I called poller.php was that I was calling it from where it was installed (/usr/share/webapps/cacti/0.8.6h_p20060108/htdocs). If I call it from /var/www/localhost/htdocs/cacti then the files are created there.

Now I just need the cron job to work.

I still don't understand why cactid didn't work.
It seems, you've scrambled you paths. Please check the Settings table for paths. cacti build its own path for the ./rra directory from the base installation path. Seems this is going weird.
The debug log contains data about graphing only, no polling inside, so useless
Reinhard
animous
Posts: 5
Joined: Tue May 16, 2006 9:53 pm

Post by animous »

Hi,

Just want to follow up and say I got things working with poller.php (didn't bother trying to get cactid working) a few days ago.

When gentoo installs cacti, it installs it in /usr/share/webapps/cacti/0.8.6h_p20060108, however there is also a copy created in /var/www/localhost/htdocs/cacti. The latter is the one that is really used.

To get poller.php to work, I had to figure out vixie-cron. Here's a rough list of the steps I did:
* add apache2 and mysql to /etc/make.conf
* add dev-lang/php cli session to /etc/portage/package.use
cli: builds & installs /usr/bin/php
session: needed by cacti
* emerge cacti
* vi /etc/conf.d/apache2
make sure APACHE2_OPTS contains -D PHP5
this enables the php module
* /etc/init.d/apache2 start
/etc/init.d/mysql start
* go to localhost/cacti
* add to /etc/shadow
apache:*:9797:0:::::
* add apache to /etc/cron.allow
* as root #crontab -u apache -e
add */5 * * * * /usr/bin/php /var/www/localhost/htdocs/cacti/poller.php
* /etc/init.d/vixie-cron start

Hope this helps someone and saves them the bunch of time I spent figuring all this out! :)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post this to the gentoo packagers as well
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests