Polling Interval

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

BrianJ
Posts: 11
Joined: Sun Mar 10, 2002 7:00 pm

Polling Interval

Post by BrianJ »

It would be REALLY nice if it were possible to midfy the polling interval. The default interval is coded at 5 minutes, but some folks, like me, would like to poll every minute and graph based on that data.
Mika Saarema

Post by Mika Saarema »

Why don't you write that down into your crontab?
By default you've configured every 5 minutes.
Do it in your way
NC

Polling Interval

Post by NC »

Hi every body !

But, how to collect some data which require to be collected frequently (ex: 1 minute for % CPU usage)
and others which change less quickly (ex: 15 minutes for disk usage) ?
NC

Polling Interval : new suggestion

Post by NC »

In order to collect data with an variable interval,
I have this idea :


I] Add 2 columns in table "data_input_data_cache"
1) "Step" : contains the data source step (normally, 300 seconds)
2) "Next_time" : contains the number of seconds before the execution of this command.

II] Change the frequency of "cmd.php" in crontab, per exemple 1/minute.
*/1 * * * * cactiuser php /var/www/html/cacti/cmd.php > /dev/null 2>&1

II] Modify "cmd.php" with something like this :

Code: Select all

select all lines stored in "data_input_data_cache"
foreach lines
{
if line.Next_time <= 60 (seconds) then 
     execute_command()
     line.Next_time =line.Step
else 
     line.Next_time -= 60
endif
 update table "data_input_data_cache"
}
What do you think about ?

I'll try to write a patch for this shortly...
NC
Posts: 7
Joined: Tue Feb 24, 2004 2:15 pm
Location: FRANCE

Polling Interval : a patch !

Post by NC »

I've just finished to write what I explained last time.

In order to work,

Modify crontab :
*/1 * * * * cactiuser php /var/www/cacti/cmd.php > /dev/null 2>&1

Modify database :
ALTER TABLE `data_input_data_cache`
ADD `rrd_step` MEDIUMINT( 8 ) UNSIGNED,
ADD `next_step` MEDIUMINT( 8 ) UNSIGNED;

Apply the patch....
Attachments
cacti_patch.tar.gz
Patch for CACTI 0.8.5 : modified files
(7.27 KiB) Downloaded 639 times
cacti_patch.txt
Patch for CACTI 0.8.5 : diff -NaurbB
(7.32 KiB) Downloaded 970 times
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

This is pretty cool! I mirrored the patch and patched files here:

http://www.raxnet.net/downloads/cacti/p ... als/0.8.5/

-Ian
moonman
Cacti User
Posts: 101
Joined: Sat Sep 06, 2003 10:25 am

hi rax

Post by moonman »

dont forgot to add it to cactid to

Thanks
karunesh
Posts: 15
Joined: Mon Feb 02, 2004 1:25 pm
Location: India

Re: Polling Interval : a patch !

Post by karunesh »

NC wrote:I've just finished to write what I explained last time.

In order to work,

Modify crontab :
*/1 * * * * cactiuser php /var/www/cacti/cmd.php > /dev/null 2>&1

Modify database :
ALTER TABLE `data_input_data_cache`
ADD `rrd_step` MEDIUMINT( 8 ) UNSIGNED,
ADD `next_step` MEDIUMINT( 8 ) UNSIGNED;

Apply the patch....
Pls explain how to apply this patch. As there are 2 files, one is "txt" file and other is "tar" file.What we need to do with these files ?.
__Kårunesh__
Guest

Post by Guest »

Hi,

In order to apply this pacth, you have 2 solutions :
(save your config & cacti_dir before !)

1] "cacti_patch.tar.gz" contains 3 files which replace official files.
So, commands something like that :
cd /tmp
tar zxvf cacti_patch.tar.gz
cp cacti_patch/*.php cacti_dir/
cp cacti_patch/lib*.php cacti_dir/lib

2] Use "cacti_patch.txt"
cd cacti_dir
patch -p1 < cacti_patch.txt

That's all !
BrianJ
Posts: 11
Joined: Sun Mar 10, 2002 7:00 pm

Post by BrianJ »

Is this part of thew current release now :D
Brashquido
Cacti User
Posts: 99
Joined: Sat Feb 28, 2004 10:16 pm
Location: Melbourne, Australia
Contact:

Post by Brashquido »

I take it then this modification does not work with Cacti 0.8.6c as there is no data_input_data_cache table in the Cacti database? Also looks as if this is a *nix only modification, anyone looked at creating a modification that is totally portable and will work on all platforms?
Dominic Ryan
www.iis-aid.com
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Brashquido wrote:I take it then this modification does not work with Cacti 0.8.6c as there is no data_input_data_cache table in the Cacti database? Also looks as if this is a *nix only modification, anyone looked at creating a modification that is totally portable and will work on all platforms?
The 'data_input_data_cache' table was renamed to 'poller_item' in 0.8.6. In addition, much of the poller architecture was modified. This patch would have to be updated to work under a current version of Cacti.

TheWitness and I are currently having a discussion about the feasibility of implementing this. In short, this feature is definitely on the TODO, it's just a matter of deciding upon the best method of implemention.

-Ian
formatc
Posts: 1
Joined: Mon Feb 21, 2005 5:13 pm

Post by formatc »

And what about the graphs then ? I want also a graph per 1 minute. I did draw my own mut the are showing squares.
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

formatc wrote:And what about the graphs then ? I want also a graph per 1 minute. I did draw my own mut the are showing squares.
This will be automatically taken care of with the variable polling intervals feature. Cacti will update the .rrd file more often meaning that there would be higher resolution data available for each graph. The reason you see blocks when zooming in is because RRDTool does not keep precise data at such a small resolution in the default Cacti configuration.

-Ian
augustz
Posts: 1
Joined: Fri Mar 18, 2005 6:22 pm

Post by augustz »

Another vote for this feature.

Currently using zabbix, like the polling architecture.

In particular, it is handy to be able to separate polling intervals.

For example, every 15 minutes for disk usage for me is plenty. However, something things (cpu/mem) I do look for spikes, and a nice short drill in 1 minute interval can be handy when looking over a day and troubleshooting.

Zabbix is weak in some other areas though, and looking to switch to cacti.

The only other feature request would be some more docs on cactid.

Under zabbix the agents pick up which items to return info on from the installation database, and then the poller/server process sweeps along them and grabs their info.

Reading over the docs it wasn't clear how things like cpu load or custom items get picked up by cactid.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests