Polling Interval
Moderators: Developers, Moderators
Polling Interval
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.
Polling Interval
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) ?
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) ?
Polling Interval : new suggestion
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 :
What do you think about ?
I'll try to write a patch for this shortly...
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"
}
I'll try to write a patch for this shortly...
Polling Interval : a patch !
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....
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
This is pretty cool! I mirrored the patch and patched files here:
http://www.raxnet.net/downloads/cacti/p ... als/0.8.5/
-Ian
http://www.raxnet.net/downloads/cacti/p ... als/0.8.5/
-Ian
Re: Polling Interval : a 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 ?.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....
__Kårunesh__
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 !
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 !
-
- Cacti User
- Posts: 99
- Joined: Sat Feb 28, 2004 10:16 pm
- Location: Melbourne, Australia
- Contact:
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
www.iis-aid.com
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.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?
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
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.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.
-Ian
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.
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.
Who is online
Users browsing this forum: No registered users and 0 guests