Crontab and poller intervals

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

Moderators: Developers, Moderators

Post Reply
sergani
Posts: 24
Joined: Sun Sep 18, 2011 3:49 am
Location: Cairo, Egypt

Crontab and poller intervals

Post by sergani »

Hi all,

I'm using Cacti on a CentOS 5 machine, where I set the crontab line to 5 minutes, and the poller inside Cacti to 30 seconds.
When I run a trace on the network interface, I get snmp polls every 5 minutes, not 30 seconds.

What am I missing here, or got wrong?
sergani
Posts: 24
Joined: Sun Sep 18, 2011 3:49 am
Location: Cairo, Egypt

Re: Crontab and poller intervals

Post by sergani »

Guys, any help please?

Thanks..
//M
Sander88
Posts: 5
Joined: Tue Sep 27, 2011 2:42 am

Re: Crontab and poller intervals

Post by Sander88 »

Hi sergani,

Cacti collects the data from the devices when the poller.php script is being called by the cronjob. So that's every 5 minutes with your cron line. You should change "Cron Interval" to "every minute" and "*/1" in your cronfile.

The "Poller Interval" is how often the graphs/RRD's being updated, but that isn't the actual datacollection which is being done by the cronjob.

Regards,
Sander
sergani
Posts: 24
Joined: Sun Sep 18, 2011 3:49 am
Location: Cairo, Egypt

Re: Crontab and poller intervals

Post by sergani »

Sander88 wrote: The "Poller Interval" is how often the graphs/RRD's being updated, but that isn't the actual datacollection which is being done by the cronjob.
Thanks Sander, that makes a lot of sense .. but then again, there is no possible way to poll every 10 seconds, this is just the interval at which the RRDs are updated...
Sander88
Posts: 5
Joined: Tue Sep 27, 2011 2:42 am

Re: Crontab and poller intervals

Post by Sander88 »

I think you can run it every 10 seconds, but I would not recommend it (I expect a lot of problems by changing it to 10 seconds instead of 60). Cron can't run more than once per minute so you have to make a script that does 6 runs (with 5 sleeps of 10 sec between the runs). There are several topics about this, like: http://forums.cacti.net/post-60190.html .
sergani
Posts: 24
Joined: Sun Sep 18, 2011 3:49 am
Location: Cairo, Egypt

Re: Crontab and poller intervals

Post by sergani »

Sander88 wrote:I think you can run it every 10 seconds, but I would not recommend it (I expect a lot of problems by changing it to 10 seconds instead of 60). Cron can't run more than once per minute so you have to make a script that does 6 runs (with 5 sleeps of 10 sec between the runs). There are several topics about this, like: http://forums.cacti.net/post-60190.html .
Great idea... But yeah, one minute is good enough anyway.

Thanks again...
//M
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Crontab and poller intervals

Post by TheWitness »

Once you understand how the RRA settings work, and the implications of the Step and Heartbeat in the Data Templates, you can modify those Data Templates to use the correct RRA's, Steps and Heartbeats for 30 second polling. However, please keep in mind that the way Cacti presently works is that you set the polling frequency in the Data Template, and that the Data Template will setup polling for everything associated to it at that polling frequency.

Finally, all RRDfiles that were being polled at 5 minutes must be removed and allowed to be recreated. Cron can stay at 5 minutes even with the poller interval at 30 seconds.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
sergani
Posts: 24
Joined: Sun Sep 18, 2011 3:49 am
Location: Cairo, Egypt

Re: Crontab and poller intervals

Post by sergani »

Thanks, I'll keep that in mind for sure :)

Currently my steps are @ 60, HB's @ 120, cron and polled settings @ 1 min as well. And my 1 minute polling is doing a good job.

//M
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Crontab and poller intervals

Post by TheWitness »

That would be accurate. However, make sure that the cascading of one RRA to the other does not damage your RRDfiles. It's a complicated thing. I would love to simplify it. But it's a huge rewrite and I don't want to break peoples systems. Upgrade compatibility has always been important for me.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests