collectd.git
15 years agoMerge branch 'collectd-4.6'
Florian Forster [Mon, 9 Mar 2009 17:48:12 +0000 (18:48 +0100)]
Merge branch 'collectd-4.6'

15 years agorrdtool plugin: Beatify a debugging message.
Florian Forster [Mon, 9 Mar 2009 17:45:46 +0000 (18:45 +0100)]
rrdtool plugin: Beatify a debugging message.

15 years agoMerge branch 'sh/collectd-4.5' into sh/collectd-4.6
Sebastian Harl [Sat, 7 Mar 2009 17:03:42 +0000 (18:03 +0100)]
Merge branch 'sh/collectd-4.5' into sh/collectd-4.6

Conflicts:
contrib/collection3/lib/Collectd/Graph/Common.pm
src/postgresql_default.conf

15 years agopostgresql_default.conf: Make sure the "disk_io" query does not return NULLs.
Sebastian Harl [Sat, 7 Mar 2009 16:43:54 +0000 (17:43 +0100)]
postgresql_default.conf: Make sure the "disk_io" query does not return NULLs.

Starting with some version between 8.3.3 and 8.3.6, pg_statio_*_tables returns
NULL instead of 0 for statistics if no instance of the appropriate relation
exists. PQgetvalue() returns an empty string in that case which would then
result in error messages when udb_result_submit() tries to convert that to a
number.

Now, the "disk_io" query uses PostgreSQL's coalesce() function to make sure 0
is returned instead of NULL.

15 years agosrc/plugin.c: Remove an unused variable.
Florian Forster [Sat, 7 Mar 2009 11:22:10 +0000 (12:22 +0100)]
src/plugin.c: Remove an unused variable.

15 years agocontrib/exec-nagios.px: Make it possible to run the same script multiple times.
Tom Throckmorton [Fri, 6 Mar 2009 18:28:26 +0000 (19:28 +0100)]
contrib/exec-nagios.px: Make it possible to run the same script multiple times.

15 years agorrdtool plugin: Fix a possible race condition at startup.
Florian Forster [Fri, 6 Mar 2009 15:53:28 +0000 (16:53 +0100)]
rrdtool plugin: Fix a possible race condition at startup.

On a very busy system, if the network plugin was initialized before the
rrdtool plugin, `rrd_cache_insert' may be called before the RRDtool
plugin is initialized. It would then pass `cache == NULL' to
`c_avl_get', resulting in a segmentation fault.

15 years agocollectd.conf(5): Don't mix spaces and tabs in configuration examples.
Sebastian Harl [Thu, 5 Mar 2009 10:49:17 +0000 (11:49 +0100)]
collectd.conf(5): Don't mix spaces and tabs in configuration examples.

15 years agocontrib/collection3: Fix stacking with NAN values.
Florian Forster [Thu, 5 Mar 2009 08:41:35 +0000 (09:41 +0100)]
contrib/collection3: Fix stacking with NAN values.

Stacked values above NAN values were not drawn previously..

15 years agocontrib/collection3: Minor cleanups.
Florian Forster [Thu, 5 Mar 2009 08:35:50 +0000 (09:35 +0100)]
contrib/collection3: Minor cleanups.

15 years agocontrib/collection3: Add the "IgnoreUnknown" config option.
Florian Forster [Thu, 5 Mar 2009 08:35:28 +0000 (09:35 +0100)]
contrib/collection3: Add the "IgnoreUnknown" config option.

Used by the "GenericStacked" graphs.

15 years agocontrib/collection3: Add "Total" to "GenericIO" graphs.
Florian Forster [Thu, 5 Mar 2009 08:33:02 +0000 (09:33 +0100)]
contrib/collection3: Add "Total" to "GenericIO" graphs.

Using the RRDtool 1.2 VDEF syntax.

15 years agocontrib/collection3: Add the "DataDir" config option.
Florian Forster [Thu, 5 Mar 2009 08:30:06 +0000 (09:30 +0100)]
contrib/collection3: Add the "DataDir" config option.

15 years agocontrib/collection3/bin/.htaccess: s/SetHandler/AddHandler/
Florian Forster [Thu, 5 Mar 2009 07:57:29 +0000 (08:57 +0100)]
contrib/collection3/bin/.htaccess: s/SetHandler/AddHandler/

SetHandler doesn't accept a file extension.

15 years agocontrib/collection3/bin/.htaccess: Add file.
Florian Forster [Thu, 5 Mar 2009 07:51:51 +0000 (08:51 +0100)]
contrib/collection3/bin/.htaccess: Add file.

This has been missing. Wonder why nobody complained..?

15 years agopostgresql_default.conf: Added a short usage and copyright header.
Sebastian Harl [Wed, 4 Mar 2009 15:50:06 +0000 (16:50 +0100)]
postgresql_default.conf: Added a short usage and copyright header.

15 years agopostgresql plugin: Made variable names more self-explanatory.
Sebastian Harl [Wed, 4 Mar 2009 15:00:53 +0000 (16:00 +0100)]
postgresql plugin: Made variable names more self-explanatory.

Also, while I was at it, improved some error messages.

15 years agopostgresql_default.conf: Don't use the deprecated {Min,Max}PgVersion options.
Sebastian Harl [Wed, 4 Mar 2009 12:39:16 +0000 (13:39 +0100)]
postgresql_default.conf: Don't use the deprecated {Min,Max}PgVersion options.

15 years agocollectd.conf(5): Mention that `Oracle' doesn't like semicolons..
Florian Forster [Mon, 2 Mar 2009 14:30:11 +0000 (15:30 +0100)]
collectd.conf(5): Mention that `Oracle' doesn't like semicolons..

.. at the end of the SQL statement.

15 years agolibcollectdclient: Check if the file handle is valid before writing to it.
Florian Forster [Mon, 2 Mar 2009 14:27:12 +0000 (15:27 +0100)]
libcollectdclient: Check if the file handle is valid before writing to it.

And free allocated memory when connecting fails. Only assign anything to
the user-provided pointer if `lcc_connect' succeeds. This should make
error-handling much more straight-forward.

