ted plugin: Fix indentation and other style cleanups.
* Removed C++-style comments.
* Fixed a search-and-replace gone bad in the license information.
* Removed whitespaces at the end of line.
* Removed C++-style comments.
* Fixed a search-and-replace gone bad in the license information.
* Removed whitespaces at the end of line.
ted plugin: Updated ted.c based on Florian's input.
ted plugin: Add plugin for ``The Energy Detective''.
<http://www.theenergydetective.com/>
<http://www.theenergydetective.com/>
src/plugin.c, network, rrdtool: Improved thread shutdown.
Just some comments, info messages and not assigning zero to pthread_t.
Just some comments, info messages and not assigning zero to pthread_t.
ping plugin: Add support for drop rate and standard deviation.
src/collectd.conf.in: Only include very few standard plugins by default.
Available but disabled by default plugins are listed with one hash
mark ("#") in front of them; unavailable plugins are listed with two hash
marks ("##") in front of them.
Plugins loaded by default are:
- syslog || logfile
- rrdtool || network || csv
- cpu
- interface
- load
- memory
Available but disabled by default plugins are listed with one hash
mark ("#") in front of them; unavailable plugins are listed with two hash
marks ("##") in front of them.
Plugins loaded by default are:
- syslog || logfile
- rrdtool || network || csv
- cpu
- interface
- load
- memory
protocols plugin: Add to configuration summary and collectd.conf.in.
protocols plugin: Add a plugin which collets protocol information.
Currently a Linux only plugin. This plugin collects information about
IP, TCP, UDP, etc.
Thanks to Ulf Zimmermann for his (indirect) suggestion ;)
Currently a Linux only plugin. This plugin collects information about
IP, TCP, UDP, etc.
Thanks to Ulf Zimmermann for his (indirect) suggestion ;)
Merge branch 'ff/java'
Merge branch 'collectd-4.6'
Merge branch 'collectd-4.5' into collectd-4.6
dns plugin: Don't pass a NULL pointer to `pcap_open_live'.
Although the documentation states clearly, that passing a NULL pointer
as device is okay and handled like "any", doing so will crash the daemon
on some systems, most notably *BSDs but Linux users have reported this
behavior, too.
This patch passes "any" when the pointer it NULL, which reportedly
resulted in a different behavior, but still crashing the daemon. We'll
keep trying ;)
Although the documentation states clearly, that passing a NULL pointer
as device is okay and handled like "any", doing so will crash the daemon
on some systems, most notably *BSDs but Linux users have reported this
behavior, too.
This patch passes "any" when the pointer it NULL, which reportedly
resulted in a different behavior, but still crashing the daemon. We'll
keep trying ;)
oracle plugin: Fix type size issue under 64bit systems.
Under 64bit systems, `ub4' is of a different size than `size_t', so that a
`(size_t *)' cannot be casted to a `(ub4 *)' automatically.
Under 64bit systems, `ub4' is of a different size than `size_t', so that a
`(size_t *)' cannot be casted to a `(ub4 *)' automatically.
contrib/oracle/create_schema.ddl: Add GPLv2 license information.
In accordance with Roman Klesel,
<C937BDA691901BFAD72AFEF3@ganga.office.noris.de>
In accordance with Roman Klesel,
<C937BDA691901BFAD72AFEF3@ganga.office.noris.de>
src/common.c: Fixed a race condition in check_create_dir().
Between checking for the existence of a directory using stat() and creating
the directory using mkdir(), another thread might have already created the
directory thus causing mkdir() to fail with errno == EEXIST. This case is now
handled sanely, no longer causing the function (and thus some write callback)
to fail in this case.
Most likely, this only happens during startup when creating the data
directories - later, no two threads should try to create the same directory.
Interestingly enough, I frequently encountered this issue on a single core
machine.
Between checking for the existence of a directory using stat() and creating
the directory using mkdir(), another thread might have already created the
directory thus causing mkdir() to fail with errno == EEXIST. This case is now
handled sanely, no longer causing the function (and thus some write callback)
to fail in this case.
Most likely, this only happens during startup when creating the data
directories - later, no two threads should try to create the same directory.
Interestingly enough, I frequently encountered this issue on a single core
machine.
collectd.conf(5), collectd-java(5): Updated the documentation for the Java plugin.
collectd-java(5): Documented the `match' and `target' callbacks.
bindings/java/: CollectdMatchFactoryInterface: Add more JavaDoc.
bindings/java/: Unify inline documentation terms.
s/function/method/
s/function/method/
java plugin: Add support for `target' callbacks.
With the ``do everything while in the configuration phase'' issues all
sorted out, this was actually kinda easy.
Matches and targets share a lot of code, so that the patch actually isn't
all that large..
Now, the Java plugin is feature-complete \o/
With the ``do everything while in the configuration phase'' issues all
sorted out, this was actually kinda easy.
Matches and targets share a lot of code, so that the patch actually isn't
all that large..
Now, the Java plugin is feature-complete \o/
Merge branch 'master' into ff/java
Merge branch 'collectd-4.6'
src/plugin.c: Assure that targets get dynamically allocated memory.
If targets want to replace the values, they will have to use dynamically
allocated memory. If they can't free the values, because the pointer
might point to statically allocated memory, memory will be lost.
Unfortunately stack allocation will not do, since we will then not be able
to detect multiple replacements.
To impose as little a performance issue as possible, the dynamic allo-
cation is only done when either chain is present. If the filter mecha-
nism is not used, the values will not be copied.
If targets want to replace the values, they will have to use dynamically
allocated memory. If they can't free the values, because the pointer
might point to statically allocated memory, memory will be lost.
Unfortunately stack allocation will not do, since we will then not be able
to detect multiple replacements.
To impose as little a performance issue as possible, the dynamic allo-
cation is only done when either chain is present. If the filter mecha-
nism is not used, the values will not be copied.
java plugin: Add support for `match' callbacks.
Holy crap, that one needed some serious magic.. The problem is, that the
filter chains are created before the initialization functions are run.
Since the Java plugin used to initialize the JVM and load the classes in
the init function, the match callbacks were not available in time.
The behavior is now: Create the JVM as soon as the the first `LoadPlugin'
option is found and load and configure all Java plugins while in the
configuration phase. (I. e. exactly like C plugins.)
Phew, I've earned that beer now.
Holy crap, that one needed some serious magic.. The problem is, that the
filter chains are created before the initialization functions are run.
Since the Java plugin used to initialize the JVM and load the classes in
the init function, the match callbacks were not available in time.
The behavior is now: Create the JVM as soon as the the first `LoadPlugin'
option is found and load and configure all Java plugins while in the
configuration phase. (I. e. exactly like C plugins.)
Phew, I've earned that beer now.
logfile plugin: Interpret `(notification_t *)->time == 0' as `now'.
java plugin: Expose `plugin_dispatch_notification' to Java plugins.
src/collectd.conf.in: Add `LoadPlugin java'.
src/plugin.c: Fix plugin_dispatch_notification again.
java plugin: Add support for `notification' callbacks.
src/plugin.c: Add a user_data_t pointer to notification callbacks.
bindings/java/: Add some javadoc markup to the interfaces.
collectd-java(5): Fix a typo.
Updated various copyright information.
collectd.conf(5): Updated the information on the java plugin.
java plugin: Add support for `log' callbacks.
src/plugin.c: Add a user_data_t pointer to log callbacks.
Updated various copyright information.
java plugin: Add support for `flush' callbacks.
src/plugin.c: Add a user_data_t pointer to flush callbacks.
collectd-unixsock(5): Slightly improved the description.
Merge branch 'master' into ff/java
Merge branch 'collectd-4.6'
Conflicts:
src/bind.c
Conflicts:
src/bind.c
Bumped version to 4.6.1; Updated ChangeLog.
Merge branch 'collectd-4.5' into collectd-4.6
Conflicts:
ChangeLog
version-gen.sh
The changes made in b6612126 and reverted in 5fa56b89 are retained in
collectd-4.6.
Conflicts:
ChangeLog
version-gen.sh
The changes made in b6612126 and reverted in 5fa56b89 are retained in
collectd-4.6.
15 years agoRevert "libiptc/Makefile.am: Added xtables.h, libxtc.h to libiptc_la_SOURCES." collectd-4.5.3
Revert "libiptc/Makefile.am: Added xtables.h, libxtc.h to libiptc_la_SOURCES."
This reverts commit b6612126d862d182d9219e0512fa9ca833272b62.
This commit should have gone in the master branch, not in the
collectd-4.5 branch.
This reverts commit b6612126d862d182d9219e0512fa9ca833272b62.
This commit should have gone in the master branch, not in the
collectd-4.5 branch.
Bumped version to 4.5.3; Updated ChangeLog.
java plugin: Rename `CollectdAPI' to `Collectd'.
collectd-java(5): Update the documentation.
Especially add the new ``native'' methods.
Especially add the new ``native'' methods.
java plugin: Change the name of all functions to conform to the Java convention.
java plugin: Expose `plugin_log' to Java plugins.
java plugin: Added comments for most functions.
Hopefully this'll make the code a bit easier to read.
Hopefully this'll make the code a bit easier to read.
java plugin: Implement registration for the other methods.
``Other'' meaning `Config', `Init', and `Shutdown' right now.
``Other'' meaning `Config', `Init', and `Shutdown' right now.
collectd-java(5): Updated the documentation.
java plugin: Implemented write plugin registration.
java plugin: Improve the read registration code.
java plugin: Implement plugin registration via `RegisterRead'.
src/plugin.c: Remove all read functions before calling the shutdown functions.
This way the user_data may be cleaned up before the final cleanup
phase..
This way the user_data may be cleaned up before the final cleanup
phase..
java plugin: Change the API to use the `DataSet' class.
java plugin: Use the changed plugin infrastructure to call read and write functions directly.
The read and write functions implemented in Java are now registered with
the "complex" interface as "java:<class name>". This way the cjni_read and
cjni_write functions can determine which Java function to call.
The patch is bigger than it'd need to be, because the order of some
functions has been changed..
The read and write functions implemented in Java are now registered with
the "complex" interface as "java:<class name>". This way the cjni_read and
cjni_write functions can determine which Java function to call.
The patch is bigger than it'd need to be, because the order of some
functions has been changed..
src/plugin.c: Change the write callbacks to receive a user_data_t pointer.
There are by far not as many write callbacks, so I've just changed the
callback in general rather than introducing a `complex write' callback.
There are by far not as many write callbacks, so I've just changed the
callback in general rather than introducing a `complex write' callback.
src/plugin.c: Implement `plugin_register_complex_read'
These read callbacks will receive a user pointer. This is nice for the
Java plugin, because the plugin infrastructure can now call one specific
Java read function.
AfaIk, the Perl plugin can make use of this, too.
These read callbacks will receive a user pointer. This is nice for the
Java plugin, because the plugin infrastructure can now call one specific
Java read function.
AfaIk, the Perl plugin can make use of this, too.
java plugin: Update the full name of the moved classes.
Revert "src/plugin.[ch]: Implement `plugin_dispatch_values_async'."
This reverts commit ba6497bdffb6a225eb6c86c8b8fa57a2520f0c5f.
This reverts commit ba6497bdffb6a225eb6c86c8b8fa57a2520f0c5f.
bindings/java: Moved the `PluginData' and `ValueList' classes.
And implemented various (trivial) `Collectd*Interface' classes.
And implemented various (trivial) `Collectd*Interface' classes.
java plugin: Implement a reference counter for the JVMEnv pointers.
This way one thread entering the Java plugin twice, e. g. with the
following call-chain, will not detach itself from the JVM before it is
completely done with it.
The problematic situation is:
-> cjni_read
-> ALLOC JVM
-> `Read' (in Java)
-> `DispatchValues' (in Java)
-> plugin_dispatch_values
-> cjni_write
-> ALLOC JVM (this is a no-op!)
-> `Write' (in Java)
-> DEALLOC JVM
This last dealloc is prematurely, because the thread is not done with
the JVM yet: It'd like to continue and return from `DispatchValues' to
execute some more Java code..
This way one thread entering the Java plugin twice, e. g. with the
following call-chain, will not detach itself from the JVM before it is
completely done with it.
The problematic situation is:
-> cjni_read
-> ALLOC JVM
-> `Read' (in Java)
-> `DispatchValues' (in Java)
-> plugin_dispatch_values
-> cjni_write
-> ALLOC JVM (this is a no-op!)
-> `Write' (in Java)
-> DEALLOC JVM
This last dealloc is prematurely, because the thread is not done with
the JVM yet: It'd like to continue and return from `DispatchValues' to
execute some more Java code..
types.db(5): Added a note about distributing custom types.db files.
perl plugin: Deprecated the use of plugin_register() to register data-sets.
A custom types.db file should be used instead.
A custom types.db file should be used instead.
Merge branch 'ff/java' of /var/lib/git/collectd into ff/java
collectd-java(5): Fix a typo.
bind plugin: Fix a typo.
java plugin: Use the new `plugin_dispatch_values_async' function.
Having Java read- and write-functions at the same time works now \o/
Having Java read- and write-functions at the same time works now \o/
src/plugin.[ch]: Implement `plugin_dispatch_values_async'.
This function differs from `plugin_dispatch_values' in that it will add
the value_list_t to a queue rather than calling the write functions
right away. This as at least two advantages:
- The _async function will often return faster, since no file
operation is done.
- The ``read thread'' and the ``write thread'' are not the same
thread. This makes it much easier for plugins that provide both,
`read' and `write' callbacks.
This function differs from `plugin_dispatch_values' in that it will add
the value_list_t to a queue rather than calling the write functions
right away. This as at least two advantages:
- The _async function will often return faster, since no file
operation is done.
- The ``read thread'' and the ``write thread'' are not the same
thread. This makes it much easier for plugins that provide both,
`read' and `write' callbacks.
java plugin: Conditionally register read, write, and shutdown callbacks.
Right now, this is a quick and dirty work around to get read functions
working again.
Right now, this is a quick and dirty work around to get read functions
working again.
java plugin: Implement `plugin_get_ds' aka. GetDS.
contrib/cussh.pl: Fixed and improved command parsing.
The input line is now split into separate tokens which are either quoted or
unquoted strings. This simplifies e.g. the parsing of identifiers as the whole
token may be interpreted as just the id string. This allows for specifying a
somewhat greedy regex which before led to the whole remainder of the input
line ending up in the type or type instance.
The input line is now split into separate tokens which are either quoted or
unquoted strings. This simplifies e.g. the parsing of identifiers as the whole
token may be interpreted as just the id string. This allows for specifying a
somewhat greedy regex which before led to the whole remainder of the input
line ending up in the type or type instance.
contrib/cussh.pl: Improved error reporting.
Collectd::Unixsock: Improved error handling in putval().
ipmi plugin: Use a less error-prone approach to build the sensor name.
table plugin, src/common: Un-escape '\t', '\n' and '\r' in column separators.
For this purpose, the function strunescape() has been added to the "common"
module. Currently, any escape sequence that's not '\t', '\n' or '\r' will be
expanded to the literal escaped character.
For this purpose, the function strunescape() has been added to the "common"
module. Currently, any escape sequence that's not '\t', '\n' or '\r' will be
expanded to the literal escaped character.
ipmi plugin: Fix an off-by-one error.
Hi,
One of my ipmi sensors has a name longer than DATA_MAX_NAME_LEN and this
results in a SEGV.
cu Peter
Hi,
One of my ipmi sensors has a name longer than DATA_MAX_NAME_LEN and this
results in a SEGV.
cu Peter
bind plugin: Fix a counter vs. gauge problem with memory statistics.
Thanks to Bruno for the heads-up :)
Thanks to Bruno for the heads-up :)
powerdns, utils_cmd_putval, utils_db_query: Use parse_value().
Besides cleaning up the code a little, this also adds more verbose error
messages.
Besides cleaning up the code a little, this also adds more verbose error
messages.
Moved parse_value() from the table plugin to the common module.
Some other plugins will find that useful as well.
Some other plugins will find that useful as well.
tables plugin: Added a generic plugin to parse tabular data.
Currently, the main purpose of this plugin is to be able to get information
from the Linux proc filesystem but it should be flexible enough to get data
from other sources as well.
Values are selected based on a given column separator and column numbers. The
configuration is a kind of a mix of the tail and *sql plugins' configurations.
A sample configuration might look like this:
<Plugin table>
<Table "/proc/slabinfo">
Instance "slabinfo"
Separator " "
<Result>
Type gauge
InstancePrefix "active_objs"
InstancesFrom 0
ValuesFrom 1
</Result>
<Result>
Type gauge
InstancePrefix "objperslab"
InstancesFrom 0
ValuesFrom 4
</Result>
</Table>
</Plugin>
Currently, the main purpose of this plugin is to be able to get information
from the Linux proc filesystem but it should be flexible enough to get data
from other sources as well.
Values are selected based on a given column separator and column numbers. The
configuration is a kind of a mix of the tail and *sql plugins' configurations.
A sample configuration might look like this:
<Plugin table>
<Table "/proc/slabinfo">
Instance "slabinfo"
Separator " "
<Result>
Type gauge
InstancePrefix "active_objs"
InstancesFrom 0
ValuesFrom 1
</Result>
<Result>
Type gauge
InstancePrefix "objperslab"
InstancesFrom 0
ValuesFrom 4
</Result>
</Table>
</Plugin>
Moved remove_special() from the bind plugin to the "common" module.
This function might be useful for other plugins as well. Also, it has been
renamed to replace_special() which is slightly more appropriate imho.
This function might be useful for other plugins as well. Also, it has been
renamed to replace_special() which is slightly more appropriate imho.
bind plugin: Fix various bugs.
On Mon, 16 February 2009 Florian Forster wrote:
> The new plugins are:
>
> * BIND: Name-server and zone statistics
A few bugs are hidden there, attached is a patch that fixes most
of those I've discovered untils now.
- Url parameter never considered
- missing type definition for dns_reject
- MemoryStats is linked to the wrong variable
(TODO: memory stats seem not to work, probably dispatch_counter()
for gauge value ...)
- SOAOutv6 should be translated to SOA-IPv6 instead of SOA-IPv4
in order to be saved correctly and not cause timestamp collisions
Bruno
On Mon, 16 February 2009 Florian Forster wrote:
> The new plugins are:
>
> * BIND: Name-server and zone statistics
A few bugs are hidden there, attached is a patch that fixes most
of those I've discovered untils now.
- Url parameter never considered
- missing type definition for dns_reject
- MemoryStats is linked to the wrong variable
(TODO: memory stats seem not to work, probably dispatch_counter()
for gauge value ...)
- SOAOutv6 should be translated to SOA-IPv6 instead of SOA-IPv4
in order to be saved correctly and not cause timestamp collisions
Bruno
java plugin: Add some comments to a nasty if-cascade.
java plugin: Divide times received from Java by 1000.
Java keeps time as milliseconds in 64bit integers. Let's keep it that
way and translate to epoch transparently.
The other way around, from C to Java, already multiplies by 1000.
Java keeps time as milliseconds in 64bit integers. Let's keep it that
way and translate to epoch transparently.
The other way around, from C to Java, already multiplies by 1000.
java plugin: Have "DispatchValues" return a meaningful status.
I. e. the status of "plugin_dispatch_values". That's as meaningful as
we're going to get.
I. e. the status of "plugin_dispatch_values". That's as meaningful as
we're going to get.
collectd-java(5): Add a manual page for the java plugin.
java plugin: Added the possibility to configure java plugins.
Merge branch 'master' into ff/java
src/liboconfig/oconfig.[ch]: Add `oconfig_clone'.
This new function clones an entire sub-tree, that can be free'd again
using `oconfig_free'.
This new function clones an entire sub-tree, that can be free'd again
using `oconfig_free'.
java plugin: Implemented oconfig types in Java.
The CollectdAPI class has been moved to the `org.collectd.api'
namespace, too, so that this stuff is together..
The CollectdAPI class has been moved to the `org.collectd.api'
namespace, too, so that this stuff is together..
java plugin: Added some configuration possibilities.
java plugin: Added the ability to have `Write' callbacks in Java modules.
I think right now having both, a `Read' and a `Write' function, would be
a problem, because the same thread would enter the JVM twice, possibly
detaching itself from the JVM when the write callback is finished, while
it actually still is in the read callback. Adding a `dispatch thread' or
something similar should take care of this problem.
Other than that, converting `data_set_t' and `value_list_t' to their
Java equivalents and back works fine now.
I think right now having both, a `Read' and a `Write' function, would be
a problem, because the same thread would enter the JVM twice, possibly
detaching itself from the JVM when the write callback is finished, while
it actually still is in the read callback. Adding a `dispatch thread' or
something similar should take care of this problem.
Other than that, converting `data_set_t' and `value_list_t' to their
Java equivalents and back works fine now.
collectd.conf(5): Removed the section about filter_pcre.
This plugin no longer exists ...
This plugin no longer exists ...
Don't unnecessarily link match_regex against libpcre.
Since no plugin currently uses libpcre, configure no longer checks for it and
it has been removed from README.
Since no plugin currently uses libpcre, configure no longer checks for it and
it has been removed from README.
README: Replaced filter plugins with matches and targets.