network plugin: Added support for sending and receiving notifications.
Notifications are sent ``out of band'', i. e. each notification is one packet
and they are not mixed with performance data values.
Right now there is no configuration option to prevent listening sockets from
receiving notifications nor to prevent sending sockets from sending
notifications. This may be an option for the future, though.
Notifications are sent ``out of band'', i. e. each notification is one packet
and they are not mixed with performance data values.
Right now there is no configuration option to prevent listening sockets from
receiving notifications nor to prevent sending sockets from sending
notifications. This may be an option for the future, though.
src/utils_threshold.c: Check that the <Threshold> block does not have any arguments.
liboconfig: Allow the argument list of blocks to be empty.
This way the `<Threshold>' block doesn't need a bogus argument just to make the
parser happy.
This way the `<Threshold>' block doesn't need a bogus argument just to make the
parser happy.
collectd: Added ``associative'' members to the notification_t structure.
A notification does not need to be related to any performance data collected by
collectd, but now it *may* be related. This is used in the threshold stuff
already and passed via ExecNotification in the exec plugin, too.
The new `notification_init' function in `src/common.c' and the
`NOTIFICATION_INIT_VL' macro simplify the initialization of these new fields.
A notification does not need to be related to any performance data collected by
collectd, but now it *may* be related. This is used in the threshold stuff
already and passed via ExecNotification in the exec plugin, too.
The new `notification_init' function in `src/common.c' and the
`NOTIFICATION_INIT_VL' macro simplify the initialization of these new fields.
16 years agocollectd.conf(5), collectd-exec(5): Documented the `NotificationExec' and `NagiosExec...
collectd.conf(5), collectd-exec(5): Documented the `NotificationExec' and `NagiosExec' options.
ChangeLog: Documented the new features in the master branch so far.
Also extended the TODO list a bit more, as things came to mind.
Also extended the TODO list a bit more, as things came to mind.
AUTHORS: Added Richard Jones.
Fixed some compiler warnings identified by gcc's -Wextra option.
The following issues have been addressed:
* comparison between signed and unsigned - this was found in several places
throughout the code and has been fixed in various ways
* missing initializer - an incomplete initializer has been used for two
struct instances in perl.c
* unused parameter - when applicable, the parameter has been removed; in
thirteen cases the parameter is required by different library API's and in
two cases the parameter was left in place to retain a consistent interface
within the affected modules; as __attribute__((unused)) is a GNU extension,
it has not been used to document those exceptions
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
The following issues have been addressed:
* comparison between signed and unsigned - this was found in several places
throughout the code and has been fixed in various ways
* missing initializer - an incomplete initializer has been used for two
struct instances in perl.c
* unused parameter - when applicable, the parameter has been removed; in
thirteen cases the parameter is required by different library API's and in
two cases the parameter was left in place to retain a consistent interface
within the affected modules; as __attribute__((unused)) is a GNU extension,
it has not been used to document those exceptions
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'pull/master'
Merge branch 'collectd-4.2'
Merge branch 'pull/collectd-4.2' into collectd-4.2
Merge branch 'ff/manpage'
types.db(5): Added a manpage documenting the format of the TypesDB file.
Appropriate pointers have been added to other manpages where appropriate.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Appropriate pointers have been added to other manpages where appropriate.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'collectd-4.2'
Merge branch 'collectd-4.1' into collectd-4.2
collectd-exec(5): Improved description of the value-list identifier.
A short note about valid values for the plugin and type names and the
respective instance names as well as a pointer to types.db has been added.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
A short note about valid values for the plugin and type names and the
respective instance names as well as a pointer to types.db has been added.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
TODO: Added some notes on what needs to be done before 4.3
It's only what I had in mind right now and not a complete list.
It's only what I had in mind right now and not a complete list.
collectd-exec(5): Documented the changes due to notifications and the Nagios plugin support.
Added support for more than one TypesDB file.
The "TypesDB" config option now accepts more than one filename. Each file will
be read in the specified order. If no filename has been given, the default
file will _not_ be read (I doubt this is a useful feature but it's imho the
most reasonable behavior).
This may, for example, be used to specify an additional file containing custom
data-set definitions. See the thread "Thought about exec and types.db" on the
mailing-list ([1]).
[1] http://mailman.verplant.org/pipermail/collectd/2008-January/001450.html
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
The "TypesDB" config option now accepts more than one filename. Each file will
be read in the specified order. If no filename has been given, the default
file will _not_ be read (I doubt this is a useful feature but it's imho the
most reasonable behavior).
This may, for example, be used to specify an additional file containing custom
data-set definitions. See the thread "Thought about exec and types.db" on the
mailing-list ([1]).
[1] http://mailman.verplant.org/pipermail/collectd/2008-January/001450.html
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'pull/master'
Merge branch 'collectd-4.2'
Merge branch 'collectd-4.1' into collectd-4.2
network plugin: Made network_receive() static.
This function is not exported to any other module.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
This function is not exported to any other module.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
logfile plugin: Added Florian to the list of copyright holders.
Most of the current version has been written by him.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Most of the current version has been written by him.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
collectd-perl(5): Added a note about submitting plugins.
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>
Bumped version to 4.2.4; Updated ChangeLog.
Merge branch 'collectd-4.1' into collectd-4.2
Conflicts:
ChangeLog
Conflicts:
ChangeLog
ChangeLog: Fixed the date of the 4.1.6 release.
Merge branch 'collectd-4.1' into collectd-4.2
Conflicts:
ChangeLog
version-gen.sh
Conflicts:
ChangeLog
version-gen.sh
Bumped version to 4.1.6; Updated ChangeLog.
Merge branch 'collectd-4.2'
Merge branch 'collectd-4.1' into collectd-4.2
src/configfile.c: Updated the copyright notice for 2008.
libvirt plugin: Updated the copyright notice for 2008.
libvirt plugin: Fix the HostnameFormat option.
The attached patch fixes HostnameFormat in libvirt driver.
The intended use for this was:
HostnameFormat "name"
generating hostnames like "<guestname>" (the default case), and:
HostnameFormat "hostname name"
generating hostnames like "<hostname>:<guestname>".
Somewhere along the way, however, that code got broken so it always adds a ":"
before the name, and doesn't concatenate any more, so you'd get weird hostnames
appearing like ":guest" which was supposed to be "hostname:guest".
The patch just reverts back to my original code.
Rich.
The attached patch fixes HostnameFormat in libvirt driver.
The intended use for this was:
HostnameFormat "name"
generating hostnames like "<guestname>" (the default case), and:
HostnameFormat "hostname name"
generating hostnames like "<hostname>:<guestname>".
Somewhere along the way, however, that code got broken so it always adds a ":"
before the name, and doesn't concatenate any more, so you'd get weird hostnames
appearing like ":guest" which was supposed to be "hostname:guest".
The patch just reverts back to my original code.
Rich.
bindings/Makefile.am: Replaced "make -C" with "cd && make".
BSD make does not support "make -C".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
BSD make does not support "make -C".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
bindings/Makefile.am: Removed a bashism.
Brace expansion using { and } is not defined by POSIX but rather a bash
extension and should thus not be used for portability reasons.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Brace expansion using { and } is not defined by POSIX but rather a bash
extension and should thus not be used for portability reasons.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
collectd.conf(5): Added a note about the availability of the "debug" loglevel.
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>
Merge branch 'collectd-4.2'
collectd.conf(5): Fix a messed up merge.
Merge branch 'collectd-4.2'
Merge branch 'collectd-4.1' into collectd-4.2
Conflicts:
src/collectd.conf.pod
Conflicts:
src/collectd.conf.pod
collectd.conf(5): Documented the fact that the configuration is processes from top to bottom.
collectd.conf(5): Added a note about plugin loading order.
src/configfile.c: Improve the "Plugin `%s' did not register a callback." warning.
unixsock plugin: Actually set the permissions for the socket.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/utils_cache.c: Call `ut_check_interesting' before sending OKAY notifications, too.
exec plugin: The execution of notification handling programs seems to work now.
src/utils_{cache,threshold}.c: Adapted to the new AVL interface.
Merge branch 'collectd-4.2'
Conflicts:
bindings/Makefile.am
Conflicts:
bindings/Makefile.am
Bumped version to 4.2.3; Updated ChangeLog.
build system: Yet another way to solve the src-dir vs. build-dir issue.
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>
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>
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>
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>
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>
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>
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>
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>
Updated the changelog.
Merge branch 'collectd-4.1' into collectd-4.2
Conflicts:
ChangeLog
version-gen.sh
Conflicts:
ChangeLog
version-gen.sh
Bumped version to 4.1.5; Updated ChangeLog.
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.
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.
sensors plugin: Implemented support for libsensors3.
16 years agoexec plugin: Added the possibility to execute programs upon notifications (EXPERIMENTAL)
exec plugin: Added the possibility to execute programs upon notifications (EXPERIMENTAL)
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.
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.
Thanks to Michael Tiernan for reporting this bug.
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.
Bumped version to 4.2.2; Updated ChangeLog.
Merge branch 'collectd-4.1' into collectd-4.2
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>