Florian Forster [Sun, 15 Feb 2009 17:30:39 +0000 (18:30 +0100)]
ChangeLog: Document Simon's changes.
Florian Forster [Sun, 15 Feb 2009 17:30:20 +0000 (18:30 +0100)]
configure.in: Activate the cpu and swap plugins if sysctl is available.
Florian Forster [Sun, 15 Feb 2009 14:01:05 +0000 (15:01 +0100)]
cpu plugin: Check if all required sysctl defines are present.
Rather than checking for OpenBSD, since this interface may work with
other *BSDs, too. The order of the initialization code has been fixed,
too, and some other minor fixes..
Florian Forster [Sun, 15 Feb 2009 13:33:39 +0000 (14:33 +0100)]
cpu plugin: Fix indentation for the libstatgrab code.
Simon Kuhnle [Sun, 15 Feb 2009 13:32:56 +0000 (14:32 +0100)]
cpu plugin: Use C99-like stack allocation.
As suggested by octo.
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Simon Kuhnle [Sun, 8 Feb 2009 12:16:19 +0000 (13:16 +0100)]
cpu plugin: Add support for OpenBSD.
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Florian Forster [Sun, 15 Feb 2009 11:43:50 +0000 (12:43 +0100)]
Bumped version to 4.6.0; Updated ChangeLog.
Florian Forster [Sat, 14 Feb 2009 22:38:48 +0000 (23:38 +0100)]
bind plugin: Implement per-zone statistics.
Also, the configuration schema has been improved - hopefully.
Florian Forster [Sat, 14 Feb 2009 18:18:23 +0000 (19:18 +0100)]
timediff match: Add a match for values with an invalid time.
The time is compared to the server's local time and values which differ
too much (configurable, of course) are matched.
Florian Forster [Sat, 14 Feb 2009 17:39:43 +0000 (18:39 +0100)]
src/utils_db_query.h: Fix a small typo.
Florian Forster [Sat, 14 Feb 2009 17:31:49 +0000 (18:31 +0100)]
src/utils_db_query.c: udb_query_pick_from_list* should add *all* queries of the desired name.
Florian Forster [Sat, 14 Feb 2009 16:26:37 +0000 (17:26 +0100)]
postgresql plugin: Use the DB query module.
The old (legacy) features should still be supported.
Florian Forster [Sat, 14 Feb 2009 16:09:40 +0000 (17:09 +0100)]
src/utils_db_query.[ch]: Add the possibility to `pick' queries by name.
Florian Forster [Sat, 14 Feb 2009 14:44:07 +0000 (15:44 +0100)]
src/utils_db_query.c: Add support for the `Column' configuration option.
The support has been implemented as unobtrusively as possible:
- The `udb_result_t' type now has two new members:
`legacy_mode' and `legacy_position'. The `legacy_mode' member is used
to switch to a new set of functions for handling these special
results.
- Those ``legacy results'' use only a small subset of the members in
`udb_result_t'. The different behavior has been put in the following
functions:
udb_legacy_result_finish_result
udb_legacy_result_handle_result
udb_legacy_result_prepare_result
udb_legacy_result_create
- The non-legacy counterparts to finish, handle, and prepare
automatically call the legacy version if the `legacy_mode' member is
set to `1'.
WARNING: Untested code, the PostgreSQL plugin still needs to be ported.
Florian Forster [Sat, 14 Feb 2009 13:04:02 +0000 (14:04 +0100)]
src/utils_db_query.[ch]: Introduces a ``legacy mode''.
When passing `1' as `legacy mode' to `udb_query_create', compatibility
with the postgresql plugin in version 4.5 is enabled. This means that
the options `Query', `MinPGVersion' and `MaxPGVersion' are understood in
the <Query> blocks.
Yet to do is support for the `Column' options. The `Param' option should
probably be implemented using the already existing callback function.
Florian Forster [Sat, 14 Feb 2009 13:13:00 +0000 (14:13 +0100)]
tail plugin: Fix a format string for a size_t.
Probably a result of
f50ada19.
Sebastian Harl [Wed, 11 Feb 2009 10:31:30 +0000 (11:31 +0100)]
Fixed various signedness issues identified by -Wextra.
The following two issues have been addressed:
* comparison between signed and unsigned - this was found in several places
throughout the code and has been fixed by switching to more appropriate
types or adding appropriate explicit casts.
* comparison of unsigned expression < 0 is always false - this was found in
the processes and vserver plugins where a size_t had wrongly been used
instead of a ssize_t and an int respectively.
Sebastian Harl [Wed, 11 Feb 2009 09:43:25 +0000 (10:43 +0100)]
Document unused parameters.
In all cases where unused parameters have to exist either because some API
requires it or for more consistency, they now have been documented using
__attribute__((unused)) (which is automatically disabled in case GCC is not
used to prevent problems with compilers not supporting attributes). In a few
other cases, the parameters have been removed.
This allows the use of -Wunused-parameter (which is enabled by -Wextra as
well, when using -Wall).
Sebastian Harl [Tue, 10 Feb 2009 20:31:17 +0000 (21:31 +0100)]
perl plugin, configure: Check for struct mgvtbl.svt_local.
This member has been introduced in Perl 5.10 (I guess). To be able to
correctly (statically) initialize the magic tables used to access global
variables, we now check for its existence and then initialize the structs
accordingly.
Sebastian Harl [Mon, 9 Feb 2009 20:07:31 +0000 (21:07 +0100)]
perl plugin / Collectd.pm: Export plugin_write() to Perl.
plugin_write() accepts, just like the C counterpart, three arguments,
'plugins', 'datasets' and 'valuelists'. In contrast to the C implementation,
all three arguments may either be a single scalar or a reference to an array -
just like the 'plugins' and 'identifiers' arguments of the Perl implementation
of plugin_flush().
Sebastian Harl [Mon, 9 Feb 2009 18:20:13 +0000 (19:20 +0100)]
perl plugin: Don't do any type conversion in pplugin_dispatch_notification().
The conversion of the hash value to a notification_t object has been moved
into its own separate function.
Sebastian Harl [Mon, 9 Feb 2009 18:05:29 +0000 (19:05 +0100)]
perl plugin: Don't do any type conversion in pplugin_register_data_set().
The conversion of the array value to a data_set_t object has been moved into
its own separate function.
Sebastian Harl [Mon, 9 Feb 2009 17:48:33 +0000 (18:48 +0100)]
perl plugin: Don't do any type conversion in pplugin_dispatch_values().
The conversion of the hash value to a value_list_t object has been moved into
its own separate function.
Sebastian Harl [Mon, 9 Feb 2009 16:54:05 +0000 (17:54 +0100)]
src/plugin.h: Fixed some minor typos.
Florian Forster [Sun, 8 Feb 2009 14:36:58 +0000 (15:36 +0100)]
cpu plugin: Report interrupt separately when using sysctlbyname.
Florian Forster [Sat, 7 Feb 2009 09:27:08 +0000 (10:27 +0100)]
build.sh: Fix the check for libtoolize vs. glibtoolize.
The `which' command under Mac OS X exits with status 0 even if the program
wasn't found. Use
libtoolize --version
to check for the program instead..
Florian Forster [Fri, 6 Feb 2009 15:55:15 +0000 (16:55 +0100)]
collectd.conf(5): Document the curl plugin properly.
Florian Forster [Fri, 6 Feb 2009 15:53:49 +0000 (16:53 +0100)]
curl plugin: Enable the `Verify{Peer,Host}' options by default.
So the curl plugin behaves just like the apache plugin in this respect.
Florian Forster [Fri, 6 Feb 2009 15:28:24 +0000 (16:28 +0100)]
configure.in: Sort plugins and libraries alphabetically.
Florian Forster [Fri, 6 Feb 2009 15:27:02 +0000 (16:27 +0100)]
curl plugin: Add a generic plugin to retrieve and parse web pages.
Florian Forster [Thu, 5 Feb 2009 21:54:40 +0000 (22:54 +0100)]
Merge branch 'master' of octo@verplant.org:/var/lib/git/collectd
Florian Forster [Thu, 5 Feb 2009 21:54:24 +0000 (22:54 +0100)]
Merge branch 'ff/local'
Florian Forster [Thu, 5 Feb 2009 21:38:52 +0000 (22:38 +0100)]
src/utils_threshold.c: Properly document the `ut_check_interesting' function.
Sebastian Harl [Thu, 5 Feb 2009 20:33:33 +0000 (21:33 +0100)]
postgresql plugin: Updated copyright information.
;-)
Sebastian Harl [Thu, 5 Feb 2009 20:05:01 +0000 (21:05 +0100)]
src/plugin.[ch]: Removed obsolete plugin_{un,}register_filter().
These have been superseded by the advanced filter mechanism. Also, the
FILTER_* defines have been removed.
Sebastian Harl [Tue, 3 Feb 2009 13:08:32 +0000 (14:08 +0100)]
Let plugin_dispatch_values() set value_list.time in case of 'now'.
Basically any (read) plugin was calling time(NULL) to set the time of a values
list. This is now done by plugin_dispatch_values() in case the time is zero
(which is the case when using VALUE_LIST_INIT or VALUE_LIST_STATIC).
This change slightly simplifies the code and makes future changes to the time
management (like the possibly upcoming subsecond resolution support) less
intrusive in respect to the amount of required code changes.
Sebastian Harl [Tue, 3 Feb 2009 12:05:21 +0000 (13:05 +0100)]
Converted timeval_sub_timespec() to timeval_cmp().
The third (return) argument is now of type 'struct timeval' (instead of
'struct timespec') as well. Also, it may now be NULL, in which case the
difference is not returned. This is a more general and thus more flexible
approach that permitted to remove the custom timeval_sub*() implementations in
the multimeter and ntpd plugins.
The return value has been changed to reflect the return value used by
functions like strcmp(), i.e. it is less than, equal to, or greater than zero
if the first argument is less than, equal to, or greater than the second
argument respectively.
In the cases where a 'struct timespec' is required, the return value is now
converted by multiplying the tv_usec member with 1000.
Sebastian Harl [Tue, 3 Feb 2009 11:49:01 +0000 (12:49 +0100)]
configure: Do not conditionally use AM_CONDITIONAL().
Defining HAVE_BROKEN_PERL_LOAD_MODULE was done conditionally which would cause
configure to fail in case it's not defined.
Sebastian Harl [Tue, 3 Feb 2009 10:41:50 +0000 (11:41 +0100)]
collectd-exec(5): Fixed a typo.
Sebastian Harl [Mon, 2 Feb 2009 14:21:42 +0000 (15:21 +0100)]
collectd.conf(5): Explain the traffic collected by the vserver plugin.
The plugin collects the amount of traffic passing a socket instead of the
actual on-wire traffic.
Thanks to cedric for reporting this.
Resolves: #40
Sebastian Harl [Mon, 2 Feb 2009 13:53:12 +0000 (14:53 +0100)]
collectd.conf(5): Added a note about rotating log files.
References: #39
Sebastian Harl [Mon, 2 Feb 2009 13:12:15 +0000 (14:12 +0100)]
.gitignore: Added src/libcollectdclient/libcollectdclient.pc.
Also, removed some unnecessary entries.
Sebastian Harl [Mon, 2 Feb 2009 11:28:43 +0000 (11:28 +0000)]
build system: Check for and work-around broken Perl_load_module().
Configure now checks for a broken Perl_load_module() definition as introduced
in Perl 5.10 which incorrectly uses __attribute__nonnull__(3). If that has been
detected, the perl plugin will now be built using -Wno-nonnull, thus ignoring
the warning / error produced by the nonnull attribute.
References: #41
Resolves: #42
Florian Forster [Thu, 5 Feb 2009 19:21:20 +0000 (20:21 +0100)]
src/utils_db_query.[ch]: Allow a callback function to be passed to udb_query_create.
This allows plugins to handle custom options in the <Query> blocks.
Florian Forster [Thu, 5 Feb 2009 18:15:47 +0000 (19:15 +0100)]
filter_ignore: Remove this plugin.
The functionality is now implemented in the more general chain mechanism.
Florian Forster [Wed, 4 Feb 2009 22:32:56 +0000 (23:32 +0100)]
AUTHORS: Add many people I forgot to add over the last months.
I think I got everybody covered. I definitely checked all post-4.5
commits.
Bruno Prémont [Wed, 4 Feb 2009 22:06:06 +0000 (23:06 +0100)]
ipmi plugin: Improve error handling and handle a temporary error condition more gracefully.
On a server IPMI readings suddenly failed causing the plugin to stop
collecting data.
The following entries got logged:
ipmi plugin: sensor_read_handler: Removing sensor Temp 7 processor (3.6), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 6 processor (3.5), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 5 power_supply (10.5), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 4 processor (3.4), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 3 processor (3.3), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 2 external_environment (39.1), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 1 system_internal_expansion_board (16.1), because it failed with status 0x10000d5.
This patch attempts to provide slightly better error message and just
skip current reading iteration if the error
IPMI_NOT_SUPPORTED_IN_PRESENT_STATE_CC is indicated.
This error happens e.g. when iLo firmware is upgraded (or reboots?) on
HP servers.
Florian Forster [Wed, 4 Feb 2009 16:54:14 +0000 (17:54 +0100)]
collectd.conf(5): Fix a typo.
Florian Forster [Wed, 4 Feb 2009 16:48:09 +0000 (17:48 +0100)]
collectd.conf(5): Documented the `{Pre,Post}CacheChain' options.
Florian Forster [Wed, 4 Feb 2009 16:47:41 +0000 (17:47 +0100)]
src/plugin.c: If the pre-cache chain returns `stop', dont update the cache.
Don't run the post-cache chain, either.
Florian Forster [Wed, 4 Feb 2009 13:29:45 +0000 (14:29 +0100)]
src/plugin.c: Add the `{Pre,Post}CacheChain' options and appropriate chains.
The PreCacheChain is executed before the values are added to the cache, the
PostCacheChain afterwards. If no post-cache chain is given, values will be
dispatched to all write plugins by default.
Florian Forster [Wed, 4 Feb 2009 08:51:26 +0000 (09:51 +0100)]
collectd.conf(5): Document the `{Min,Max}Version' options of the dbi plugin.
Florian Forster [Wed, 4 Feb 2009 08:32:34 +0000 (09:32 +0100)]
src/utils_db_query.c: Implement the (deprecated) `{Min,Max}PGVersion' options.
This is for compatibility with old configuration of the postgresql plugin.
Florian Forster [Tue, 3 Feb 2009 20:35:01 +0000 (21:35 +0100)]
dbi plugin: Use the server version to only use appropriate queries.
Florian Forster [Tue, 3 Feb 2009 20:34:36 +0000 (21:34 +0100)]
src/utils_db_query.[ch]: Add support for min-/max-version.
These settings can be used to check if a particular query is suited to the
database server version we're currently connected to.
Florian Forster [Mon, 2 Feb 2009 21:26:41 +0000 (22:26 +0100)]
oracle plugin: Use the DB query module.
This simplifies the oracle plugin considerably.
Florian Forster [Mon, 2 Feb 2009 20:57:08 +0000 (21:57 +0100)]
src/utils_db_query.c: When asked for the user data, return the user data.
Appreciate this patch, it cost me one fucking hour of my live!
Florian Forster [Mon, 2 Feb 2009 17:40:11 +0000 (18:40 +0100)]
dbi plugin: Put the row handling logic in an extra module.
The `utils_db_query' module now handles config parsing and row handling.
This unifies basically all of the <Query> blocks, so that the `dbi' and
`oracle' plugins behave exactly alike. Porting the `postgresql' plugin
should be possible, too, so that all three database plugins are in line.
Sebastian Harl [Sun, 1 Feb 2009 22:42:45 +0000 (23:42 +0100)]
collectd.conf: Updated the example postgresql plugin configuration.
Sebastian Harl [Sun, 1 Feb 2009 22:24:54 +0000 (23:24 +0100)]
dbi plugin: Fixed error handling in an inner loop.
The macro BAIL_OUT_CONTINUE() is used inside the loop iterating over the
result sets to clean up and continue with the next loop iteration. In two
cases this was used in a loop iterating over the instances and values lists
contained within that loop as well though. This would cause the memory that
was currently written to (the two target lists) to be freed and thus cause a
possible segfault. In any case it would leave behind inconsistent and most
probably uninitialized data. The usage of that macro has now been pulled out
of the inner loops.
Sebastian Harl [Sun, 1 Feb 2009 22:09:08 +0000 (23:09 +0100)]
postgresql plugin: Added support for the "interval" parameter.
This query parameter expands to the interval collectd is using.
Sebastian Harl [Sun, 1 Feb 2009 21:48:01 +0000 (22:48 +0100)]
postgresql plugin: Added support for <Result> blocks.
This is a replacement for the "Column" config option (which has been
deprecated). <Result> blocks allow for much more flexible handling of the
data. Besides being able to use data types with multiple data sources, the
plugin now supports to generate the type instance using information from the
database.
An example <Result> block might look like this (taken from the manpage):
<Result>
Type counter
InstancePrefix "rt36_tickets"
InstancesFrom "type"
ValuesFrom "count"
</Result>
Sebastian Harl [Sun, 1 Feb 2009 16:37:52 +0000 (17:37 +0100)]
postgresql plugin: Reinitialize a database after reconnecting.
During initialization we get the right version of each query definition. After
reconnecting, the PostgreSQL server version might have changed, so we might
need to update some of the query definitions.
Sebastian Harl [Sun, 1 Feb 2009 16:36:25 +0000 (17:36 +0100)]
utils_complain: Added macro c_would_release().
This macro returns true if the specified complaint would be released, false
else. This is useful e.g. to do further actions when releasing a complaint.
Florian Forster [Sun, 1 Feb 2009 17:26:34 +0000 (18:26 +0100)]
src/collectd.conf.in: Add default stuff for the oracle and openvpn plugins.
Florian Forster [Sun, 1 Feb 2009 17:26:05 +0000 (18:26 +0100)]
oracle plugin: Add <Result> blocks.
With these blocks it's possible to receive more than one value (per row)
from one SQL statement.
Florian Forster [Sun, 1 Feb 2009 14:46:27 +0000 (15:46 +0100)]
csv plugin: Make the output to STDOUT compatible to the exec plugin.
Probably not that useful, but the output written to STDOUT by the csv
plugin is not in the form accepted by the exec plugin. This makes some
potentially interesting hacks possible ;)
Florian Forster [Sun, 1 Feb 2009 14:43:53 +0000 (15:43 +0100)]
dbi plugin: Add <Result> blocks.
With these blocks it's possible to receive more than one value (per row)
from one SQL statement.
Florian Forster [Sun, 1 Feb 2009 10:46:03 +0000 (11:46 +0100)]
libcollectdclient: Add a .pc file for pkg-config.
Florian Forster [Sat, 31 Jan 2009 23:32:12 +0000 (00:32 +0100)]
processes plugin: Fix the ARG_MAX stuff yet again.
The `sysconf' approach does not work when doing something like
char cmdline[ARG_MAX];
which is exactly what was done in the processes plugin.
Just use 4k whenever the define is not available - ought to be enough
for anybody! ;)
Florian Forster [Sat, 31 Jan 2009 22:55:30 +0000 (23:55 +0100)]
processes plugin: Make sure ARG_MAX is defined.
Apparently the GNU libc 2.8 removed the macro for some unholy reason. We
either use `sysconf(3)' transparently (if available) or 4kByte (the
POSIX minimum).
Thanks to dD0T for reporting the problem :)
Florian Forster [Sat, 31 Jan 2009 22:28:21 +0000 (23:28 +0100)]
libcollectdclient: Fix the SSTRCAT macro.
The size passed to `strncat' is not the total size of the buffer, so GCC
with _FORTIFY_SOURCE rightfully complained about this macro.
Thanks to dD0T for reporting this :)
Sebastian Harl [Thu, 29 Jan 2009 16:17:55 +0000 (17:17 +0100)]
postgresql plugin: Renamed the "Query" config option to "Statement".
This makes slightly more sense and is more consistent with the dbi and oracle
plugins.
Sebastian Harl [Wed, 21 Jan 2009 14:43:45 +0000 (15:43 +0100)]
Collectd::Graph::Common.pm: Include Collectd::Unixsock.
This module is required to send the "FLUSH" command to collectd using the UNIX
domain socket provided by the "unixsock" plugin.
Florian Forster [Sat, 24 Jan 2009 10:04:31 +0000 (11:04 +0100)]
Merge branch 'collectd-4.5'
Florian Forster [Sat, 24 Jan 2009 10:04:22 +0000 (11:04 +0100)]
Merge branch 'collectd-4.4' into collectd-4.5
Florian Forster [Sat, 24 Jan 2009 10:00:30 +0000 (11:00 +0100)]
tcpconns plugin: Fix an endianness problem under *BSD.
The port numbers were assumed to be in the host's byte order, when in
fact they are in network byte order (big endian). The patch adds `ntohs'
where necessary to fix this problem.
Resolves: #35
Florian Forster [Thu, 22 Jan 2009 09:08:48 +0000 (10:08 +0100)]
src/utils_rrdcreate.c: Fix support for non-threadsafe libraries.
Florian Forster [Thu, 22 Jan 2009 09:07:49 +0000 (10:07 +0100)]
collectd.conf(5): Add some preliminary documentation for the bind plugin.
Florian Forster [Thu, 22 Jan 2009 08:09:18 +0000 (09:09 +0100)]
Merge branch 'bp/bind'
Sebastian Harl [Tue, 20 Jan 2009 12:24:54 +0000 (13:24 +0100)]
utils_cache: Free then unused memory before returning in an error condition.
Sebastian Harl [Tue, 20 Jan 2009 12:20:00 +0000 (13:20 +0100)]
utils_cache: Unlock the cache mutex before returning in an error condition.
Florian Forster [Tue, 20 Jan 2009 09:34:51 +0000 (10:34 +0100)]
memcached plugin: Make absolutely sure, we don't divide by zero.
It's a well-known fact only Chuck Norris can do that!
Doug MacEachern [Thu, 8 Jan 2009 01:58:49 +0000 (17:58 -0800)]
memcached plugin: Add hitratio metric.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Doug MacEachern [Tue, 20 Jan 2009 09:27:10 +0000 (10:27 +0100)]
contrib/cussh.pl: Add the PUTNOTIF command.
I was using this to test notifications for jcollectd like so:
echo "PUTNOTIF host=foo severity=warning message=my perl is rusty" |
perl -Mblib=bindings/perl contrib/cussh.pl
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Florian Forster [Mon, 19 Jan 2009 12:05:23 +0000 (13:05 +0100)]
bind plugin: Don't use LLONG_{MIN,MAX} to increase portability.
Sagly, there's a bug in some versions of GCC/GNU libc which leads to LLONG_*
not being defined. We'll check the return value of strtoll for `>0' and `<0',
which should do the trick, too.
Florian Forster [Sun, 18 Jan 2009 22:14:31 +0000 (23:14 +0100)]
Merge branch 'master' into bp/bind
Florian Forster [Sun, 18 Jan 2009 20:07:36 +0000 (21:07 +0100)]
src/common.h: Add the IS_TRUE and IS_FALSE macros.
They should be used to check if a string is "true|yes|on" or
"false|no|off" from now on.
Florian Forster [Sun, 18 Jan 2009 20:07:17 +0000 (21:07 +0100)]
bind plugin: Reworked Bruno's patch to remove repeating code.
Florian Forster [Sat, 17 Jan 2009 11:16:18 +0000 (12:16 +0100)]
bind plugin: Eliminate the `goto' in `bind_xml'.
Florian Forster [Sat, 17 Jan 2009 11:15:49 +0000 (12:15 +0100)]
bind plugin: Put removal of special characters in separate function.
Florian Forster [Sat, 17 Jan 2009 11:01:04 +0000 (12:01 +0100)]
bind plugin: Be more specific about the features we need.
Florian Forster [Sat, 17 Jan 2009 10:58:30 +0000 (11:58 +0100)]
bind plugin: Fix a misplaced comma.
Bruno Prémont [Sat, 17 Jan 2009 10:56:30 +0000 (11:56 +0100)]
bind plugin: Add a new plugin for BIND 9.5 and 9.6 statistics.
Attached are patches for collectd-4.5.x and collectd-4.4.x series for a
plugin to collect statistics from a ISC Bind server.
ISC Bind introduces XML-based statistics which can be fetched via HTTP
starting with bind-9.5.0 and updated the XML structure with bind-9.6.0.
Both XML formats are supported by this plugin.
To enable access to these statistics, use the following configuration
block:
statistics-channels {
inet localhost port 8053 allow { localhost; };
};
Suggestions on improving the grouping of statistics values are welcome,
currently the following groups are implemented:
RRQueriesIn type=dns_qtype
Requests type=dns_request
QueryResults type=dns_rcode
Updates type=dns_update
ZoneMaintenance type=dns_zops
Resolver type=dns_resolver
Bruno
Bruno Prémont [Sat, 17 Jan 2009 10:40:53 +0000 (11:40 +0100)]
ascent plugin: Fix a memory leak.
According to libxml2 API doc, the string returned by
xmlNodeListGetString()
must be freed by the user with
xmlFree()
The attached patch adds the missing calls to xmlFree() for the ascent plugin.
Florian Forster [Sat, 17 Jan 2009 10:19:08 +0000 (11:19 +0100)]
network plugin: Make the receive thread even faster.
On very busy systems, the thread apparently may not be scheduled often enough.
So the receive buffer fills up quickly and data may be lost.
This patch changes the `mutex_lock' to a `mutex_trylock' and data is only
appended to the global receive-queue if the lock can be obtained without
blocking.
If the lock cannot be obtained without blocking, the data is instead appended
to a private queue and that queue is appended to the global queue when the lock
can next be taken.
Florian Forster [Sat, 17 Jan 2009 10:04:24 +0000 (11:04 +0100)]
Merge branch 'dm/t_option'
Florian Forster [Sat, 17 Jan 2009 10:01:10 +0000 (11:01 +0100)]
collectd: Don't *abort* on the first read-error with the `-T' option.
The `-T' option used to basically quit the daemon right away when the
first read function of a plugin failed. This patch changes the behavior,
so that:
- All read-functions are tried. If one or more fail, the daemon will
exit with a non-zero exit status, but all read-functions will be
tried.
- Don't quit if one read-function failed without calling all the
shutdown-functions first. This will clean up the UNIX socket of the
unixsock plugin and stuff like that.
Doug MacEachern [Fri, 2 Jan 2009 21:52:35 +0000 (13:52 -0800)]
collectd: Add the -T option.
The -T switch:
- implies -f
- does not start any read threads
- invokes callback() foreach list_read and will exit 1 on failure, 0
otherwise
Makes for a nicer dryrun than -f + ^C, also makes it possible to wrap
with a test harness such as Test.pm
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Doug MacEachern [Fri, 2 Jan 2009 21:46:34 +0000 (13:46 -0800)]
src/collectd.h: #undef macros before poisoning them.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>