Florian Forster [Tue, 24 Feb 2009 09:53:43 +0000 (10:53 +0100)]
collectd-java(5): Documented the `match' and `target' callbacks.
Florian Forster [Tue, 24 Feb 2009 09:13:11 +0000 (10:13 +0100)]
bindings/java/: CollectdMatchFactoryInterface: Add more JavaDoc.
Florian Forster [Tue, 24 Feb 2009 09:12:45 +0000 (10:12 +0100)]
bindings/java/: Unify inline documentation terms.
s/function/method/
Florian Forster [Tue, 24 Feb 2009 09:11:56 +0000 (10:11 +0100)]
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/
Florian Forster [Tue, 24 Feb 2009 09:16:19 +0000 (10:16 +0100)]
Merge branch 'master' into ff/java
Florian Forster [Tue, 24 Feb 2009 09:15:52 +0000 (10:15 +0100)]
Merge branch 'collectd-4.6'
Florian Forster [Tue, 24 Feb 2009 09:08:29 +0000 (10:08 +0100)]
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.
Florian Forster [Mon, 23 Feb 2009 17:59:04 +0000 (18:59 +0100)]
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.
Florian Forster [Mon, 23 Feb 2009 14:38:29 +0000 (15:38 +0100)]
logfile plugin: Interpret `(notification_t *)->time == 0' as `now'.
Florian Forster [Mon, 23 Feb 2009 14:37:44 +0000 (15:37 +0100)]
java plugin: Expose `plugin_dispatch_notification' to Java plugins.
Florian Forster [Mon, 23 Feb 2009 14:37:01 +0000 (15:37 +0100)]
src/collectd.conf.in: Add `LoadPlugin java'.
Florian Forster [Mon, 23 Feb 2009 14:36:40 +0000 (15:36 +0100)]
src/plugin.c: Fix plugin_dispatch_notification again.
Florian Forster [Mon, 23 Feb 2009 13:57:56 +0000 (14:57 +0100)]
java plugin: Add support for `notification' callbacks.
Florian Forster [Mon, 23 Feb 2009 13:50:03 +0000 (14:50 +0100)]
src/plugin.c: Add a user_data_t pointer to notification callbacks.
Florian Forster [Sun, 22 Feb 2009 23:05:35 +0000 (00:05 +0100)]
bindings/java/: Add some javadoc markup to the interfaces.
Florian Forster [Sun, 22 Feb 2009 22:30:06 +0000 (23:30 +0100)]
collectd-java(5): Fix a typo.
Sebastian Harl [Sun, 22 Feb 2009 21:53:50 +0000 (22:53 +0100)]
Updated various copyright information.
Florian Forster [Sun, 22 Feb 2009 22:18:58 +0000 (23:18 +0100)]
collectd.conf(5): Updated the information on the java plugin.
Florian Forster [Sun, 22 Feb 2009 22:18:43 +0000 (23:18 +0100)]
java plugin: Add support for `log' callbacks.
Florian Forster [Sun, 22 Feb 2009 22:03:00 +0000 (23:03 +0100)]
src/plugin.c: Add a user_data_t pointer to log callbacks.
Sebastian Harl [Sun, 22 Feb 2009 21:53:50 +0000 (22:53 +0100)]
Updated various copyright information.
Florian Forster [Sun, 22 Feb 2009 21:15:47 +0000 (22:15 +0100)]
java plugin: Add support for `flush' callbacks.
Florian Forster [Sun, 22 Feb 2009 20:48:05 +0000 (21:48 +0100)]
src/plugin.c: Add a user_data_t pointer to flush callbacks.
Florian Forster [Sun, 22 Feb 2009 18:50:14 +0000 (19:50 +0100)]
Merge branch 'master' into ff/java
Florian Forster [Sun, 22 Feb 2009 18:49:33 +0000 (19:49 +0100)]
Merge branch 'collectd-4.6'
Conflicts:
src/bind.c
Florian Forster [Sun, 22 Feb 2009 18:43:53 +0000 (19:43 +0100)]
Bumped version to 4.6.1; Updated ChangeLog.
Florian Forster [Sun, 22 Feb 2009 18:31:49 +0000 (19:31 +0100)]
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.
Florian Forster [Sun, 22 Feb 2009 18:29:49 +0000 (19:29 +0100)]
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.
Florian Forster [Sun, 22 Feb 2009 18:22:01 +0000 (19:22 +0100)]
Bumped version to 4.5.3; Updated ChangeLog.
Florian Forster [Sun, 22 Feb 2009 18:10:56 +0000 (19:10 +0100)]
java plugin: Rename `CollectdAPI' to `Collectd'.
Florian Forster [Sun, 22 Feb 2009 18:00:23 +0000 (19:00 +0100)]
collectd-java(5): Update the documentation.
Especially add the new ``native'' methods.
Florian Forster [Sun, 22 Feb 2009 17:55:27 +0000 (18:55 +0100)]
java plugin: Change the name of all functions to conform to the Java convention.
Florian Forster [Sun, 22 Feb 2009 18:02:23 +0000 (19:02 +0100)]
Revert part of
5f195369: Accidentally commited changes to src/Makefile.am.
Florian Forster [Sun, 22 Feb 2009 17:32:02 +0000 (18:32 +0100)]
java plugin: Expose `plugin_log' to Java plugins.
Florian Forster [Sun, 22 Feb 2009 16:51:40 +0000 (17:51 +0100)]
java plugin: Added comments for most functions.
Hopefully this'll make the code a bit easier to read.
Florian Forster [Sun, 22 Feb 2009 16:26:42 +0000 (17:26 +0100)]
java plugin: Implement registration for the other methods.
``Other'' meaning `Config', `Init', and `Shutdown' right now.
Florian Forster [Sun, 22 Feb 2009 13:02:05 +0000 (14:02 +0100)]
collectd-java(5): Updated the documentation.
Florian Forster [Sun, 22 Feb 2009 12:07:26 +0000 (13:07 +0100)]
java plugin: Implemented write plugin registration.
Florian Forster [Sun, 22 Feb 2009 11:46:42 +0000 (12:46 +0100)]
java plugin: Improve the read registration code.
Florian Forster [Sun, 22 Feb 2009 11:18:41 +0000 (12:18 +0100)]
java plugin: Implement plugin registration via `RegisterRead'.
Florian Forster [Sun, 22 Feb 2009 11:16:45 +0000 (12:16 +0100)]
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..
Florian Forster [Sun, 22 Feb 2009 10:29:12 +0000 (11:29 +0100)]
java plugin: Change the API to use the `DataSet' class.
Florian Forster [Sat, 21 Feb 2009 17:39:57 +0000 (18:39 +0100)]
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..
Florian Forster [Sat, 21 Feb 2009 17:35:45 +0000 (18:35 +0100)]
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.
Florian Forster [Sat, 21 Feb 2009 17:29:52 +0000 (18:29 +0100)]
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.
Florian Forster [Sat, 21 Feb 2009 17:20:44 +0000 (18:20 +0100)]
java plugin: Update the full name of the moved classes.
Florian Forster [Sat, 21 Feb 2009 11:25:29 +0000 (12:25 +0100)]
Revert "src/plugin.[ch]: Implement `plugin_dispatch_values_async'."
This reverts commit
ba6497bdffb6a225eb6c86c8b8fa57a2520f0c5f.
Florian Forster [Sat, 21 Feb 2009 10:39:25 +0000 (11:39 +0100)]
bindings/java: Moved the `PluginData' and `ValueList' classes.
And implemented various (trivial) `Collectd*Interface' classes.
Florian Forster [Sat, 21 Feb 2009 08:13:43 +0000 (09:13 +0100)]
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..
Sebastian Harl [Fri, 20 Feb 2009 12:25:12 +0000 (13:25 +0100)]
types.db(5): Added a note about distributing custom types.db files.
Sebastian Harl [Fri, 20 Feb 2009 12:20:02 +0000 (13:20 +0100)]
perl plugin: Deprecated the use of plugin_register() to register data-sets.
A custom types.db file should be used instead.
Florian Forster [Fri, 20 Feb 2009 10:13:38 +0000 (11:13 +0100)]
Merge branch 'ff/java' of /var/lib/git/collectd into ff/java
Florian Forster [Fri, 20 Feb 2009 10:13:21 +0000 (11:13 +0100)]
collectd-java(5): Fix a typo.
Florian Forster [Fri, 20 Feb 2009 10:12:50 +0000 (11:12 +0100)]
bind plugin: Fix a typo.
Florian Forster [Thu, 19 Feb 2009 22:38:52 +0000 (23:38 +0100)]
java plugin: Use the new `plugin_dispatch_values_async' function.
Having Java read- and write-functions at the same time works now \o/
Florian Forster [Thu, 19 Feb 2009 22:28:16 +0000 (23:28 +0100)]
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.
Florian Forster [Thu, 19 Feb 2009 20:59:52 +0000 (21:59 +0100)]
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.
Florian Forster [Thu, 19 Feb 2009 20:59:09 +0000 (21:59 +0100)]
java plugin: Implement `plugin_get_ds' aka. GetDS.
Sebastian Harl [Thu, 19 Feb 2009 11:09:46 +0000 (12:09 +0100)]
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.
Sebastian Harl [Thu, 19 Feb 2009 10:04:49 +0000 (11:04 +0100)]
contrib/cussh.pl: Improved error reporting.
Sebastian Harl [Thu, 19 Feb 2009 10:03:01 +0000 (11:03 +0100)]
Collectd::Unixsock: Improved error handling in putval().
Florian Forster [Thu, 19 Feb 2009 12:45:45 +0000 (13:45 +0100)]
ipmi plugin: Use a less error-prone approach to build the sensor name.
Sebastian Harl [Thu, 19 Feb 2009 12:14:35 +0000 (13:14 +0100)]
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.
Peter Holik [Thu, 19 Feb 2009 12:00:59 +0000 (13:00 +0100)]
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
Florian Forster [Thu, 19 Feb 2009 09:12:16 +0000 (10:12 +0100)]
bind plugin: Fix a counter vs. gauge problem with memory statistics.
Thanks to Bruno for the heads-up :)
Sebastian Harl [Thu, 19 Feb 2009 08:48:14 +0000 (09:48 +0100)]
powerdns, utils_cmd_putval, utils_db_query: Use parse_value().
Besides cleaning up the code a little, this also adds more verbose error
messages.
Sebastian Harl [Thu, 19 Feb 2009 08:14:22 +0000 (09:14 +0100)]
Moved parse_value() from the table plugin to the common module.
Some other plugins will find that useful as well.
Sebastian Harl [Thu, 19 Feb 2009 07:56:37 +0000 (08:56 +0100)]
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>
Sebastian Harl [Wed, 18 Feb 2009 13:20:51 +0000 (14:20 +0100)]
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.
Bruno Prémont [Thu, 19 Feb 2009 08:42:05 +0000 (09:42 +0100)]
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
Florian Forster [Wed, 18 Feb 2009 22:40:23 +0000 (23:40 +0100)]
java plugin: Add some comments to a nasty if-cascade.
Florian Forster [Wed, 18 Feb 2009 22:39:57 +0000 (23:39 +0100)]
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.
Florian Forster [Wed, 18 Feb 2009 22:38:23 +0000 (23:38 +0100)]
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.
Florian Forster [Wed, 18 Feb 2009 22:35:59 +0000 (23:35 +0100)]
collectd-java(5): Add a manual page for the java plugin.
Florian Forster [Wed, 18 Feb 2009 17:43:27 +0000 (18:43 +0100)]
java plugin: Added the possibility to configure java plugins.
Florian Forster [Wed, 18 Feb 2009 17:46:40 +0000 (18:46 +0100)]
Merge branch 'master' into ff/java
Florian Forster [Wed, 18 Feb 2009 17:41:20 +0000 (18:41 +0100)]
src/liboconfig/oconfig.[ch]: Add `oconfig_clone'.
This new function clones an entire sub-tree, that can be free'd again
using `oconfig_free'.
Florian Forster [Wed, 18 Feb 2009 15:43:26 +0000 (16:43 +0100)]
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..
Florian Forster [Wed, 18 Feb 2009 13:20:02 +0000 (14:20 +0100)]
java plugin: Added some configuration possibilities.
Florian Forster [Wed, 18 Feb 2009 11:49:56 +0000 (12:49 +0100)]
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.
Sebastian Harl [Wed, 18 Feb 2009 11:09:34 +0000 (12:09 +0100)]
collectd.conf(5): Removed the section about filter_pcre.
This plugin no longer exists ...
Sebastian Harl [Wed, 18 Feb 2009 11:06:18 +0000 (12:06 +0100)]
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.
Sebastian Harl [Wed, 18 Feb 2009 10:52:34 +0000 (11:52 +0100)]
README: Replaced filter plugins with matches and targets.
Sebastian Harl [Wed, 18 Feb 2009 10:36:05 +0000 (11:36 +0100)]
README: Added the oracle plugin and libclntsh.
Sebastian Harl [Wed, 18 Feb 2009 10:24:40 +0000 (11:24 +0100)]
README: Added curl plugin.
Florian Forster [Tue, 17 Feb 2009 22:45:40 +0000 (23:45 +0100)]
java plugin: Add an early prototype of a Java binding, similar to the Perl plugin.
It's totally proof-of-concept, but it's possible to dispatch values from
a Java class using the ValueList implementation provided by Doug
MacEachern from Hyperic. The other way around is not yet implemented,
but that's just a matter of time and code. Configuration, notifications,
targets, matches - all that is still missing.
Right now, the code requires JNI version 1.2. Maybe I'll try to
introduce compatibility with JNI 1.1 at a later point, if it's really
useful for somebody.
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Florian Forster [Mon, 16 Feb 2009 21:56:37 +0000 (22:56 +0100)]
Merge branch 'sh/next'
Sebastian Harl [Mon, 16 Feb 2009 21:41:19 +0000 (22:41 +0100)]
postgresql: Fixed calculation of a database's max_params_num.
This parameter is used to store the size of a frequently used temporary list
and allows that it may be efficiently stored on the stack. It was accidentally
lost in commit
4d380d9, triggering an assertion in c_psql_exec_query_params().
Sebastian Harl [Mon, 16 Feb 2009 21:16:22 +0000 (22:16 +0100)]
collectd.conf(5): Fixed some typos.
Florian Forster [Mon, 16 Feb 2009 21:08:45 +0000 (22:08 +0100)]
libcollectdclient: Use `EILSEQ' rather than `EPROTO'.
EPROTO is an XSR (XSI streams) extension and not supported on some
platforms (OpenBSD, apparently).
Florian Forster [Mon, 16 Feb 2009 17:17:53 +0000 (18:17 +0100)]
src/utils_db_query.c: Make `InstancePrefix' and `InstancesFrom' optional.
This is required by the default PostgreSQL queries.
Florian Forster [Mon, 16 Feb 2009 16:51:26 +0000 (17:51 +0100)]
Merge branch 'sh/next'
Conflicts:
ChangeLog
Florian Forster [Mon, 16 Feb 2009 16:49:38 +0000 (17:49 +0100)]
collectd.conf(5): Fixed and improved the section about the filter mechanism.
Sebastian Harl [Mon, 16 Feb 2009 15:40:40 +0000 (16:40 +0100)]
src/Makefile.am: Link utils_db_query into the postgresql plugin.
Sebastian Harl [Mon, 16 Feb 2009 15:35:54 +0000 (16:35 +0100)]
collectd-perl(5): Documented the filter chain support.
Florian Forster [Mon, 16 Feb 2009 14:45:15 +0000 (15:45 +0100)]
ChangeLog: Updated date and fixed a typo.
Florian Forster [Mon, 16 Feb 2009 13:31:50 +0000 (14:31 +0100)]
collectd.conf(5): Fix a minor formatting error.
Sebastian Harl [Mon, 16 Feb 2009 14:43:17 +0000 (15:43 +0100)]
ChangeLog: Added changes to the perl plugin.
Sebastian Harl [Mon, 16 Feb 2009 14:16:48 +0000 (15:16 +0100)]
src/filter_chain.c: Made match_proc_t.create optional.
In most cases it does not make sense to not provide a create callback.
However, we never know what the future might bring, so let's chose the more
flexible approach.
Sebastian Harl [Mon, 16 Feb 2009 14:07:27 +0000 (15:07 +0100)]
src/filter_chain.c: Fixed typos in warning / error messages.