Code

collectd.git
16 years agoMerge branch 'collectd-4.2'
Florian Forster [Fri, 28 Dec 2007 18:04:45 +0000 (19:04 +0100)]
Merge branch 'collectd-4.2'

Conflicts:

bindings/Makefile.am

16 years agoBumped version to 4.2.3; Updated ChangeLog. collectd-4.2.3
Florian Forster [Fri, 28 Dec 2007 17:33:54 +0000 (18:33 +0100)]
Bumped version to 4.2.3; Updated ChangeLog.

16 years agobuild system: Yet another way to solve the src-dir vs. build-dir issue.
Florian Forster [Fri, 28 Dec 2007 17:21:01 +0000 (18:21 +0100)]
build system: Yet another way to solve the src-dir vs. build-dir issue.

16 years agoconfigure.in: Copy sources of the Perl bindings to the build directory.
Sebastian Harl [Thu, 27 Dec 2007 15:40:30 +0000 (16:40 +0100)]
configure.in: Copy sources of the Perl bindings to the build directory.

As the Perl build system around ExtUtils::MakeMaker doesn't know how to
separate source and build directories, all relevant source files have to be
available in the build directory.

This is an alternative patch for the problem reported by Michael Tiernan.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoRevert "bindings/Makefile.am: Fix a bug that happened when src and build directory...
Sebastian Harl [Thu, 27 Dec 2007 15:39:46 +0000 (16:39 +0100)]
Revert "bindings/Makefile.am: Fix a bug that happened when src and build directory are not the same."

This reverts commit 61f5c1a972626212aab60c4d50f45097485b8e51 which had the
following problems:

 * parts of the build process took place in the source directory (which should
   be read-only though)

 * the "perl" target should not be renamed - the name is used in
   @PERL_BINDINGS@ to identify the bindings that are supposed to be built

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoutils_mount.c: Fixed an unused variable warning on some systems.
Sebastian Harl [Wed, 19 Dec 2007 19:37:30 +0000 (20:37 +0100)]
utils_mount.c: Fixed an unused variable warning on some systems.

This warning appeared on systems using listmntent() or getv?fsstat() when
compiling with debugging disabled only. It was caused by the declaration of a
character array for use with sstrerror() inside a call to DEBUG().

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agosrc/Makefile.am: Use curl CFLAGS when building the nginx plugin.
Sebastian Harl [Wed, 19 Dec 2007 19:36:40 +0000 (20:36 +0100)]
src/Makefile.am: Use curl CFLAGS when building the nginx plugin.

Else curl/curl.h cannot be found in non-standard places at build time.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoUpdated the changelog.
Florian Forster [Thu, 27 Dec 2007 10:17:46 +0000 (11:17 +0100)]
Updated the changelog.

16 years agoMerge branch 'collectd-4.1' into collectd-4.2
Florian Forster [Thu, 27 Dec 2007 10:15:30 +0000 (11:15 +0100)]
Merge branch 'collectd-4.1' into collectd-4.2

Conflicts:

ChangeLog
version-gen.sh

16 years agoBumped version to 4.1.5; Updated ChangeLog. collectd-4.1.5
Florian Forster [Thu, 27 Dec 2007 09:34:39 +0000 (10:34 +0100)]
Bumped version to 4.1.5; Updated ChangeLog.

16 years agosensors plugin: While I was at it I reorganized the code a little so it's easier...
Florian Forster [Wed, 26 Dec 2007 14:34:18 +0000 (15:34 +0100)]
sensors plugin: While I was at it I reorganized the code a little so it's easier to read.

