Thursday, November 24, 2011

Cacti > Cron

Been working with my cacti system for the past 5 days trying the cron to make it poll every 1 minute. My first step was changing the cacti settings at Console > Settings > Poller, setting the poller interval "Every Minute" and Cron Interval to "Every Minute".. but this doesn't work on Cacti 0.8.7g with Spine 0.8.7.

I've searched from cacti.net forum and other blogs to no avail. With all those research done on how to work with cron jobs, I managed to make my cacti system poll every minute through cron. So here is what I have done.

#crontab -e

Add this line on your crontab, this will schedule your poller.php to run every minute.

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

For any reason that when you typed 'crontab -e' and get an error like 'no crontab for root, just create a 'cron' folder on /var/spool and then repeat the 'crontab -e' procedure above. Upon exit, the crontab details will then saved on /var/spool/cron/root


My cacti is now polling every minute but the polling intervals on my graphs are still at 5 minutes. For now, I haven't found a solution yet on how to make the 1 minute data to reflect on my graphs.


No comments:

Post a Comment