15 years agosnmp plugin: Added a note about a potential bug that needs fixing.
Florian Forster [Mon, 2 Mar 2009 08:49:22 +0000 (09:49 +0100)]
snmp plugin: Added a note about a potential bug that needs fixing.

Negative absolute (gauge) values may be casted to an unsigned integer
variable on their way throught he daemon, producing VERY HIGH tempera-
tures in winter..

15 years agoMerge branch 'bp/php-collection' into collectd-4.5
Florian Forster [Mon, 2 Mar 2009 08:31:37 +0000 (09:31 +0100)]
Merge branch 'bp/php-collection' into collectd-4.5

15 years agophp-collection: Add support for named graph lists as favorites
Bruno Prémont [Sun, 1 Mar 2009 21:20:10 +0000 (22:20 +0100)]
php-collection: Add support for named graph lists as favorites

php-collection: Add support for named graph lists as favorites

php-collection allowed saving and loading a list of graphs from a
cookie.
This patch changes loading/saving to provide support for naming
of favorite graph lists.
When saving a name has to be provided (up to 30 alphanumerical
characters includeing underscore and hyphen.
For loading a named list can be selected from a dropdown list (this list
is refreshed when it gets focus) of available favorites.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agophp-collection/functions.php: Escape/avoid problematic characters in RRD commandline
Bruno Prémont [Sun, 1 Mar 2009 21:20:06 +0000 (22:20 +0100)]
php-collection/functions.php: Escape/avoid problematic characters in RRD commandline

php-collection/functions.php: Escape/avoid problematic characters in RRD commandline

rrdtool does not like '!' in variable names so replace them with '_'.
(bind plugin has them in a few type-instances and type-instance is used
as variable name by MetaGraphs)
Also escape rrdtool field seperators that might appear in file names.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agophp-collection/definitions.php: Add MetaGraph definitions for bind plugin
Bruno Prémont [Sun, 1 Mar 2009 21:19:59 +0000 (22:19 +0100)]
php-collection/definitions.php: Add MetaGraph definitions for bind plugin

php-collection/definitions.php: Add MetaGraph definitions for bind plugin

Add metagraph definition and matching function for the various
types used by bind plugin.
Adjust the memory MetaGraph function to support bind memory statistics.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agophp-collection/graph.php: Add missing error500() function
Bruno Prémont [Sun, 1 Mar 2009 21:19:49 +0000 (22:19 +0100)]
php-collection/graph.php: Add missing error500() function

php-collection/graph.php: Add missing error500() function

When a call to rrdtool fails or some other internal error occurs
a HTTP error with code 500 and matching error image should be
returned, added the missing error500() function which does this
the same way as error404() and error400() functions.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agophp-collection: Fixes and multiple saved graph lists
Bruno Prémont [Sun, 1 Mar 2009 21:19:43 +0000 (22:19 +0100)]
php-collection: Fixes and multiple saved graph lists

php-collection/functions.php: Fix collectd_flush()

Some obsolete code in collectd_flush() caused PHP Notice errors
and prevented caused the function to return before attempting
to ask collectd to flush cache.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agophp-collection/definitions.php: Add missing MetaGraph for tcp_connections
Bruno Prémont [Sun, 1 Mar 2009 21:19:37 +0000 (22:19 +0100)]
php-collection/definitions.php: Add missing MetaGraph for tcp_connections

php-collection/definitions.php: Add missing MetaGraph for tcp_connections

Add missing MetaGraph reference for tcp_connections and fix DS name
for the MetaGraph

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agocontrib/php-collection: A few more bug-fixes to the graphing scripts.
Bruno Prémont [Mon, 2 Mar 2009 08:24:39 +0000 (09:24 +0100)]
contrib/php-collection: A few more bug-fixes to the graphing scripts.

This removes some obsolete code which prevents flush from working and adds
missing wrapper error500().

15 years agosrc/plugin.c, network, rrdtool: Improved thread shutdown.
Florian Forster [Sun, 1 Mar 2009 08:43:54 +0000 (09:43 +0100)]
src/plugin.c, network, rrdtool: Improved thread shutdown.

Just some comments, info messages and not assigning zero to pthread_t.

15 years agoping plugin: Add support for drop rate and standard deviation.
Florian Forster [Sun, 1 Mar 2009 08:42:33 +0000 (09:42 +0100)]
ping plugin: Add support for drop rate and standard deviation.

15 years agoREADME: Documented the `--with-fp-layout' configure option.
Florian Forster [Sat, 28 Feb 2009 14:40:45 +0000 (15:40 +0100)]
README: Documented the `--with-fp-layout' configure option.

15 years agosrc/collectd.conf.in: Only include very few standard plugins by default.
Florian Forster [Sat, 28 Feb 2009 13:14:23 +0000 (14:14 +0100)]
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

15 years agoprotocols plugin: Add to configuration summary and collectd.conf.in.
Florian Forster [Sat, 28 Feb 2009 13:09:35 +0000 (14:09 +0100)]
protocols plugin: Add to configuration summary and collectd.conf.in.

15 years agoprotocols plugin: Add a plugin which collets protocol information.
Florian Forster [Sat, 28 Feb 2009 11:12:54 +0000 (12:12 +0100)]
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 ;)