For instance I moved the name to type conversion out of the main loop and into
a separate function, likewise the chip to string representation conversion. The
`submit' function is now very careful that all strings are null terminated and
that no buffer overflow may occur.

16 years agosensors plugin: Implemented support for libsensors3.
Florian Forster [Tue, 25 Dec 2007 17:11:47 +0000 (18:11 +0100)]
sensors plugin: Implemented support for libsensors3.

16 years agoexec plugin: Added the possibility to execute programs upon notifications (EXPERIMENTAL)
Florian Forster [Tue, 25 Dec 2007 13:35:38 +0000 (14:35 +0100)]
exec plugin: Added the possibility to execute programs upon notifications (EXPERIMENTAL)

16 years agosrc/utils_cache.c: Added the creation of an `OKAY' notification.
Florian Forster [Sun, 23 Dec 2007 10:44:01 +0000 (11:44 +0100)]
src/utils_cache.c: Added the creation of an `OKAY' notification.

It is generated when a value was missing and is received again.

16 years agologfile plugin: Added a notification plugin.
Florian Forster [Sun, 23 Dec 2007 10:43:22 +0000 (11:43 +0100)]
logfile plugin: Added a notification plugin.

16 years agosrc/plugin.c: Notification callbacks were added to the wrong linked list.
Florian Forster [Sun, 23 Dec 2007 10:43:02 +0000 (11:43 +0100)]
src/plugin.c: Notification callbacks were added to the wrong linked list.

16 years agosrc/utils_cache.[ch]: Implemented uc_[gs]et_state to receive and set the state of...
Florian Forster [Thu, 20 Dec 2007 21:37:39 +0000 (22:37 +0100)]
src/utils_cache.[ch]: Implemented uc_[gs]et_state to receive and set the state of a value.

This is most likely very buggy. The intention is that this is used in the
threshold module to decide wether or not so send a notification, i. e. if the
problem existed before or not.

16 years agosrc/utils_threshold.h: Documented the public functions.
Florian Forster [Wed, 19 Dec 2007 14:07:33 +0000 (15:07 +0100)]
src/utils_threshold.h: Documented the public functions.

16 years agosrc/utils_threshold.c: Implemented the new `Persist' option.
Florian Forster [Wed, 19 Dec 2007 14:07:10 +0000 (15:07 +0100)]
src/utils_threshold.c: Implemented the new `Persist' option.

The idea is that, if the option is set to `true', many notifications will be
sent, until the problem vanishes again. If set to `false' only one notification
will be sent upon a state change.
This, however, is not implemented yet.

16 years agobindings/Makefile.am: Fix a bug that happened when src and build directory are not...
Florian Forster [Wed, 19 Dec 2007 13:33:39 +0000 (14:33 +0100)]
bindings/Makefile.am: Fix a bug that happened when src and build directory are not the same.

Thanks to Michael Tiernan for reporting this bug.

16 years agosrc/utils_threshold.c: Corrected and improved the handling of the `invert' setting.
Florian Forster [Wed, 19 Dec 2007 13:13:15 +0000 (14:13 +0100)]
src/utils_threshold.c: Corrected and improved the handling of the `invert' setting.

16 years agocollectd.conf(5): Wrote some more about the threshold configuration..
Florian Forster [Mon, 17 Dec 2007 22:06:29 +0000 (23:06 +0100)]
collectd.conf(5): Wrote some more about the threshold configuration..

..in its current state.

16 years agocollectd.conf(5): Started documenting the threshold thingy.
Florian Forster [Mon, 17 Dec 2007 14:48:36 +0000 (15:48 +0100)]
collectd.conf(5): Started documenting the threshold thingy.

16 years agoutils_{cache,threshold}.[ch]: Implemented the ``check interesting'' function.
Florian Forster [Mon, 17 Dec 2007 14:37:01 +0000 (15:37 +0100)]
utils_{cache,threshold}.[ch]: Implemented the ``check interesting'' function.

The cache now checks if a missing value would be ``interesting'', i. e. if a
threshold is configured for it. If so, a notification is send and the entry is
_not_ removed from the cache. Otherwise, no notification is sent and the entry
is removed.
The changes have been tested a little and should basically work.

16 years agoBumped version to 4.2.2; Updated ChangeLog. collectd-4.2.2
Florian Forster [Sat, 15 Dec 2007 11:25:51 +0000 (12:25 +0100)]
Bumped version to 4.2.2; Updated ChangeLog.

16 years agoMerge branch 'collectd-4.1' into collectd-4.2
Florian Forster [Sat, 15 Dec 2007 11:15:37 +0000 (12:15 +0100)]
Merge branch 'collectd-4.1' into collectd-4.2

16 years agoMerge branch 'master' of octo@verplant.org:/var/lib/git/collectd
Florian Forster [Sat, 15 Dec 2007 11:11:17 +0000 (12:11 +0100)]
Merge branch 'master' of octo@verplant.org:/var/lib/git/collectd

16 years agosrc/utils_cache.[ch]: Added the `uc_check_timeout' function.
Florian Forster [Sat, 15 Dec 2007 11:11:06 +0000 (12:11 +0100)]
src/utils_cache.[ch]: Added the `uc_check_timeout' function.

This function is called before the read plugins. It checks if values are
missing, i. e. have not been reported for longer than twice their ``interval''.
In this case a notification is created, though this is probably not the final
behavior.
This code is highly experimental.

16 years agoMerge branch 'collectd-4.2'
Florian Forster [Thu, 13 Dec 2007 07:16:16 +0000 (08:16 +0100)]
Merge branch 'collectd-4.2'

Conflicts:

src/utils_llist.c

16 years agosrc/utils_avltree.[ch]: Change avl_insert to return >0 if the key is already in the...
Luke Heberling [Thu, 13 Dec 2007 07:15:38 +0000 (08:15 +0100)]
src/utils_avltree.[ch]: Change avl_insert to return >0 if the key is already in the tree.

I'd like to be able to tell when avl_insert fails because of a duplicate key as
opposed to when it fails due to out of memory or other condition.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agosrc/utils_avltree.c: Fix avl_get to work as documented.
Luke Heberling [Thu, 13 Dec 2007 07:09:16 +0000 (08:09 +0100)]
src/utils_avltree.c: Fix avl_get to work as documented.

The documentation in the header file for avl_get states that value may be null,
but the code in the source file asserts otherwise. This patch changes the code
to reflect the documentation.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agorc/utils_llist.c: Fix a bug in llist_prepend.
Luke Heberling [Thu, 13 Dec 2007 07:06:26 +0000 (08:06 +0100)]
rc/utils_llist.c: Fix a bug in llist_prepend.

Copy the element to the tail if it's the first element.

16 years agocollectd.conf(5): Added a note about plugin loading order.
Luke Heberling [Thu, 13 Dec 2007 07:03:03 +0000 (08:03 +0100)]
collectd.conf(5): Added a note about plugin loading order.

16 years agologfile plugin: fix the `Timestamp' configuration option.
Luke Heberling [Thu, 13 Dec 2007 07:01:16 +0000 (08:01 +0100)]
logfile plugin: fix the `Timestamp' configuration option.

16 years agonginx plugin: Use strcmp rather than strcpy to compare strings.
Saulius Grigaliunas [Thu, 13 Dec 2007 06:58:51 +0000 (07:58 +0100)]
nginx plugin: Use strcmp rather than strcpy to compare strings.

I believe I found a typo in nginx.c which prevents collectd with nginx plugin
from working. Collectd segfaults at startup. Here is a tiny patch to correct
the issue. When applied, everything works as expected.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoMerge branch 'master' of octo@verplant.org:/var/lib/git/collectd
Florian Forster [Wed, 12 Dec 2007 08:05:55 +0000 (09:05 +0100)]
Merge branch 'master' of octo@verplant.org:/var/lib/git/collectd

16 years agosrc/utils_llist.[ch]: Changed the semantic so module doesn't copy the `key'.
Luke Heberling [Wed, 12 Dec 2007 07:43:34 +0000 (08:43 +0100)]
src/utils_llist.[ch]: Changed the semantic so module doesn't copy the `key'.

