Why poller.php don't run !
Moderators: Developers, Moderators
Why poller.php don't run !
Hi !
I have a problem with crontab
after i add :
*/2 * * * * cactiuser php /var/www/html/cacti/poller.php /dev/null 2>&1
No polling is excuted
However if I take from CLI such as :
[root@anh cacti]# php poller.php
05/19/2008 05:42:36 PM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '60' seconds, with a maximum of a '300' second Cron, but 603 seconds have passed since the last poll!
OK u:0.00 s:0.03 r:3.10
OK u:0.00 s:0.03 r:3.11
OK u:0.00 s:0.03 r:3.11
OK u:0.00 s:0.03 r:3.11
OK u:0.00 s:0.04 r:3.11
OK u:0.00 s:0.04 r:3.11
OK u:0.00 s:0.04 r:3.11
05/19/2008 05:42:41 PM - SYSTEM STATS: Time:4.9390 Method:cmd.php Processes:10 Threads:N/A Hosts:3 HostsPerProcess:1 DataSources:11 RRDsProcessed:8
OK u:0.00 s:0.04 r:4.13
-> Nothing is seemed to wrong with php or poller.php .
I don't understand what happend to Crontabs ?and result of that my cacti log is only line : 05/19/2008 05:34:21 PM - WEBUI: Cacti Log Cleared from Web Management Interface
Have any ideas help me ?
thanks alot
I have a problem with crontab
after i add :
*/2 * * * * cactiuser php /var/www/html/cacti/poller.php /dev/null 2>&1
No polling is excuted
However if I take from CLI such as :
[root@anh cacti]# php poller.php
05/19/2008 05:42:36 PM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '60' seconds, with a maximum of a '300' second Cron, but 603 seconds have passed since the last poll!
OK u:0.00 s:0.03 r:3.10
OK u:0.00 s:0.03 r:3.11
OK u:0.00 s:0.03 r:3.11
OK u:0.00 s:0.03 r:3.11
OK u:0.00 s:0.04 r:3.11
OK u:0.00 s:0.04 r:3.11
OK u:0.00 s:0.04 r:3.11
05/19/2008 05:42:41 PM - SYSTEM STATS: Time:4.9390 Method:cmd.php Processes:10 Threads:N/A Hosts:3 HostsPerProcess:1 DataSources:11 RRDsProcessed:8
OK u:0.00 s:0.04 r:4.13
-> Nothing is seemed to wrong with php or poller.php .
I don't understand what happend to Crontabs ?and result of that my cacti log is only line : 05/19/2008 05:34:21 PM - WEBUI: Cacti Log Cleared from Web Management Interface
Have any ideas help me ?
thanks alot
Re: Why poller.php don't run !
Correct crontab entry must be avpnnav wrote:Hi !
I have a problem with crontab
after i add :
*/2 * * * * cactiuser php /var/www/html/cacti/poller.php /dev/null 2>&1
No polling is excuted
However if I take from CLI such as :
[root@anh cacti]# php poller.php
05/19/2008 05:42:36 PM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '60' seconds, with a maximum of a '300' second Cron, but 603 seconds have passed since the last poll!
OK u:0.00 s:0.03 r:3.10
OK u:0.00 s:0.03 r:3.11
OK u:0.00 s:0.03 r:3.11
OK u:0.00 s:0.03 r:3.11
OK u:0.00 s:0.04 r:3.11
OK u:0.00 s:0.04 r:3.11
OK u:0.00 s:0.04 r:3.11
05/19/2008 05:42:41 PM - SYSTEM STATS: Time:4.9390 Method:cmd.php Processes:10 Threads:N/A Hosts:3 HostsPerProcess:1 DataSources:11 RRDsProcessed:8
OK u:0.00 s:0.04 r:4.13
-> Nothing is seemed to wrong with php or poller.php .
I don't understand what happend to Crontabs ?and result of that my cacti log is only line : 05/19/2008 05:34:21 PM - WEBUI: Cacti Log Cleared from Web Management Interface
Have any ideas help me ?
thanks alot
Code: Select all
*/2 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
Alex.
Hello All,
I got the same exact problem... poller.php is not populating the data. If I run "php -f poller.php" from the CLI it runs fine but it looks like it doesn't run from the cronjob while syslog logs that cronjob was executed but no graph is populated with data.
I am running Ubuntu 8.04 LTS, apache2, php5, mysql5, cacti-spine-0.8.7a, cacti-0.8.7b, rrdtool-1.2.27 and its a fresh installation.
Any idea?
Cheers,
Neel
I got the same exact problem... poller.php is not populating the data. If I run "php -f poller.php" from the CLI it runs fine but it looks like it doesn't run from the cronjob while syslog logs that cronjob was executed but no graph is populated with data.
Code: Select all
May 21 15:32:01 spike /USR/SBIN/CRON[15859]: (root) CMD (cactiuser php /var/www/cacti/poller.php > /dev/null 2>&1)
Any idea?
Cheers,
Neel
Attached is the DEBUG log while running poller.php from the CLI. Hope if someone can figure out this problem...
Cheers,
Neel
Cheers,
Neel
- Attachments
-
- poller_debug_log.txt
- poller.php debug log while ran from CLI
- (11.12 KiB) Downloaded 249 times
Thanks for your reply...
But this is where I got confused... The installation guide said to run the cronjob as user "cactiuser" but it does not say anywhere if we have to create a local system user as "cactiuser". We did create one user but thats for MySQL DB...
So the question is do we have to create a local system user as "cactiuser" and run the cronjob as "cactiuser" and not as "root"? If so, do we have to change the permission also on "poller.php" to "cactiuser"?
Cheers,
Neel
But this is where I got confused... The installation guide said to run the cronjob as user "cactiuser" but it does not say anywhere if we have to create a local system user as "cactiuser". We did create one user but thats for MySQL DB...
So the question is do we have to create a local system user as "cactiuser" and run the cronjob as "cactiuser" and not as "root"? If so, do we have to change the permission also on "poller.php" to "cactiuser"?
Cheers,
Neel
You do have to create or use a valid user name. The instructions don't go though the step of creating an account, but do specify to use a valid one.
Code: Select all
Set the appropriate permissions on cacti's directories for graph/log generation. You should execute these commands from inside cacti's directory to change the permissions.
shell> chown -R cactiuser rra/ log/
(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)
Who is online
Users browsing this forum: No registered users and 3 guests