15 years agoMerge branch 'ff/java'
Florian Forster [Sat, 28 Feb 2009 09:35:58 +0000 (10:35 +0100)]
Merge branch 'ff/java'

15 years agoMerge branch 'collectd-4.6'
Florian Forster [Sat, 28 Feb 2009 09:35:17 +0000 (10:35 +0100)]
Merge branch 'collectd-4.6'

15 years agoMerge branch 'collectd-4.5' into collectd-4.6
Florian Forster [Sat, 28 Feb 2009 09:35:04 +0000 (10:35 +0100)]
Merge branch 'collectd-4.5' into collectd-4.6

15 years agodns plugin: Don't pass a NULL pointer to `pcap_open_live'.
Florian Forster [Sat, 28 Feb 2009 09:29:08 +0000 (10:29 +0100)]
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 ;)

15 years agooracle plugin: Fix type size issue under 64bit systems.
Florian Forster [Fri, 27 Feb 2009 13:09:12 +0000 (14:09 +0100)]
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.

15 years agocontrib/oracle/create_schema.ddl: Add GPLv2 license information.
Florian Forster [Tue, 24 Feb 2009 10:42:35 +0000 (11:42 +0100)]
contrib/oracle/create_schema.ddl: Add GPLv2 license information.

In accordance with Roman Klesel,
<C937BDA691901BFAD72AFEF3@ganga.office.noris.de>

15 years agosrc/common.c: Fixed a race condition in check_create_dir().
Sebastian Harl [Tue, 24 Feb 2009 10:27:22 +0000 (11:27 +0100)]
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.

15 years agocollectd.conf(5), collectd-java(5): Updated the documentation for the Java plugin.
Florian Forster [Tue, 24 Feb 2009 10:24:38 +0000 (11:24 +0100)]
collectd.conf(5), collectd-java(5): Updated the documentation for the Java plugin.

15 years agocollectd-java(5): Documented the `match' and `target' callbacks.
Florian Forster [Tue, 24 Feb 2009 09:53:43 +0000 (10:53 +0100)]
collectd-java(5): Documented the `match' and `target' callbacks.

