Manual polling works, cron doesn't.

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

Moderators: Developers, Moderators

Post Reply
nexus
Posts: 14
Joined: Fri Feb 03, 2006 6:59 pm

Manual polling works, cron doesn't.

Post by nexus »

Okay weird one here. I've searched and searched and not found anything that answers this.


If I run php poller.php from the shell it runs fine, it shows the run in the log file and generates the graphs.

When cron runs the poller it runs fine, shows the run in the log, but doesnt update the graphs.

The poller is being run like clockwork and shows that it is running successfully in the logs both automatically and manually. It just doesnt generate any graphs when it runs on it's own. Any ideas?
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

When you run 'poller.php' are you running it as the same user that the cronjob is running as?

What does your cronjob look like?
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
nexus
Posts: 14
Joined: Fri Feb 03, 2006 6:59 pm

Post by nexus »

/etc/cron.d/cacti

*/5 * * * * cacti php /var/www/cacti/poller.php &>/dev/null



Runs fine as root. Runs fine as the cacti user.
nexus
Posts: 14
Joined: Fri Feb 03, 2006 6:59 pm

Post by nexus »

log is full of entries just like this one... no errors


02/04/2006 10:22:14 AM - SYSTEM STATS: Time:3.0977 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:45 RRDsProcessed:39
nexus
Posts: 14
Joined: Fri Feb 03, 2006 6:59 pm

Post by nexus »

I forced ownership of rra and it's contents to the cacti system user. This appears to given it the kick in the ass it needed. Most of the files there were owned by root. Just glad it's working now. I'm not going to ask too many questions. :)

It would be nice to have an option from the utility menu to check permissions on everything and let you know what is set correctly and what isnt. Would make like a lot easier for some folks I bet.
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

It is one of the steps in the documentation (#6): http://www.cacti.net/downloads/docs/htm ... _unix.html
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
nexus
Posts: 14
Joined: Fri Feb 03, 2006 6:59 pm

Post by nexus »

shame on me for forgetting never ever to trust a package install!!! :)
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

What distro? Which package? Maybe we can have it fixed...
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest