collectd.git
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 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 agocontrib/cussh.pl: Fixed and improved command parsing.
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.

15 years agocontrib/cussh.pl: Improved error reporting.
Sebastian Harl [Thu, 19 Feb 2009 10:04:49 +0000 (11:04 +0100)]
contrib/cussh.pl: Improved error reporting.

15 years agoCollectd::Unixsock: Improved error handling in putval().
Sebastian Harl [Thu, 19 Feb 2009 10:03:01 +0000 (11:03 +0100)]
Collectd::Unixsock: Improved error handling in putval().

15 years agoipmi plugin: Use a less error-prone approach to build the sensor name.
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.

15 years agoipmi plugin: Fix an off-by-one error.
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

15 years agobind plugin: Fix a counter vs. gauge problem with memory statistics.
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 :)

15 years agobind plugin: Fix various bugs.
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

15 years agocollectd.conf(5): Removed the section about filter_pcre.
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 ...

15 years agoDon't unnecessarily link match_regex against libpcre.
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.

15 years agoREADME: Replaced filter plugins with matches and targets.
Sebastian Harl [Wed, 18 Feb 2009 10:52:34 +0000 (11:52 +0100)]
README: Replaced filter plugins with matches and targets.

15 years agoREADME: Added the oracle plugin and libclntsh.
Sebastian Harl [Wed, 18 Feb 2009 10:36:05 +0000 (11:36 +0100)]
README: Added the oracle plugin and libclntsh.

15 years agoREADME: Added curl plugin.
Sebastian Harl [Wed, 18 Feb 2009 10:24:40 +0000 (11:24 +0100)]
README: Added curl plugin.

15 years agoMerge branch 'sh/next' collectd-4.6.0
Florian Forster [Mon, 16 Feb 2009 21:56:37 +0000 (22:56 +0100)]
Merge branch 'sh/next'

15 years agopostgresql: Fixed calculation of a database's max_params_num.
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().

15 years agocollectd.conf(5): Fixed some typos.
Sebastian Harl [Mon, 16 Feb 2009 21:16:22 +0000 (22:16 +0100)]
collectd.conf(5): Fixed some typos.

15 years agolibcollectdclient: Use `EILSEQ' rather than `EPROTO'.
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).

15 years agosrc/utils_db_query.c: Make `InstancePrefix' and `InstancesFrom' optional.
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.

15 years agoMerge branch 'sh/next'
Florian Forster [Mon, 16 Feb 2009 16:51:26 +0000 (17:51 +0100)]
Merge branch 'sh/next'

Conflicts:

ChangeLog

15 years agocollectd.conf(5): Fixed and improved the section about the filter mechanism.
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.

15 years agosrc/Makefile.am: Link utils_db_query into the postgresql plugin.
Sebastian Harl [Mon, 16 Feb 2009 15:40:40 +0000 (16:40 +0100)]
src/Makefile.am: Link utils_db_query into the postgresql plugin.

15 years agocollectd-perl(5): Documented the filter chain support.
Sebastian Harl [Mon, 16 Feb 2009 15:35:54 +0000 (16:35 +0100)]
collectd-perl(5): Documented the filter chain support.

15 years agoChangeLog: Updated date and fixed a typo.
Florian Forster [Mon, 16 Feb 2009 14:45:15 +0000 (15:45 +0100)]
ChangeLog: Updated date and fixed a typo.

15 years agocollectd.conf(5): Fix a minor formatting error.
Florian Forster [Mon, 16 Feb 2009 13:31:50 +0000 (14:31 +0100)]
collectd.conf(5): Fix a minor formatting error.

15 years agoChangeLog: Added changes to the perl plugin.
Sebastian Harl [Mon, 16 Feb 2009 14:43:17 +0000 (15:43 +0100)]
ChangeLog: Added changes to the perl plugin.

15 years agosrc/filter_chain.c: Made match_proc_t.create optional.
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.

15 years agosrc/filter_chain.c: Fixed typos in warning / error messages.
Sebastian Harl [Mon, 16 Feb 2009 14:07:27 +0000 (15:07 +0100)]
src/filter_chain.c: Fixed typos in warning / error messages.

15 years agoperl plugin, Collectd.pm: Added support for filter chains.
Sebastian Harl [Mon, 16 Feb 2009 13:59:57 +0000 (14:59 +0100)]
perl plugin, Collectd.pm: Added support for filter chains.

fc_register() may now be used to register matches and targets with collectd.
The function takes three arguments: type, name, proc. 'type' has to be any of
FC_MATCH or FC_TARGET, 'name' specifies the name of the target / match and
'proc' is a hash of callbacks (specified by name just like any other
callbacks). There are three types of callbacks: create, destroy and match /
invoke - the former two being optional.

The match / invoke callback has to return any of the following statuses:
FC_MATCH_NO_MATCH, FC_MATCH_MATCHES, FC_TARGET_CONTINUE, FC_TARGET_STOP or
FC_TARGET_RETURN. If none of those constants are used, the behavior is
undefined.

15 years agoperl plugin: Do not pass NULL to newRV().
Sebastian Harl [Mon, 16 Feb 2009 12:39:54 +0000 (13:39 +0100)]
perl plugin: Do not pass NULL to newRV().

newRV() does not handle that correctly and causes a segfault instead. Now, we
use PL_sv_undef instead.

15 years agoChanged plugin_notification_meta_free()'s argument to a notification_meta_t.
Sebastian Harl [Mon, 16 Feb 2009 11:02:09 +0000 (12:02 +0100)]
Changed plugin_notification_meta_free()'s argument to a notification_meta_t.

This is more flexible and allows the function to be used when using the meta
data without an embedding notification object, e.g. when using the filter
chains.

15 years agoperl plugin: Fixed a memory leak in pplugin_dispatch_notification().
Sebastian Harl [Mon, 16 Feb 2009 10:53:02 +0000 (11:53 +0100)]
perl plugin: Fixed a memory leak in pplugin_dispatch_notification().

Free the notification meta information that have possibly been allocated in
notification2hv().

15 years agoperl plugin: Convert notification meta data as well.
Sebastian Harl [Sat, 14 Feb 2009 18:33:35 +0000 (19:33 +0100)]
perl plugin: Convert notification meta data as well.

The notification meta data are represented as an array of hash references:

  [
    {
      name  => <name>,
      value => <value>
    },
    ...
  ]

15 years agoperl plugin: Don't ignore the 'interval' member when converting value lists.
Sebastian Harl [Sat, 14 Feb 2009 15:45:55 +0000 (16:45 +0100)]
perl plugin: Don't ignore the 'interval' member when converting value lists.

15 years agoswap plugin: Be more sensitive about integer sizes in the *BSD code.
Florian Forster [Mon, 16 Feb 2009 12:34:44 +0000 (13:34 +0100)]
swap plugin: Be more sensitive about integer sizes in the *BSD code.

15 years agosrc/filter_chain.c: Document the `meta' argument passed to matches and targets inline.
Florian Forster [Mon, 16 Feb 2009 12:26:25 +0000 (13:26 +0100)]
src/filter_chain.c: Document the `meta' argument passed to matches and targets inline.

15 years agoconfigure.in: Improve checking for libstatgrab using pkg-config.
Florian Forster [Mon, 16 Feb 2009 12:08:06 +0000 (13:08 +0100)]
configure.in: Improve checking for libstatgrab using pkg-config.

15 years agoswap plugin: Fix another typo in the *BSD code.
Simon Kuhnle [Mon, 16 Feb 2009 12:06:06 +0000 (13:06 +0100)]
swap plugin: Fix another typo in the *BSD code.

15 years agoMerge branch 'collectd-4.5'
Florian Forster [Mon, 16 Feb 2009 11:48:22 +0000 (12:48 +0100)]
Merge branch 'collectd-4.5'

Conflicts:

configure.in

15 years agoMerge branch 'collectd-4.4' into collectd-4.5
Florian Forster [Mon, 16 Feb 2009 11:35:23 +0000 (12:35 +0100)]
Merge branch 'collectd-4.4' into collectd-4.5

Conflicts:

configure.in

15 years agocollectd.conf(5): Removed references to the `main' chain.
Florian Forster [Mon, 16 Feb 2009 11:33:23 +0000 (12:33 +0100)]
collectd.conf(5): Removed references to the `main' chain.

The chains are now called `PreCache' and `PostCache'.

15 years agocollectd.conf(5): Add documentation for the `notify_email' plugin.
Florian Forster [Mon, 16 Feb 2009 11:30:13 +0000 (12:30 +0100)]
collectd.conf(5): Add documentation for the `notify_email' plugin.

15 years agoswap plugin: Fix two typos in the *BSD code.
Simon Kuhnle [Mon, 16 Feb 2009 11:00:35 +0000 (12:00 +0100)]
swap plugin: Fix two typos in the *BSD code.

15 years agoswap plugin: Added support for OpenBSD and possibly other *BSDs.
Florian Forster [Mon, 16 Feb 2009 10:42:28 +0000 (11:42 +0100)]
swap plugin: Added support for OpenBSD and possibly other *BSDs.

15 years agoChangeLog: Document Simon's changes.
Florian Forster [Sun, 15 Feb 2009 17:30:39 +0000 (18:30 +0100)]
ChangeLog: Document Simon's changes.

15 years agoconfigure.in: Activate the cpu and swap plugins if sysctl is available.
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.

15 years agocpu plugin: Check if all required sysctl defines are present.
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..