15 years agobindings/java/: CollectdMatchFactoryInterface: Add more JavaDoc.
Florian Forster [Tue, 24 Feb 2009 09:13:11 +0000 (10:13 +0100)]
bindings/java/: CollectdMatchFactoryInterface: Add more JavaDoc.

15 years agobindings/java/: Unify inline documentation terms.
Florian Forster [Tue, 24 Feb 2009 09:12:45 +0000 (10:12 +0100)]
bindings/java/: Unify inline documentation terms.

s/function/method/

15 years agojava plugin: Add support for `target' callbacks.
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/

15 years agoMerge branch 'master' into ff/java
Florian Forster [Tue, 24 Feb 2009 09:16:19 +0000 (10:16 +0100)]
Merge branch 'master' into ff/java

15 years agoMerge branch 'collectd-4.6'
Florian Forster [Tue, 24 Feb 2009 09:15:52 +0000 (10:15 +0100)]
Merge branch 'collectd-4.6'

15 years agosrc/plugin.c: Assure that targets get dynamically allocated memory.
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.

15 years agojava plugin: Add support for `match' callbacks.
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.

15 years agologfile plugin: Interpret `(notification_t *)->time == 0' as `now'.
Florian Forster [Mon, 23 Feb 2009 14:38:29 +0000 (15:38 +0100)]
logfile plugin: Interpret `(notification_t *)->time == 0' as `now'.

15 years agojava plugin: Expose `plugin_dispatch_notification' to Java plugins.
Florian Forster [Mon, 23 Feb 2009 14:37:44 +0000 (15:37 +0100)]
java plugin: Expose `plugin_dispatch_notification' to Java plugins.

15 years agosrc/collectd.conf.in: Add `LoadPlugin java'.
Florian Forster [Mon, 23 Feb 2009 14:37:01 +0000 (15:37 +0100)]
src/collectd.conf.in: Add `LoadPlugin java'.

15 years agosrc/plugin.c: Fix plugin_dispatch_notification again.
Florian Forster [Mon, 23 Feb 2009 14:36:40 +0000 (15:36 +0100)]
src/plugin.c: Fix plugin_dispatch_notification again.

15 years agojava plugin: Add support for `notification' callbacks.
Florian Forster [Mon, 23 Feb 2009 13:57:56 +0000 (14:57 +0100)]
java plugin: Add support for `notification' callbacks.

15 years agosrc/plugin.c: Add a user_data_t pointer to 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.

15 years agobindings/java/: Add some javadoc markup to the interfaces.
Florian Forster [Sun, 22 Feb 2009 23:05:35 +0000 (00:05 +0100)]
bindings/java/: Add some javadoc markup to the interfaces.

15 years agocollectd-java(5): Fix a typo.
Florian Forster [Sun, 22 Feb 2009 22:30:06 +0000 (23:30 +0100)]
collectd-java(5): Fix a typo.

15 years agoUpdated various copyright information.
Sebastian Harl [Sun, 22 Feb 2009 21:53:50 +0000 (22:53 +0100)]
Updated various copyright information.

15 years agocollectd.conf(5): Updated the information on the java plugin.
Florian Forster [Sun, 22 Feb 2009 22:18:58 +0000 (23:18 +0100)]
collectd.conf(5): Updated the information on the java plugin.

15 years agojava plugin: Add support for `log' callbacks.
Florian Forster [Sun, 22 Feb 2009 22:18:43 +0000 (23:18 +0100)]
java plugin: Add support for `log' callbacks.

15 years agosrc/plugin.c: Add a user_data_t pointer to 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.

15 years agoUpdated various copyright information.
Sebastian Harl [Sun, 22 Feb 2009 21:53:50 +0000 (22:53 +0100)]
Updated various copyright information.

15 years agojava plugin: Add support for `flush' callbacks.
Florian Forster [Sun, 22 Feb 2009 21:15:47 +0000 (22:15 +0100)]
java plugin: Add support for `flush' callbacks.

15 years agosrc/plugin.c: Add a user_data_t pointer to 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.

15 years agocollectd-unixsock(5): Slightly improved the description.
Sebastian Harl [Sun, 22 Feb 2009 20:02:05 +0000 (21:02 +0100)]
collectd-unixsock(5): Slightly improved the description.

15 years agoMerge branch 'master' into ff/java
Florian Forster [Sun, 22 Feb 2009 18:50:14 +0000 (19:50 +0100)]
Merge branch 'master' into ff/java

15 years agoMerge branch 'collectd-4.6'
Florian Forster [Sun, 22 Feb 2009 18:49:33 +0000 (19:49 +0100)]
Merge branch 'collectd-4.6'