Whilst looking at my implementation of the plugins we've discussed which are
now using dual avl trees, I saw that the utils_llist module would be a more
efficient substitute for the second avl tree. However, it would need to know
its size and would preferably not duplicate and own the key for each item.
Here's a patch which does this. These changes might make it easier for future
plugins to use the linked list for similar purposes, similar to the way the avl
tree does not impose any lifetime on its keys.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agosrc/plugin.[ch]: Removed the complain functions.
Florian Forster [Sun, 9 Dec 2007 15:42:14 +0000 (16:42 +0100)]
src/plugin.[ch]: Removed the complain functions.

16 years agoiptables plugin: Removed the `complain' stuff.
Florian Forster [Sun, 9 Dec 2007 15:41:53 +0000 (16:41 +0100)]
iptables plugin: Removed the `complain' stuff.

16 years agoapcups plugin: Removed the `complain' stuff.
Florian Forster [Sun, 9 Dec 2007 14:33:58 +0000 (15:33 +0100)]
apcups plugin: Removed the `complain' stuff.

16 years agocpu plugin: Removed the `complain' stuff.
Florian Forster [Sun, 9 Dec 2007 14:32:13 +0000 (15:32 +0100)]
cpu plugin: Removed the `complain' stuff.

16 years agodisk plugin: Removed the `complain' stuff.
Florian Forster [Sun, 9 Dec 2007 14:30:29 +0000 (15:30 +0100)]
disk plugin: Removed the `complain' stuff.

16 years agoMerge branch 'ps/reuse'
Florian Forster [Sun, 9 Dec 2007 10:54:52 +0000 (11:54 +0100)]
Merge branch 'ps/reuse'

16 years agocontrib/network-proxy.py: Added a simply (unicast) proxy for collectd traffic.
Pavel Shramov [Sun, 9 Dec 2007 10:51:28 +0000 (11:51 +0100)]
contrib/network-proxy.py: Added a simply (unicast) proxy for collectd traffic.

16 years agontpd plugin: Added the `ReverseLookups' option to disable reverse lookups.
Florian Forster [Sun, 9 Dec 2007 10:20:13 +0000 (11:20 +0100)]
ntpd plugin: Added the `ReverseLookups' option to disable reverse lookups.

Thanks to Simon Richter for pointing this out.

16 years agoMerge branch 'ps/reuse'
Florian Forster [Sat, 8 Dec 2007 12:02:41 +0000 (13:02 +0100)]
Merge branch 'ps/reuse'

16 years agonetwork plugin: Fix setsockopt for SO_REUSEADDR since value of loop variable changed
Pavel Shramov [Tue, 4 Dec 2007 14:43:35 +0000 (17:43 +0300)]
network plugin: Fix setsockopt for SO_REUSEADDR since value of loop variable changed

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoMerge branch 'ps/reuse'
Florian Forster [Tue, 4 Dec 2007 09:04:56 +0000 (10:04 +0100)]
Merge branch 'ps/reuse'

16 years agoexamples/MyPlugin.pm: Updated for new version of the perl plugin.
Sebastian Harl [Mon, 26 Nov 2007 11:20:31 +0000 (12:20 +0100)]
examples/MyPlugin.pm: Updated for new version of the perl plugin.

 * use Collectd.pm and removed "Collectd::" prefix
 * pass callbacks by name to plugin_register()

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoUnmarked the perl plugin to be experimental.
Sebastian Harl [Mon, 26 Nov 2007 11:19:48 +0000 (12:19 +0100)]
Unmarked the perl plugin to be experimental.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocollectd-perl(5): Replaced "BUGS" with "CAVEATS" section.
Sebastian Harl [Mon, 26 Nov 2007 11:19:17 +0000 (12:19 +0100)]
collectd-perl(5): Replaced "BUGS" with "CAVEATS" section.

The bugs section is no longer relevant, however, the users should be warned
about some (mostly Perl ithread specific) limitations.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoperl plugin: Fixed a memory leak in pplugin_register_data_set().
Sebastian Harl [Mon, 26 Nov 2007 11:17:26 +0000 (12:17 +0100)]
perl plugin: Fixed a memory leak in pplugin_register_data_set().

The data set definition is copied by plugin_register_data_set() (in plugin.c)
and thus should be freed after it has been passed on to the plugin module.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocollectdmon: Added SIGHUP handler to restart collectd.
Sebastian Harl [Sun, 25 Nov 2007 14:33:15 +0000 (15:33 +0100)]
collectdmon: Added SIGHUP handler to restart collectd.

This might be useful for init scripts and the like to restart the collectd
process only.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocollectdmon(1): Added manpage for collectdmon.
Sebastian Harl [Sun, 25 Nov 2007 13:55:46 +0000 (14:55 +0100)]
collectdmon(1): Added manpage for collectdmon.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocollectdmon: Added a small daemon monitoring collectd.
Sebastian Harl [Sun, 25 Nov 2007 13:54:05 +0000 (14:54 +0100)]
collectdmon: Added a small daemon monitoring collectd.

This is a small "wrapper" daemon which starts and monitors the collectd
daemon. If collectd terminates it will automatically be restarted, unless
collectdmon was told to shut it down.

Current features:

 * restarting the daemon
 * logging to syslog
 * detection of quickly, repeatedly respawning processes
   (similar to SysV init)

collectdmon is similar to mysqld_safe.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agonetwork plugin: Set SO_REUSEADDR on socket so multiple listeners can share port
Pavel Shramov [Thu, 29 Nov 2007 10:37:22 +0000 (13:37 +0300)]
network plugin: Set SO_REUSEADDR on socket so multiple listeners can share port

This patch allows other programs to bind same port and process data from clients
not interfering with master collectd server.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agosrc/utils_avltree.h: Improved the documentation.
Florian Forster [Sat, 24 Nov 2007 13:10:10 +0000 (14:10 +0100)]
src/utils_avltree.h: Improved the documentation.

The `key' argument is not copied and freed automatically. This was
insufficiently documented in the documentation..

17 years agologfile plugin: Default to $localstatedir/log/collectd.log instead of STDOUT.
Sebastian Harl [Sat, 17 Nov 2007 19:50:00 +0000 (20:50 +0100)]
logfile plugin: Default to $localstatedir/log/collectd.log instead of STDOUT.

Imho STDOUT is only a useful default during debugging (which should be by far
the less common case ;-). In any other case it might just "pollute" the
messages printed by e.g. the init script.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agocollectd.conf(5): Fixed some typos.
Sebastian Harl [Thu, 22 Nov 2007 09:40:20 +0000 (10:40 +0100)]
collectd.conf(5): Fixed some typos.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agoperl plugin: Made global variables available to Perl plugins.
Sebastian Harl [Wed, 21 Nov 2007 21:00:42 +0000 (22:00 +0100)]
perl plugin: Made global variables available to Perl plugins.

The "let's become magical" commit.

Each global variable (currently hostname_g and interval_g) will be exported by
introducing an equally named Perl variable. Perl's concept of "magic" is used
to create a read/write interface to the C variables (think of the variables as
being tied). This way any changes to the C variables will be immediately
accessible from the Perl plugin and vice versa.

17 years agoperl plugin: Improved some error messages.
Sebastian Harl [Mon, 19 Nov 2007 23:30:11 +0000 (00:30 +0100)]
perl plugin: Improved some error messages.

17 years agoperl plugin: Shut down an ithread if the embedding pthread terminates.
Sebastian Harl [Mon, 19 Nov 2007 23:20:25 +0000 (00:20 +0100)]
perl plugin: Shut down an ithread if the embedding pthread terminates.

Each ithread object is registered as thread specific data along with a
destructor function. If the embedding pthread terminates the destructor is
called which takes care of cleanly shutting down the appropriate Perl
interpreter and freeing any related resources.

17 years agoperl plugin: Fixed error in ithread shutdown loop.
Sebastian Harl [Sun, 18 Nov 2007 19:37:36 +0000 (20:37 +0100)]
perl plugin: Fixed error in ithread shutdown loop.

Using the sfree() macro, the loop variable was accidentally set to NULL at the
end of the loop, causing the loop to terminate after the first iteration.

17 years agoperl plugin: Execute END blocks in main thread only.
Sebastian Harl [Tue, 20 Nov 2007 07:45:22 +0000 (08:45 +0100)]
perl plugin: Execute END blocks in main thread only.

Each END block is executed during perl_destruct() which happens once for each
ithread. As the number of ithreads are in no way related to any Perl plugins
this is not what we want. Now, each END block is only executed when the main
threads terminates (which happens after any other Perl thread has been shut
down).

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agosrc/Makefile.am: Add installation directory defines to AM_CPPFLAGS.
Sebastian Harl [Sat, 17 Nov 2007 19:49:19 +0000 (20:49 +0100)]
src/Makefile.am: Add installation directory defines to AM_CPPFLAGS.

Those definitions used to be available when compiling collectd itself only.
However, they should be available to the plugins as well - else, different
paths would be used within different parts of collectd.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agocollectd-perl(5): Suggest the usage of -f when enabling the Perl debugger.
Sebastian Harl [Sat, 17 Nov 2007 19:48:29 +0000 (20:48 +0100)]
collectd-perl(5): Suggest the usage of -f when enabling the Perl debugger.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agoCollectd.pm: Improved error handling of failed callbacks.
Sebastian Harl [Sat, 17 Nov 2007 17:45:58 +0000 (18:45 +0100)]
Collectd.pm: Improved error handling of failed callbacks.

If call_by_name() failed, it will be handled the same way as if the callback
returned "false". The $@ variable may now be used by plugins as well to
describe errors in greater detail.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agocollectd-perl(5): Updated documenation of plugin_register().
Sebastian Harl [Sat, 17 Nov 2007 17:44:57 +0000 (18:44 +0100)]
collectd-perl(5): Updated documenation of plugin_register().

Document the usage of names instead of references to identify callbacks.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agoCollectd.pm: Use threads::shared to share @plugins between threads.
Sebastian Harl [Sat, 17 Nov 2007 17:43:19 +0000 (18:43 +0100)]
Collectd.pm: Use threads::shared to share @plugins between threads.

The list of plugins has to be common to all threads to be able to (un)register
callbacks after initialization. As threads::shared is not able to share
references to subroutines the callbacks now have to be identified by their
name. Collectd::call_by_name() is used to execute the callbacks.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agoperl plugin: Removed newline from debugging output.
Sebastian Harl [Sat, 17 Nov 2007 17:41:46 +0000 (18:41 +0100)]
perl plugin: Removed newline from debugging output.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agoperl plugin: Removed logging calls from call_by_name().
Sebastian Harl [Sat, 17 Nov 2007 17:41:08 +0000 (18:41 +0100)]
perl plugin: Removed logging calls from call_by_name().

The function might be called from a logging callback resulting in an infinite
loop. Instead the error message is now saved in $@.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agoperl plugin: Added Collectd::call_by_name().
Sebastian Harl [Sat, 17 Nov 2007 17:38:45 +0000 (18:38 +0100)]
perl plugin: Added Collectd::call_by_name().

This XSUB passes on a function call to a subroutine identified by its name
passed through $Collectd::cb_name. Collectd::call_by_name does not touch the
stack (unless in case of an error), thus any arguments and return values are
kept in place.

This function is meant to be used inside Collectd.pm only.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agoCollectd.pm: Removed an unused variable.
Sebastian Harl [Wed, 14 Nov 2007 13:21:04 +0000 (14:21 +0100)]
Collectd.pm: Removed an unused variable.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agoREADME: Added libperl to the list of dependencies.
Sebastian Harl [Wed, 14 Nov 2007 13:20:32 +0000 (14:20 +0100)]
README: Added libperl to the list of dependencies.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agoCollectd.pm: Check for ithread support.
Sebastian Harl [Wed, 14 Nov 2007 13:20:08 +0000 (14:20 +0100)]
Collectd.pm: Check for ithread support.

Abort if perl has been compiled without ithread support (i.e.
$Config{'useithreads'} is not defined).

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agoperl plugin: Added debugging output to display the ithread behavior.
Sebastian Harl [Wed, 14 Nov 2007 13:19:42 +0000 (14:19 +0100)]
perl plugin: Added debugging output to display the ithread behavior.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agocollectd-perl(5): Fixed a typo.
Sebastian Harl [Mon, 12 Nov 2007 15:38:13 +0000 (16:38 +0100)]
collectd-perl(5): Fixed a typo.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agocollectd2html.pl: Cleaned up Eddy's patch.
Sebastian Harl [Mon, 12 Nov 2007 12:05:54 +0000 (13:05 +0100)]
collectd2html.pl: Cleaned up Eddy's patch.

 * Use Perl's undef to identify invalid values.
 * Renamed the "host-is" command line option to "host".

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
17 years agobindings/Makefile.am: perl/Makefile depends on config.status.
Sebastian Harl [Tue, 13 Nov 2007 23:00:05 +0000 (00:00 +0100)]
bindings/Makefile.am: perl/Makefile depends on config.status.

Any configuration changes should be forwarded to the perl bindings. This patch
will cause perl/Makefile to be recreated after a rerun of the configure
script.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agoperl plugin: Added basic multi-threading support.
Sebastian Harl [Tue, 13 Nov 2007 22:59:25 +0000 (23:59 +0100)]
perl plugin: Added basic multi-threading support.

This patch maps each C thread, which accesses the perl plugin, to an
interpreter based Perl thread. The implementation has been inspired by Perl's
ithreads introduced in version 5.6.0 and should be compatible (as in: can be
used side-by-side) with it. You can use threads::shared to share data
structures between threads of either implementation.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agoperl plugin: Use PERL_NO_GET_CONTEXT.
Sebastian Harl [Tue, 13 Nov 2007 22:58:54 +0000 (23:58 +0100)]
perl plugin: Use PERL_NO_GET_CONTEXT.

All Perl_* API functions have been replaced with their unprefixed
counterparts. The currently used Perl interpreter is passed along to each
function requiring access to it. This removes the need to access the global
variable keeping the pointer to the Perl interpreter in most cases but the
entry points into the plugin (i.e. the callbacks registered with collectd).

This prepares the plugin to efficiently support multiple interpreters.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agoconfigure, perl plugin: Check for ithreads support.
Sebastian Harl [Tue, 13 Nov 2007 22:58:20 +0000 (23:58 +0100)]
configure, perl plugin: Check for ithreads support.

Disable the perl plugin if Perl does not support ithreads (introduced in Perl
5.6). The configure script will check, if USE_ITHREADS has been defined. Also,
the perl plugin won't build if it has not been defined.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agorrdtool plugin: Fix a memory leak..
Florian Forster [Wed, 14 Nov 2007 10:37:00 +0000 (11:37 +0100)]
rrdtool plugin: Fix a memory leak..

..in a VERY uncommon/rare case.

17 years agoMerge branch 'ff/fqdn'
Florian Forster [Tue, 13 Nov 2007 16:58:54 +0000 (16:58 +0000)]
Merge branch 'ff/fqdn'

17 years agocollectd: The new `FQDNLookup' option controls whether or not the FQDN should be...
Florian Forster [Tue, 13 Nov 2007 16:55:50 +0000 (16:55 +0000)]
collectd: The new `FQDNLookup' option controls whether or not the FQDN should be used.

So far the hostname as returned by `gethostname(2)' was used. This is not
practical for large setups.