15 years agocpu plugin: Fix indentation for the libstatgrab code.
Florian Forster [Sun, 15 Feb 2009 13:33:39 +0000 (14:33 +0100)]
cpu plugin: Fix indentation for the libstatgrab code.

15 years agocpu plugin: Use C99-like stack allocation.
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>
15 years agocpu plugin: Add support for OpenBSD.
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>
15 years agoBumped version to 4.6.0; Updated ChangeLog.
Florian Forster [Sun, 15 Feb 2009 11:43:50 +0000 (12:43 +0100)]
Bumped version to 4.6.0; Updated ChangeLog.

15 years agobind plugin: Implement per-zone statistics.
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.

15 years agotimediff match: Add a match for values with an invalid time.
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.

15 years agosrc/utils_db_query.h: Fix a small typo.
Florian Forster [Sat, 14 Feb 2009 17:39:43 +0000 (18:39 +0100)]
src/utils_db_query.h: Fix a small typo.

15 years agosrc/utils_db_query.c: udb_query_pick_from_list* should add *all* queries of the desir...
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.

15 years agopostgresql plugin: Use the DB query module.
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.

15 years agosrc/utils_db_query.[ch]: Add the possibility to `pick' queries by name.
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.

15 years agosrc/utils_db_query.c: Add support for the `Column' configuration option.
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.

15 years agosrc/utils_db_query.[ch]: Introduces a ``legacy mode''.
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.

15 years agotail plugin: Fix a format string for a size_t.
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.

15 years agoFixed various signedness issues identified by -Wextra.
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.

15 years agoDocument unused parameters.
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).

15 years agocontrib/php-collection: Save/load graph list and fix HTTPS handling. collectd-4.4
Bruno Prémont [Tue, 10 Feb 2009 20:38:23 +0000 (21:38 +0100)]
contrib/php-collection: Save/load graph list and fix HTTPS handling.

Hi,

An update to the graphing interface. (incremental patch attached)

This fixes security complaint by a few browsers when page is accessed
via HTTPS and also makes sure the graphs and lists will load if HTTP
and HTTPS paths differ.
Thanks to Mullet- for spotting this issue.

In addition to the fix above this patch adds support for saving
current graph list to a cookie and appending graph list read from
cookie to the currently displayed list.

A future extension would be to allow saving/loading named graph lists
so multiple list can coexist (pretty useful when monitoring multiple
servers/services)

Bruno

15 years agocontrib/php-collection: Add a PHP frontend for graph generation.
Bruno Prémont [Tue, 10 Feb 2009 20:35:44 +0000 (21:35 +0100)]
contrib/php-collection: Add a PHP frontend for graph generation.

Hi,

Attached is a patch with a set of PHP files for a complete graphing
environment for collectd-generated RRDs.
Before generating a graph with rrdtool it can tell collectd to flush
the RRDs that are about to be used.

The interface is built with dynamic HTML.
It provides following options:
 - host selection
 -> plugin selection
 --> plugin instance selection
 ---> type selection
 ----> type instance selection (or meta graph)
 - linear / logarithmic Y-scale
 - verbose / minimal legend
 - [Add Graph] [Remove all Graphs] [Refresh Graphs]
For each displayed graph:
 - Move above previous graph
 - Refresh graph
 - Remove graph
 - Move below following graph

I tested on following browsers:
- Firefox-3.0
- Safari-3.2 (Win32)
- Konqueror (KDE-4.1.3)
- Webkit (webkit-gtk-0_p40220)
- Internet Explorer (6, 7, 8rc - CSS layout issues with <8)

Dependencies:
- PHP-5 (might run with PHP-4)
  > GD suport for error images
  > Ability to execute rrdtool binary
  > Unix socket for FLUSH support
- RRDTool (rrdtool graph, rrdtool info)

TODO: complete/improve graph definitions in definitions.php
 though there is code to generate basic graph for any RRD of
 unknown type, so definitions are rather a matter of color,
 DS combination and stacking.

Bruno

File listing with short description:
- config.php
  (configuration)
- functions.php
  (common functions)
- definitions.php
  (graph definitions for most? types from types.db
   - based on collection.cgi)
- definitions.local.php
  (place for site-local graph definitions, e.g. for
   unixsock, tail, snmp generated RRDs)
- index.php
  (main page)