Conflicts:

src/bind.c

15 years agoBumped version to 4.6.1; Updated ChangeLog. collectd-4.6.1
Florian Forster [Sun, 22 Feb 2009 18:43:53 +0000 (19:43 +0100)]
Bumped version to 4.6.1; Updated ChangeLog.

15 years agoMerge branch 'collectd-4.5' into collectd-4.6
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.

15 years agoRevert "libiptc/Makefile.am: Added xtables.h, libxtc.h to libiptc_la_SOURCES." collectd-4.5.3
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.

15 years agoBumped version to 4.5.3; Updated ChangeLog.
Florian Forster [Sun, 22 Feb 2009 18:22:01 +0000 (19:22 +0100)]
Bumped version to 4.5.3; Updated ChangeLog.

15 years agojava plugin: Rename `CollectdAPI' to `Collectd'.
Florian Forster [Sun, 22 Feb 2009 18:10:56 +0000 (19:10 +0100)]
java plugin: Rename `CollectdAPI' to `Collectd'.

15 years agocollectd-java(5): Update the documentation.
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.

15 years agojava plugin: Change the name of all functions to conform to the Java convention.
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.

15 years agoRevert part of 5f195369: Accidentally commited changes to src/Makefile.am.
Florian Forster [Sun, 22 Feb 2009 18:02:23 +0000 (19:02 +0100)]
Revert part of 5f195369: Accidentally commited changes to src/Makefile.am.

15 years agojava plugin: Expose `plugin_log' to Java plugins.
Florian Forster [Sun, 22 Feb 2009 17:32:02 +0000 (18:32 +0100)]
java plugin: Expose `plugin_log' to Java plugins.

15 years agojava plugin: Added comments for most functions.
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.

15 years agojava plugin: Implement registration for the other methods.
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.

15 years agocollectd-java(5): Updated the documentation.
Florian Forster [Sun, 22 Feb 2009 13:02:05 +0000 (14:02 +0100)]
collectd-java(5): Updated the documentation.

15 years agojava plugin: Implemented write plugin registration.
Florian Forster [Sun, 22 Feb 2009 12:07:26 +0000 (13:07 +0100)]
java plugin: Implemented write plugin registration.

15 years agojava plugin: Improve the read registration code.
Florian Forster [Sun, 22 Feb 2009 11:46:42 +0000 (12:46 +0100)]
java plugin: Improve the read registration code.

15 years agojava plugin: Implement plugin registration via `RegisterRead'.
Florian Forster [Sun, 22 Feb 2009 11:18:41 +0000 (12:18 +0100)]
java plugin: Implement plugin registration via `RegisterRead'.

15 years agosrc/plugin.c: Remove all read functions before calling the shutdown functions.
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..

15 years agojava plugin: Change the API to use the `DataSet' class.
Florian Forster [Sun, 22 Feb 2009 10:29:12 +0000 (11:29 +0100)]
java plugin: Change the API to use the `DataSet' class.

15 years agojava plugin: Use the changed plugin infrastructure to call read and write functions...
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..

15 years agosrc/plugin.c: Change the write callbacks to receive a user_data_t pointer.
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.

15 years agosrc/plugin.c: Implement `plugin_register_complex_read'
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.

15 years agojava plugin: Update the full name of the moved classes.
Florian Forster [Sat, 21 Feb 2009 17:20:44 +0000 (18:20 +0100)]
java plugin: Update the full name of the moved classes.

15 years agoRevert "src/plugin.[ch]: Implement `plugin_dispatch_values_async'."
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.

15 years agobindings/java: Moved the `PluginData' and `ValueList' classes.
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.

15 years agojava plugin: Implement a reference counter for the JVMEnv pointers.
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..

15 years agotypes.db(5): Added a note about distributing custom types.db files.
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.

15 years agoperl plugin: Deprecated the use of plugin_register() to register data-sets.
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.

15 years agoMerge branch 'ff/java' of /var/lib/git/collectd into ff/java
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

15 years agocollectd-java(5): Fix a typo.
Florian Forster [Fri, 20 Feb 2009 10:13:21 +0000 (11:13 +0100)]
collectd-java(5): Fix a typo.

15 years agobind plugin: Fix a typo.
Florian Forster [Fri, 20 Feb 2009 10:12:50 +0000 (11:12 +0100)]
bind plugin: Fix a typo.

15 years agojava plugin: Use the new `plugin_dispatch_values_async' function.
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/

15 years agosrc/plugin.[ch]: Implement `plugin_dispatch_values_async'.
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.