To stay backwards compatible the option is disabled by default, but the sample
config file includes a line which sets this option so that (new) default
installations will have it enabled.

17 years agosrc/utils_avltree.[ch]: Rename all types and functions to use the prefix `c_avl_'.
Florian Forster [Fri, 12 Oct 2007 08:13:11 +0000 (10:13 +0200)]
src/utils_avltree.[ch]: Rename all types and functions to use the prefix `c_avl_'.

The prefix `avl_' clashed with an AVL implementation on Solaris 10..

17 years agocsv plugin: Add the possibility to store rates of counter DSes.
Florian Forster [Sat, 10 Nov 2007 15:09:03 +0000 (16:09 +0100)]
csv plugin: Add the possibility to store rates of counter DSes.

17 years agocollectd.conf(5): Renamed the `libvirtstats' plugin to `libvirt'.
Florian Forster [Sat, 10 Nov 2007 13:02:32 +0000 (14:02 +0100)]
collectd.conf(5): Renamed the `libvirtstats' plugin to `libvirt'.

Also formatting and formulations have been changed a little.

17 years agolibvirt plugin: Renamed the `libvirtstats' plugin to `libvirt'.
Florian Forster [Sat, 10 Nov 2007 12:47:49 +0000 (13:47 +0100)]
libvirt plugin: Renamed the `libvirtstats' plugin to `libvirt'.

