Cron out of sync with poller intervel

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Vivek
Posts: 12
Joined: Sun Apr 02, 2017 4:17 am

Cron out of sync with poller intervel

Post by Vivek »

POLLER: Poller[1] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 538.3 seconds have passed since the last poll!
2017-04-02 14:45:03 - SYSTEM STATS: Time:1.2247 Method:cmd.php Processes:1 Threads:N/A Hosts:6 HostsPerProcess:6 DataSources:14 RRDsProcessed:8
OK u:0.00 s:0.00 r:1.04
OK u:0.00 s:0.00 r:1.04
OK u:0.00 s:0.00 r:1.05
OK u:0.00 s:0.00 r:1.05
OK u:0.00 s:0.00 r:1.05
OK u:0.00 s:0.00 r:1.05
OK u:0.00 s:0.00 r:1.05
OK u:0.00 s:0.00 r:1.05


Please help with these error
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Cron out of sync with poller intervel

Post by cigamit »

Not enough info. Also it looks like you manually ran the poller?
Vivek
Posts: 12
Joined: Sun Apr 02, 2017 4:17 am

Re: Cron out of sync with poller intervel

Post by Vivek »

Actually the cacti version is 1.0.4
Its on centos 7

The problem is that the cron is not working..
It only executes the task after i manually run the php file, generating error like above

Also the main poller stays in idle state after i execute this command.. but after 300 seconds/next poll time the state goes to 'unknown'

Please help me with what to do
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Cron out of sync with poller intervel

Post by cigamit »

Please paste your crontab so we can troubleshoot it and state which file you are editing, and whether you are using "crontab -e" to do so.
Vivek
Posts: 12
Joined: Sun Apr 02, 2017 4:17 am

Re: Cron out of sync with poller intervel

Post by Vivek »

Hi

my crontab is as following

*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1


Also i dont use crontab -e to access it.

I use vi /etc/cron.d/cacti to access it.

Please help me out.
Vivek
Posts: 12
Joined: Sun Apr 02, 2017 4:17 am

Re: Cron out of sync with poller intervel

Post by Vivek »

Anyone please help for this .... Really stuck with why cron is out of sync with poller interval...
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Cron out of sync with poller intervel

Post by cigamit »

At this point it could still be lots of things. Do you have selinux running? Does the cacti user actually exist? Can the cacti user actually execute that command?
Vivek
Posts: 12
Joined: Sun Apr 02, 2017 4:17 am

Re: Cron out of sync with poller intervel

Post by Vivek »

selinux is running,
cacti user do exixt...


But how to verify is cacti user is able to execute the command?
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Cron out of sync with poller intervel

Post by cigamit »

First, try temporarily disabling selinux by running this command

Code: Select all

setenforce 0
and then see if the poller runs by itself.
You can try running the command as the cacti user like this

Code: Select all

su - cacti -c "/usr/bin/php /usr/share/cacti/poller.php"
pay attention to the "su - cacti" part, that dash needs to be right where it is and not -cacti
Vivek
Posts: 12
Joined: Sun Apr 02, 2017 4:17 am

Re: Cron out of sync with poller intervel

Post by Vivek »

I am not able to execute the php file by the following command


su - cacti -c "/usr/bin/php /usr/share/cacti/poller.php"

the error says
'This account is currently not available'

So where might be the issue ??
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Cron out of sync with poller intervel

Post by cigamit »

Change the cron to run as root instead of cacti and see if it runs then.
Vivek
Posts: 12
Joined: Sun Apr 02, 2017 4:17 am

Re: Cron out of sync with poller intervel

Post by Vivek »

For that i need to replace 'cacti' with 'root' in below crontab?

*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

Should i make it as


*/5 * * * * root /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
????
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Cron out of sync with poller intervel

Post by cigamit »

Honestly, I would delete that file completely, and then use
crontab -e
to add the crontab for root. When doing it that way, leave off the username like so
*/5 * * * * /usr/bin/php /usr/share/cacti/poller.php > /tmp/poller.log


then check the /tmp/poller.log file to see if it exists and what it contains
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests