[collectd] Collectd complex perl plugin question ...
Sebastian Harl
sh at tokkee.org
Wed Apr 4 10:58:07 CEST 2012
Hi,
On Tue, Apr 03, 2012 at 07:24:08PM +0000, Sebastien Cramatte wrote:
> We have created a complex perl plugin that scan over 1000 SNMP
> equipments using multi threads. It's works except that I don't how
> to handle properly interval execution. When I restart collectd
> daemon, read method Is called every 10 o 20 seconds ….
>
> We need that this plugin read method be executed every 300 s (5mn).
> How can I achieve this ?
Right now, this is not possible using any built-in mechanisms.
(See the per plugin interval feature mentioned in another thread though,
which is available as an RFC on Github.)
However, you could simple skip a couple of intervals in the read
callback function. I.e., use a global variable (for each instance of the
callback) to count down the number of intervals to be skipped. Make sure
to return 0 in case you skip the current interval. Then, manually set
the interval appropriately when dispatching values.
HTH,
Sebastian
--
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/
Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20120404/be07f975/attachment.pgp>
More information about the collectd
mailing list