src/utils_cache.c: Added the creation of an `OKAY' notification.
It is generated when a value was missing and is received again.
It is generated when a value was missing and is received again.
logfile plugin: Added a notification plugin.
src/plugin.c: Notification callbacks were added to the wrong linked list.
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.
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.
src/utils_threshold.h: Documented the public functions.
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.
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.
src/utils_threshold.c: Corrected and improved the handling of the `invert' setting.
collectd.conf(5): Wrote some more about the threshold configuration..
..in its current state.
..in its current state.
collectd.conf(5): Started documenting the threshold thingy.
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.
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.
Merge branch 'master' of octo@verplant.org:/var/lib/git/collectd
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.
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.
Merge branch 'collectd-4.2'
Conflicts:
src/utils_llist.c
Conflicts:
src/utils_llist.c
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>
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>
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>
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>
rc/utils_llist.c: Fix a bug in llist_prepend.
Copy the element to the tail if it's the first element.
Copy the element to the tail if it's the first element.
collectd.conf(5): Added a note about plugin loading order.
logfile plugin: fix the `Timestamp' configuration option.
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>
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>
Merge branch 'master' of octo@verplant.org:/var/lib/git/collectd
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>
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>
src/plugin.[ch]: Removed the complain functions.
iptables plugin: Removed the `complain' stuff.
apcups plugin: Removed the `complain' stuff.
cpu plugin: Removed the `complain' stuff.
disk plugin: Removed the `complain' stuff.
Merge branch 'ps/reuse'
contrib/network-proxy.py: Added a simply (unicast) proxy for collectd traffic.
ntpd plugin: Added the `ReverseLookups' option to disable reverse lookups.
Thanks to Simon Richter for pointing this out.
Thanks to Simon Richter for pointing this out.
Merge branch 'ps/reuse'
network plugin: Fix setsockopt for SO_REUSEADDR since value of loop variable changed
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'ps/reuse'
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>
* 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>
Unmarked the perl plugin to be experimental.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
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>
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>
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>
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>
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>
collectdmon(1): Added manpage for collectdmon.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
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>
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>
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>
src/utils_avltree.h: Improved the documentation.
The `key' argument is not copied and freed automatically. This was
insufficiently documented in the documentation..
The `key' argument is not copied and freed automatically. This was
insufficiently documented in the documentation..
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>
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>
collectd.conf(5): Fixed some typos.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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.
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.
perl plugin: Improved some error messages.
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.
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.
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.
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.
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>
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>
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>
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>
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>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
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>
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>
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>
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>
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>
perl plugin: Removed newline from debugging output.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
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>
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>
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>
Collectd.pm: Removed an unused variable.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
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>
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>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
collectd-perl(5): Fixed a typo.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
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>
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>
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>
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>
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>
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>
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>
Merge branch 'ff/fqdn'
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.
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.
csv plugin: Add the possibility to store rates of counter DSes.
collectd.conf(5): Renamed the `libvirtstats' plugin to `libvirt'.
Also formatting and formulations have been changed a little.
Also formatting and formulations have been changed a little.
libvirt plugin: Renamed the `libvirtstats' plugin to `libvirt'.
Merge branch 'collectd-4.2'
Conflicts:
src/types.db
Conflicts:
src/types.db
Bumped version to 4.2.1; Updated ChangeLog.
Merge branch 'collectd-4.1' into collectd-4.2
Conflicts:
ChangeLog
contrib/PerlLib/Collectd.pm
version-gen.sh
Conflicts:
ChangeLog
contrib/PerlLib/Collectd.pm
version-gen.sh
Bumped version to 4.1.4; Updated ChangeLog
configure.in: Improved the detection of libxml2 and libvirt.
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.
I didn't find them before because I couldn't compile the plugin without the
library at hand.
configure.in: Change the libvirt detection so it works with my non-standard path.
libvirtstats plugin: Minor cleanups.
contrib/collection.cgi: Fix the types related to the processes plugin.
contrib/collection.cgi: Fix the ps_rss graph.
contrib/collection.cgi: Add some missing types and labels.
src/Makefile.am: Fix "make dist" to include utils_threshold.h
Hello,
Attached is a trivial Makefile patch so that when using "make dist", you
actually get the src/utils_threshold.h file, which is needed to successfully
build.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Hello,
Attached is a trivial Makefile patch so that when using "make dist", you
actually get the src/utils_threshold.h file, which is needed to successfully
build.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
libvirtstats plugin: Add the `HostnameFormat' option.
This is something I missed out of the previous patch: I want a way to log
guests using their UUID instead of their name (more useful for us because of
the migration and other issues outlined before).
This adds:
<Plugin libvirtstats>
HostnameFormat "uuid"
</Plugin>
to let us do that. You can do other things as well such as:
HostnameFormat "name uuid"
to get "foo:1234-1234-1234-1234" as the hostname.
Rich.
This is something I missed out of the previous patch: I want a way to log
guests using their UUID instead of their name (more useful for us because of
the migration and other issues outlined before).
This adds:
<Plugin libvirtstats>
HostnameFormat "uuid"
</Plugin>
to let us do that. You can do other things as well such as:
HostnameFormat "name uuid"
to get "foo:1234-1234-1234-1234" as the hostname.
Rich.
Merge branch 'rj/libvirtstats'
Conflicts:
AUTHORS
Conflicts:
AUTHORS
configure.in: Fixed spaces followed by tabs and trailing whitespaces.
libvirtstats plugin: Added a plugin to collect virtual host statistics.
- rebased to git
- includes updates to the manpage
- ignorelist code now fixed
- removed debugging messages
Attached is a plugin allowing collectd to use libvirt to collect CPU, disk and
network statistics for domains.
Usage
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
- rebased to git
- includes updates to the manpage
- ignorelist code now fixed
- removed debugging messages
Attached is a plugin allowing collectd to use libvirt to collect CPU, disk and
network statistics for domains.
Usage
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
uuid plugin: Add a plugin which sets the hostname to an UUID.
Florian Forster wrote:
> Just out of curiosity: Why don't hostnames work for you?
For guests there's the question of what we put in the hostname field. The
previous plugin (libvirtstats) puts the guest's name in this field, but there
are some problems with this:
physicalserver1 <--- (hostname of physical server)
|
\--- database <--- (name of guest)
\--- web
physicalserver2
|
\--- database
\--- web
coldbackupserver
|
(no guests)
Guest names aren't really unique. Different physical servers may have guests
with overlapping names as in the example above. Also guest names aren't fixed.
Xen in particular renames guests at will. For example if a guest is about to
migrate then Xen renames the guest as 'migrating-foo' and if the guest is about
to shutdown Xen renames it as 'Zombie-foo'. The administrator of the physical
server can also rename guests.
While you're migrating you'll have an intermediate situation like this:
physicalserver1
|
\--- migrating-database
\--- migrating-web |
| migration
coldbackupserver |
| V
\--- database
\--- web
During live migrations the old instance ('migrating-foo') is still running.
The UUID is unique across physical servers, and is copied by migration and
preserved across shutdowns so if you care about which guest your stats "really"
came from then only the UUID tells you this.
Guests also have a hostname which is separate from the guest's name (the
guest's name is stored in the hypervisor, the hostname is stored inside the
guest's kernel). However it's not feasible to access the guest's hostname from
the hypervisor since this would involve some sort of snooping into the guest
kernel. The guest might be running Windows or FreeBSD etc. The only feasible
way to get this is to run an instance of collectd inside each guest, but then
the uuid plugin will also work in this scenario and can get the UUID since it
is exposed inside the guest either through an emulated BIOS or in
/sys/hypervisor/uuid.
Rich.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Florian Forster wrote:
> Just out of curiosity: Why don't hostnames work for you?
For guests there's the question of what we put in the hostname field. The
previous plugin (libvirtstats) puts the guest's name in this field, but there
are some problems with this:
physicalserver1 <--- (hostname of physical server)
|
\--- database <--- (name of guest)
\--- web
physicalserver2
|
\--- database
\--- web
coldbackupserver
|
(no guests)
Guest names aren't really unique. Different physical servers may have guests
with overlapping names as in the example above. Also guest names aren't fixed.
Xen in particular renames guests at will. For example if a guest is about to
migrate then Xen renames the guest as 'migrating-foo' and if the guest is about
to shutdown Xen renames it as 'Zombie-foo'. The administrator of the physical
server can also rename guests.
While you're migrating you'll have an intermediate situation like this:
physicalserver1
|
\--- migrating-database
\--- migrating-web |
| migration
coldbackupserver |
| V
\--- database
\--- web
During live migrations the old instance ('migrating-foo') is still running.
The UUID is unique across physical servers, and is copied by migration and
preserved across shutdowns so if you care about which guest your stats "really"
came from then only the UUID tells you this.
Guests also have a hostname which is separate from the guest's name (the
guest's name is stored in the hypervisor, the hostname is stored inside the
guest's kernel). However it's not feasible to access the guest's hostname from
the hypervisor since this would involve some sort of snooping into the guest
kernel. The guest might be running Windows or FreeBSD etc. The only feasible
way to get this is to run an instance of collectd inside each guest, but then
the uuid plugin will also work in this scenario and can get the UUID since it
is exposed inside the guest either through an emulated BIOS or in
/sys/hypervisor/uuid.
Rich.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'collectd-4.1' into collectd-4.2
Conflicts:
contrib/README
src/snmp.c
src/types.db
Conflicts:
contrib/README
src/snmp.c
src/types.db
snmp plugin: Don't try to free the request PDU - it segfaults for some reason.
According to other code I've seen this is never done by anyone else, so this
must mean that the snmp library takes care of this somehow. Man, I love well
documented libraries!
According to other code I've seen this is never done by anyone else, so this
must mean that the snmp library takes care of this somehow. Man, I love well
documented libraries!
snmp plugin: Be even more eager to free PDU structures.
snmp plugin: (Hopefully) fix a memory leak.
contrib/snmp-data.conf: Added even more UPS stuff.
contrib/fedora/collectd.spec: Updated for version 4.2.0
exec plugin: Allow arguments to be passed to the executed scripts.
Untested! Also, you can use the new config option `NagiosExec' to execute
Nagios scripts. The not yet implemented `NotificationExec' is supposed to
dispatch notifications to executables.
Untested! Also, you can use the new config option `NagiosExec' to execute
Nagios scripts. The not yet implemented `NotificationExec' is supposed to
dispatch notifications to executables.
exec plugin: Set PID of failed programs back to zero.
Otherwise the program will not be executed ever again after it failed once.
Otherwise the program will not be executed ever again after it failed once.
exec plugin: Added markers to fold methods in vim.
contrib/exec-munin.px: Added a simple Perl script which makes it possible to use Munin plugins in collectd.
The script has an embedded POD documentation.
The script has an embedded POD documentation.
src/utils_threshold.c: Added creation of a notification.
src/utils_threshold.[ch]: Added `ut_check_threshold' to check values against the configures thesholds.
This function is called from `plugin_dispatch_values' and prints a warning when
the values is outside of the configured threshold.
This function is called from `plugin_dispatch_values' and prints a warning when
the values is outside of the configured threshold.
Merge branch 'pull/collectd-4.1' into collectd-4.1