- graph.php
  (page returning the graph's PNG image)
- browser.js
  (whole bunch of Javascript logic to show/hide/update graphs)

Not included are a few images:
- collectd-logo.png
  (16x16, e.g. use collectd.org's favicon)
- favicon.png
  (e.g. use the one in share/collection*)
- refresh.png
- move-up.png
- move-down.png
- delete.png
  (16x16 take matching ones from your system's action-icons)

15 years agoperl plugin, configure: Check for struct mgvtbl.svt_local.
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.

15 years agoperl plugin / Collectd.pm: Export plugin_write() to Perl.
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().

15 years agoperl plugin: Don't do any type conversion in pplugin_dispatch_notification().
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.

15 years agoperl plugin: Don't do any type conversion in pplugin_register_data_set().
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.

15 years agoperl plugin: Don't do any type conversion in pplugin_dispatch_values().
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.

15 years agosrc/plugin.h: Fixed some minor typos.
Sebastian Harl [Mon, 9 Feb 2009 16:54:05 +0000 (17:54 +0100)]
src/plugin.h: Fixed some minor typos.

15 years agocpu plugin: Report interrupt separately when using sysctlbyname.
Florian Forster [Sun, 8 Feb 2009 14:36:58 +0000 (15:36 +0100)]
cpu plugin: Report interrupt separately when using sysctlbyname.

15 years agobuild.sh: Fix the check for libtoolize vs. glibtoolize.
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..

15 years agocollectd.conf(5): Document the curl plugin properly.
Florian Forster [Fri, 6 Feb 2009 15:55:15 +0000 (16:55 +0100)]
collectd.conf(5): Document the curl plugin properly.

15 years agocurl plugin: Enable the `Verify{Peer,Host}' options by default.
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.

15 years agoconfigure.in: Sort plugins and libraries alphabetically.
Florian Forster [Fri, 6 Feb 2009 15:28:24 +0000 (16:28 +0100)]
configure.in: Sort plugins and libraries alphabetically.

15 years agocurl plugin: Add a generic plugin to retrieve and parse web pages.
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.

15 years agoMerge branch 'master' of octo@verplant.org:/var/lib/git/collectd
Florian Forster [Thu, 5 Feb 2009 21:54:40 +0000 (22:54 +0100)]
Merge branch 'master' of octo@verplant.org:/var/lib/git/collectd

15 years agoMerge branch 'ff/local'
Florian Forster [Thu, 5 Feb 2009 21:54:24 +0000 (22:54 +0100)]
Merge branch 'ff/local'

15 years agocontrib/collection.cgi: Add graph definition for libvirt/virt_cpu_total
John Leach [Thu, 5 Feb 2009 21:40:41 +0000 (22:40 +0100)]
contrib/collection.cgi: Add graph definition for libvirt/virt_cpu_total

15 years agosrc/utils_threshold.c: Properly document the `ut_check_interesting' function.
Florian Forster [Thu, 5 Feb 2009 21:38:52 +0000 (22:38 +0100)]
src/utils_threshold.c: Properly document the `ut_check_interesting' function.

15 years agopostgresql plugin: Updated copyright information.
Sebastian Harl [Thu, 5 Feb 2009 20:33:33 +0000 (21:33 +0100)]
postgresql plugin: Updated copyright information.

;-)

15 years agosrc/plugin.[ch]: Removed obsolete plugin_{un,}register_filter().
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.

15 years agoLet plugin_dispatch_values() set value_list.time in case of 'now'.
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.

15 years agoConverted timeval_sub_timespec() to timeval_cmp().
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.

15 years agoconfigure: Do not conditionally use AM_CONDITIONAL().
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.

15 years agocollectd-exec(5): Fixed a typo.
Sebastian Harl [Tue, 3 Feb 2009 10:41:50 +0000 (11:41 +0100)]
collectd-exec(5): Fixed a typo.

15 years agocollectd.conf(5): Explain the traffic collected by the vserver plugin.
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

15 years agocollectd.conf(5): Added a note about rotating log files.
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

15 years ago.gitignore: Added src/libcollectdclient/libcollectdclient.pc.
Sebastian Harl [Mon, 2 Feb 2009 13:12:15 +0000 (14:12 +0100)]
.gitignore: Added src/libcollectdclient/libcollectdclient.pc.

Also, removed some unnecessary entries.

15 years agobuild system: Check for and work-around broken Perl_load_module().
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

15 years agosrc/utils_db_query.[ch]: Allow a callback function to be passed to udb_query_create.
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.

15 years agofilter_ignore: Remove this plugin.
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.

15 years agoAUTHORS: Add many people I forgot to add over the last months.
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.

15 years agoipmi plugin: Improve error handling and handle a temporary error condition more grace...
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.

15 years agocollectd.conf(5): Fix a typo.
Florian Forster [Wed, 4 Feb 2009 16:54:14 +0000 (17:54 +0100)]
collectd.conf(5): Fix a typo.

15 years agocollectd.conf(5): Documented the `{Pre,Post}CacheChain' options.
Florian Forster [Wed, 4 Feb 2009 16:48:09 +0000 (17:48 +0100)]
collectd.conf(5): Documented the `{Pre,Post}CacheChain' options.

15 years agosrc/plugin.c: If the pre-cache chain returns `stop', dont update the cache.
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.

15 years agosrc/plugin.c: Add the `{Pre,Post}CacheChain' options and appropriate chains.
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.