[collectd-changes] collectd, the system statistics collection daemon: Changes to 'master'
Florian Forster
octo at verplant.org
Fri Nov 16 07:58:14 CET 2012
bindings/perl/lib/Collectd.pm | 14 +-
bindings/perl/lib/Collectd/Plugins/OpenVZ.pm | 2 +-
src/amqp.c | 12 +-
src/collectd-perl.pod | 14 +-
src/collectd.c | 33 +---
src/collectd.conf.pod | 6 +
src/collectd.h | 4 +
src/configfile.c | 89 ++++++++-
src/configfile.h | 5 +
src/cpu.c | 2 +-
src/disk.c | 3 +-
src/dns.c | 4 +-
src/email.c | 6 +-
src/exec.c | 9 +-
src/gmond.c | 2 +-
src/ipmi.c | 4 +-
src/libvirt.c | 2 -
src/modbus.c | 2 +-
src/network.c | 5 +-
src/perl.c | 40 ++--
src/pinba.c | 2 +-
src/ping.c | 2 +-
src/plugin.c | 252 ++++++++++++++++++++++++--
src/plugin.h | 38 +++-
src/postgresql.c | 3 +-
src/powerdns.c | 2 +-
src/python.c | 2 +-
src/rrdtool.c | 13 +-
src/snmp.c | 2 +-
src/unixsock.c | 6 +-
src/utils_cmd_putval.c | 2 +-
src/utils_complain.c | 4 +-
32 files changed, 476 insertions(+), 110 deletions(-)
New commits:
commit 6d85a198dd90fb5af963ad847d9dbff7b8025c46
Merge: e2bdca7 9cb2694
Author: Florian Forster <octo at collectd.org>
Date: Fri Nov 16 07:53:27 2012 +0100
Merge branch 'sh/plugin_interval'
Conflicts:
src/amqp.c
src/exec.c
src/memcached.c
src/unixsock.c
commit 9cb2694409620ae217ede92f78fe45c9eba83504
Author: Florian Forster <octo at collectd.org>
Date: Thu Nov 15 13:55:04 2012 +0100
src/configfile.[ch]: Implement the cf_get_default_interval() function.
This should be able to replace "interval_g" in a global (i.e. non-plugin)
context, such as the interval in which timeouts are being checked.
The default value (10 seconds) is also configurable at compile time using
a define.
commit d1a32e2c7c8b1f97e06505cd73d1c1b2f9e4a724
Author: Sebastian Harl <sh at tokkee.org>
Date: Wed Nov 14 19:19:54 2012 +0100
collectd-perl(5): Don't actually use $interval_g in any examples.
commit 624b4290554114a61a49a4c00e5f867b6b55f773
Author: Sebastian Harl <sh at tokkee.org>
Date: Wed Nov 14 19:19:05 2012 +0100
collectd-perl(5): Mention that $interval_g should not be used.
commit 80f20ce82099d92efd5655cf26237823e547a602
Author: Sebastian Harl <sh at tokkee.org>
Date: Wed Nov 14 19:08:30 2012 +0100
perl plugin: Emit a warning when accessing $interval_g.
Rather, point to plugin_get_interval().
commit c6d5db799a2b4a8050ee9251eade254cb9b7f695
Author: Sebastian Harl <sh at tokkee.org>
Date: Wed Nov 14 19:05:10 2012 +0100
perl plugin: Simplified $interval_g implementation.
Don't pass any pointers to interval_g around just in order to later
dereference them. There's just no reason to do so ;-)
commit cbbb31b0e8ecd46a4ba4f7734419b33e1c74c6d9
Author: Sebastian Harl <sh at tokkee.org>
Date: Wed Nov 14 19:00:25 2012 +0100
Collectd.pm: Use plugin_get_interval() rather than $interval_g.
commit eeee599d3de438d72e44cce0eb427838135f87ad
Author: Sebastian Harl <sh at tokkee.org>
Date: Wed Nov 14 18:58:01 2012 +0100
Collectd::Plugins::OpenVZ: Use plugin_get_interval() rather than $interval_g.
commit 65d25664df9fdc9bedf23f02a981b85cd6722970
Author: Sebastian Harl <sh at tokkee.org>
Date: Wed Nov 14 18:55:43 2012 +0100
perl plugin: Export plugin_get_interval() to Perl plugins.
commit cd35a6a4528cf78383266fbae770b9c7161fda25
Author: Florian Forster <octo at collectd.org>
Date: Wed Nov 14 13:07:47 2012 +0100
src/plugin.c: Report an error if ctx.interval is not set.
commit b5ad48ac8e183bb0574608fbddceca41d64ab3da
Author: Florian Forster <octo at collectd.org>
Date: Wed Nov 14 10:33:29 2012 +0100
rrdtool plugin: Remove warnings.
They made sense when all data was collected at the same interval. This
has not been true for a while now and these warnings don't make any sense
anymore.
We could transform them into a per-VL check and use complaints to notify
the user, but I don't think it's worth it. There is an "I told you so"
in the manpage in big bold letters ...
commit 86db5dd0f868540a8d5a11d32115b22d378b39cd
Author: Florian Forster <octo at collectd.org>
Date: Tue Nov 13 19:14:56 2012 +0100
src/plugin.c: Don't regularly check for read plugins.
Rather, let plugin_insert_read() wake up all the read threads.
This removes another usage of interval_g.
commit 76e6392863d130ceca048eb860e4db1c9e40fee7
Author: Sebastian Harl <sh at tokkee.org>
Date: Sun Oct 14 17:52:39 2012 +0200
Use plugin_thread_create() rather than pthread_create() in all plugins.
This function copies the plugin context from the calling thread to the new
thread. While this might not strictly be necessary in most/many cases, this
will make sure that any code within a plugin uses the same context
information, thus avoiding possible problems in the future.
commit 32eb98cd7911b291e6341242971142e4ef5567f4
Author: Sebastian Harl <sh at tokkee.org>
Date: Sun Oct 14 16:53:57 2012 +0200
plugin: Don't switch plugin context in 'write', 'notification' and 'log'.
Rather, keep the context (i.e. interval) information of the calling (read)
plugin. This allows the write, notify and log callbacks to access the correct
interval settings appropriate for the current data-set.
commit ec36b4bdca9dbe957f39bef619cdc8c48103a86c
Author: Sebastian Harl <sh at tokkee.org>
Date: Sun Oct 14 16:42:35 2012 +0200
Initialize plugin context to global interval before loading a plugin.
This ensures that the actual interval for each plugin is available through its
context. It is a preparation for removing 'interval_g' (which has limited use
after introducing per-plugin intervals and, thus, its use is rather error-
prone).
commit d8825859c7b31f068899c2d5f8a147ea1ef65750
Author: Sebastian Harl <sh at tokkee.org>
Date: Sun Oct 14 16:37:18 2012 +0200
Don't use 'interval_g' in any plugins.
Rather, use plugin_get_interval () in order to honor any plugin specific
interval settings.
commit d5ba2cb628f0c5c3e5c3eef1c62aacc23f3d8aef
Author: Sebastian Harl <sh at tokkee.org>
Date: Sun Oct 14 16:31:01 2012 +0200
plugin: Added plugin_get_interval().
This function returns the current value of the plugin's interval. If no
interval has been set in the plugin context, it will fall back to the global
interval or ten seconds as a last resort.
commit 27ee07347c393c71e5ec1fb705ec6ea0ac8a16a5
Author: Florian Forster <octo at collectd.org>
Date: Sat Oct 6 17:42:10 2012 +0200
collectd.conf(5): Document the "LoadPlugin / Interval" option.
commit eb42ada2a20626de9a6d0a58216b7257b8c6ddb9
Author: Florian Forster <octo at collectd.org>
Date: Sat Oct 6 17:38:50 2012 +0200
src/plugin.c: Document the use of "register_complex_read".
Also add assertions to make sure plugin_init_ctx() is used correctly.
commit 81346b256c86c3c16b1cfa8a8aac895c5c5e17cd
Author: Sebastian Harl <sh at tokkee.org>
Date: Fri Feb 3 14:57:05 2012 +0100
plugin: Added plugin_thread_create().
This function is a wrapper around pthread_create() which copies the plugin
context to the new thread. Else, that information would be lost.
commit bdbde949ad0bd244574efcec596675e1ef889c43
Author: Sebastian Harl <sh at tokkee.org>
Date: Thu Feb 2 07:44:48 2012 +0100
plugin: Introduced basic support for per-plugin intervals.
This is based on a newly introduced "plugin context", which stores plugin-
related settings (currently the plugin interval) for each registered callback.
The context is initialized when loading the plugin (LoadPlugin), setting the
interval to the value of the newly introduced "Interval" option of the
LoadPlugin block, if specified.
The context is set (using thread-specific data) and restored before and after
calling any callback.
This way, single plugins don't need to take special care in order to benefit
from the new feature. plugin.c will handle (most) situations automatically.
VALUE_LIST_INIT() has been changed to honor the plugin interval settings (if
any). As a helper, the new 'plugin_interval' macro may be used to access the
current plugin's interval (read-only).
Thanks to Florian for the initial idea!
More information about the collectd-changes
mailing list