17 years agoMerge branch 'collectd-4.2'
Florian Forster [Thu, 8 Nov 2007 21:22:19 +0000 (22:22 +0100)]
Merge branch 'collectd-4.2'

Conflicts:

src/types.db

17 years agoBumped version to 4.2.1; Updated ChangeLog. collectd-4.2.1
Florian Forster [Thu, 8 Nov 2007 20:55:13 +0000 (21:55 +0100)]
Bumped version to 4.2.1; Updated ChangeLog.

17 years agoMerge branch 'collectd-4.1' into collectd-4.2
Florian Forster [Thu, 8 Nov 2007 18:49:17 +0000 (19:49 +0100)]
Merge branch 'collectd-4.1' into collectd-4.2

Conflicts:

ChangeLog
contrib/PerlLib/Collectd.pm
version-gen.sh

17 years agoBumped version to 4.1.4; Updated ChangeLog collectd-4.1.4
Florian Forster [Thu, 8 Nov 2007 09:49:54 +0000 (10:49 +0100)]
Bumped version to 4.1.4; Updated ChangeLog

17 years agoconfigure.in: Improved the detection of libxml2 and libvirt.
Florian Forster [Thu, 8 Nov 2007 09:03:16 +0000 (10:03 +0100)]
configure.in: Improved the detection of libxml2 and libvirt.

17 years agolibvirtstats plugin: Fix typos and other mistakes.
Florian Forster [Thu, 8 Nov 2007 07:26:03 +0000 (08:26 +0100)]
libvirtstats plugin: Fix typos and other mistakes.

I didn't find them before because I couldn't compile the plugin without the
library at hand.

17 years agoconfigure.in: Change the libvirt detection so it works with my non-standard path.
Florian Forster [Thu, 8 Nov 2007 07:25:10 +0000 (08:25 +0100)]
configure.in: Change the libvirt detection so it works with my non-standard path.

17 years agolibvirtstats plugin: Minor cleanups.
Florian Forster [Wed, 7 Nov 2007 22:07:24 +0000 (23:07 +0100)]
libvirtstats plugin: Minor cleanups.

17 years agocontrib/collection.cgi: Fix the types related to the processes plugin.
Florian Forster [Wed, 7 Nov 2007 16:52:01 +0000 (16:52 +0000)]
contrib/collection.cgi: Fix the types related to the processes plugin.

17 years agocontrib/collection.cgi: Fix the ps_rss graph.
Florian Forster [Wed, 7 Nov 2007 09:33:51 +0000 (09:33 +0000)]
contrib/collection.cgi: Fix the ps_rss graph.

17 years agocontrib/collection.cgi: Add some missing types and labels.
Florian Forster [Wed, 7 Nov 2007 09:29:23 +0000 (09:29 +0000)]
contrib/collection.cgi: Add some missing types and labels.