collectd.git
15 years ago.gitignore: Added libcollectclient stuff.
Sebastian Harl [Sun, 11 Jan 2009 14:31:43 +0000 (15:31 +0100)]
.gitignore: Added libcollectclient stuff.

15 years agolibcollectdclient: Added LCC_{BEGIN,END}_DECLS macros.
Sebastian Harl [Sun, 11 Jan 2009 14:23:28 +0000 (15:23 +0100)]
libcollectdclient: Added LCC_{BEGIN,END}_DECLS macros.

These macros define an extern "C" block when using C++. This allows to use the
headers from C++ as well.

15 years agolibcollectdclient: Added header lcc_features.h.
Sebastian Harl [Sun, 11 Jan 2009 14:10:54 +0000 (15:10 +0100)]
libcollectdclient: Added header lcc_features.h.

This header provides various macros and functions that may be used to
determine the version of libcollectdclient (i.e. collectd). The file will be
auto-created from lcc_features.h.in by configure.

The macro LCC_VERSION (previously defined in client.h) has been moved to this
header as well and has been renamed to LCC_API_VERSION.

This allows for fine grained version checks at compile- and runtime.

15 years agoopenvpn plugin: Some small cleanups.
Florian Forster [Sat, 10 Jan 2009 14:30:54 +0000 (15:30 +0100)]
openvpn plugin: Some small cleanups.

15 years agovalue match: Add the `DataSource' and `Satisfy' configuration options.
Florian Forster [Sat, 3 Jan 2009 14:16:02 +0000 (15:16 +0100)]
value match: Add the `DataSource' and `Satisfy' configuration options.

This adds quite some flexibility to the match. collectd.conf(5) is kept
up to date, too.

15 years agoMerge branch 'collectd-4.5'
Florian Forster [Sat, 3 Jan 2009 00:36:04 +0000 (01:36 +0100)]
Merge branch 'collectd-4.5'

Conflicts:

src/types.db.pod

15 years agoBumped version to 4.5.2; Updated ChangeLog. collectd-4.5.2
Florian Forster [Fri, 2 Jan 2009 22:18:15 +0000 (23:18 +0100)]
Bumped version to 4.5.2; Updated ChangeLog.

15 years agoMerge branch 'collectd-4.4' into collectd-4.5
Florian Forster [Fri, 2 Jan 2009 21:40:44 +0000 (22:40 +0100)]
Merge branch 'collectd-4.4' into collectd-4.5

Conflicts:

ChangeLog
version-gen.sh

15 years agoBumped version to 4.4.5; Updated ChangeLog. collectd-4.4.5
Florian Forster [Fri, 2 Jan 2009 17:31:11 +0000 (18:31 +0100)]
Bumped version to 4.4.5; Updated ChangeLog.

15 years agocontrib/README: Add the solaris-smf subdirectory.
Florian Forster [Thu, 1 Jan 2009 13:05:07 +0000 (14:05 +0100)]
contrib/README: Add the solaris-smf subdirectory.

15 years agocontrib/solaris-smf: Add Solaris SMF information to contrib/.
Piotr Hosowicz [Thu, 1 Jan 2009 13:01:01 +0000 (14:01 +0100)]
contrib/solaris-smf: Add Solaris SMF information to contrib/.

See README or <http://phosowicz.jogger.pl/2008/12/21/smf-izing-collectd/> for
details.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoMerge branch 'dm/openvpn'
Florian Forster [Thu, 1 Jan 2009 11:36:40 +0000 (12:36 +0100)]
Merge branch 'dm/openvpn'

15 years agocollectd.conf(5): Fix two typos.
Florian Forster [Thu, 1 Jan 2009 11:36:25 +0000 (12:36 +0100)]
collectd.conf(5): Fix two typos.

15 years agocollectd.conf(5): Added information about the openvpn plugin.
Florian Forster [Thu, 1 Jan 2009 11:35:34 +0000 (12:35 +0100)]
collectd.conf(5): Added information about the openvpn plugin.

15 years agoopenvpn plugin: Add a plugin to read OpenVPN statistics.
Doug MacEachern [Sun, 21 Dec 2008 01:08:39 +0000 (17:08 -0800)]
openvpn plugin: Add a plugin to read OpenVPN statistics.

Simple but useful module for monitoring per-client openvpn traffic..

The plugin reads a statistics file maintained by OpenVPN. The location of the
statistics file is configurable.

Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoMerge branch 'collectd-4.4' into collectd-4.5
Florian Forster [Tue, 30 Dec 2008 16:24:06 +0000 (17:24 +0100)]
Merge branch 'collectd-4.4' into collectd-4.5

Conflicts:

src/network.c

15 years agonetwork plugin: Fix an invalid size of buffer being used.
Florian Forster [Tue, 30 Dec 2008 13:44:39 +0000 (14:44 +0100)]
network plugin: Fix an invalid size of buffer being used.

When specifying the amount of data to copy, we used `sizeof (buffer)' where
`buffer' is a pointer, giving 4 or 8 bytes, depending on the architecture (and
not depending on the actual buffer size). This results in the `type' being sent
much more often than necessary and sometimes not sending a new type when is was
actually necessary. The only prominent case in the default configuration(s) was
`cpufreq' being used instead of `cpu', though.

While in the process, the global `type' buffer was replaced, because an
appropriate buffer is in `value_list_t' now.

Much thanks to Bruno Prémont for reporting and debugging this issue :)

References: #37

15 years agonetwork plugin: A fix for the buffer problem for version 4.4.
Florian Forster [Tue, 30 Dec 2008 16:13:31 +0000 (17:13 +0100)]
network plugin: A fix for the buffer problem for version 4.4.

This patch fixes the same problem as 6605ff1a, the insufficient copying of
values to the `type' buffer.

Thanks again to Bruno Prémont for reporting and debugging this :)

Resolves: #37

15 years agolibcollectdclient: Don't use `PF_UNIX', it's broken on Mac OS X.
Florian Forster [Tue, 30 Dec 2008 15:46:38 +0000 (16:46 +0100)]
libcollectdclient: Don't use `PF_UNIX', it's broken on Mac OS X.

Under Mac OS X (10.4, possibly others), PF_UNIX is defined as PF_LOCAL, which
in turn is defined as AF_LOCAL. AF_LOCAL, however, is only defined if
POSIX_C_SOURCE is not.

15 years agonetwork plugin: Fix an invalid size of buffer being used.
Florian Forster [Tue, 30 Dec 2008 13:44:39 +0000 (14:44 +0100)]
network plugin: Fix an invalid size of buffer being used.

When specifying the amount of data to copy, we used `sizeof (buffer)' where
`buffer' is a pointer, giving 4 or 8 bytes, depending on the architecture (and
not depending on the actual buffer size). This results in the `type' being sent
much more often than necessary and sometimes not sending a new type when is was
actually necessary. The only prominent case in the default configuration(s) was
`cpufreq' being used instead of `cpu', though.

While in the process, the global `type' buffer was replaced, because an
appropriate buffer is in `value_list_t' now.

Much thanks to Bruno Prémont for reporting and debugging this issue :)

References: #37

15 years agosrc/utils_subst.c: Print the warning of the subst_string function when appropriate.
Florian Forster [Sun, 21 Dec 2008 02:00:51 +0000 (03:00 +0100)]
src/utils_subst.c: Print the warning of the subst_string function when appropriate.

A leftover from the previous setting, a hard-coded maximum, was forgotten.

15 years agonotification target: Add a target that dispatches notifications.
Florian Forster [Sat, 20 Dec 2008 16:07:59 +0000 (17:07 +0100)]
notification target: Add a target that dispatches notifications.

Not tested very well yet, but it works essentially.

15 years agosrc/common.c: Change `sstrdup' to not call `strdup' anymore.
Florian Forster [Sat, 20 Dec 2008 15:55:10 +0000 (16:55 +0100)]
src/common.c: Change `sstrdup' to not call `strdup' anymore.

15 years agosrc/utils_subst.[ch]: Implement `subst_string'.
Florian Forster [Sat, 20 Dec 2008 15:54:32 +0000 (16:54 +0100)]
src/utils_subst.[ch]: Implement `subst_string'.

Works like `subst', but instead of specifying start and end offsets you
specify `needle', the string that is to be replaced. If `needle' is found
in `string' (using strstr(3)), the offset is calculated and `subst' is
called with the determined parameters.

15 years agotypes.db(5): Fix a typo.
Florian Forster [Sat, 20 Dec 2008 12:34:43 +0000 (13:34 +0100)]
types.db(5): Fix a typo.

15 years agoreplace target: Add a target to replace part of an identifier..
Florian Forster [Sat, 20 Dec 2008 12:26:24 +0000 (13:26 +0100)]
replace target: Add a target to replace part of an identifier..

..using regular expressions.

Possible future improvements: Use submatches in the replacement string,
similar to sed's \1, \2, ... back-references.

15 years agotypes.db(5): Explain in more detail how custom types should be added.
Florian Forster [Sat, 20 Dec 2008 10:20:31 +0000 (11:20 +0100)]
types.db(5): Explain in more detail how custom types should be added.

Apparently there was quite some confusion over this.

15 years agoMerge branch 'collectd-4.5'
Florian Forster [Sat, 20 Dec 2008 09:18:21 +0000 (10:18 +0100)]
Merge branch 'collectd-4.5'

15 years agoMerge branch 'collectd-4.4' into collectd-4.5
Florian Forster [Sat, 20 Dec 2008 09:17:26 +0000 (10:17 +0100)]
Merge branch 'collectd-4.4' into collectd-4.5

Conflicts:

src/utils_dns.c

15 years agoDo not use *printf() to report errors / debugging messages.
Sebastian Harl [Fri, 19 Dec 2008 17:20:41 +0000 (18:20 +0100)]
Do not use *printf() to report errors / debugging messages.

The only exception to that is during configuration (which is done before
daemonization) to let the user know about problems immediately.

15 years agosrc/Makefile: Do not print the command when checking for POD ERRORS.
Sebastian Harl [Fri, 19 Dec 2008 16:16:35 +0000 (17:16 +0100)]
src/Makefile: Do not print the command when checking for POD ERRORS.

Else, the build output would include the word "error" in a cryptically looking
paragraph which might confuse users.

15 years agocollectd.conf(5): Updated the section about the "mysql" plugin.
Sebastian Harl [Fri, 19 Dec 2008 16:00:56 +0000 (17:00 +0100)]
collectd.conf(5): Updated the section about the "mysql" plugin.

 * Do not talk about what RRD files things end up in - there is more than
   "rrdtool" by now.
 * Updated the section number of the "Server Status Variables" in the MySQL
   reference manual.
 * Mention that the MySQL user does not need any special privileges.

15 years agocollectd: Abort with an appropriate status in exit_usage().
Sebastian Harl [Wed, 10 Dec 2008 21:12:24 +0000 (22:12 +0100)]
collectd: Abort with an appropriate status in exit_usage().

In case of an error, the exit status code now equals 1.

15 years agocollectd: Abort if any non-options are left over after command-line parsing.
Sebastian Harl [Wed, 10 Dec 2008 21:08:26 +0000 (22:08 +0100)]
collectd: Abort if any non-options are left over after command-line parsing.

This happens if any arguments not starting with a dash are passed to collectd.
Any of those are invalid, so let the user know about that.

Thanks to Kris (gruntruk) for (unknowingly) pointing that out ;-)

15 years agocollectd-nagios: Be more verbose before bailing out with usage().
Sebastian Harl [Tue, 9 Dec 2008 11:49:36 +0000 (12:49 +0100)]
collectd-nagios: Be more verbose before bailing out with usage().

15 years agocollectd-nagios: Added "percentage" to the help output.
Sebastian Harl [Mon, 8 Dec 2008 23:47:30 +0000 (00:47 +0100)]
collectd-nagios: Added "percentage" to the help output.

15 years agocollectd-nagios: Generalized the "percentage" consolidation function.
Sebastian Harl [Mon, 8 Dec 2008 23:33:55 +0000 (00:33 +0100)]
collectd-nagios: Generalized the "percentage" consolidation function.

Calculation of the percentage is not limited to two values any more but an
arbitrary number may be used now. This allows a more flexible usage.

Also, the documentation has been updated.

15 years agocollectd-nagios: add new "percentage" aggregate function.
Fabian Linzberger [Mon, 3 Nov 2008 19:06:46 +0000 (20:06 +0100)]
collectd-nagios: add new "percentage" aggregate function.

the percentage aggregate function takes exactly two values. it
computes the percentage of the first value versus the sum of the first
and the second value. very useful for checking df values like:

sudo collectd-nagios -s /var/run/collectd-unixsock -H localhost -n df/df-root -d used -d free -g percentage -w 20: -c 10:

which will warn if there is less than 20% free space.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
15 years agocollectd-nagios: If DSs are specified, sort the values accordingly.
Sebastian Harl [Tue, 9 Dec 2008 11:27:47 +0000 (12:27 +0100)]
collectd-nagios: If DSs are specified, sort the values accordingly.

If a user specifies DSs on the command line, the order or the values might
matter (e.g. when using the upcoming "percentage" consolidation function). So,
in this case we now order the values according to the order of the specified
DSs.

This patch replaces the function ignore_ds() with filter_ds() which is called
once in do_check(). This removes the need to check for ignored values in all
consolidation function implementations.

15 years agolibcollectdclient: Build the library using -Wall -Werror.
Sebastian Harl [Tue, 9 Dec 2008 09:57:10 +0000 (10:57 +0100)]
libcollectdclient: Build the library using -Wall -Werror.

Fixed two minor issues detected by those flags.

15 years agolibcollectdclient/client.c: Let COLLECT_DEBUG decide about debugging.
Sebastian Harl [Tue, 9 Dec 2008 09:51:30 +0000 (10:51 +0100)]
libcollectdclient/client.c: Let COLLECT_DEBUG decide about debugging.

The file now includes config.h and enables debugging based on COLLECT_DEBUG
instead of some hard-coded value.

15 years agoperl plugin, utils_complain: Fixed errors identified by -Wformat-security.
Sebastian Harl [Sat, 6 Dec 2008 16:29:42 +0000 (17:29 +0100)]
perl plugin, utils_complain: Fixed errors identified by -Wformat-security.

A few "format not a string literal and no format arguments" errors have been
fixed by using "%s" as the format argument.

Thanks to Kevin (onebinary) for reporting this.

15 years agocollectd.conf.in: Fixed a wrong type used in the "tail" example.
Sebastian Harl [Sat, 6 Dec 2008 15:41:04 +0000 (16:41 +0100)]
collectd.conf.in: Fixed a wrong type used in the "tail" example.

15 years agocollectd.conf.pod: Consistently use spaces instead of tabs in examples.
Sebastian Harl [Sat, 6 Dec 2008 15:32:27 +0000 (16:32 +0100)]
collectd.conf.pod: Consistently use spaces instead of tabs in examples.

15 years agoprocesses plugin: Get complete command line for processes on Linux as well.
Sebastian Harl [Tue, 25 Nov 2008 16:53:53 +0000 (17:53 +0100)]
processes plugin: Get complete command line for processes on Linux as well.

On Linux, /proc/<pid>/cmdline is now used to determine the complete command
line of a process which may then be used with the "ProcessMatch" configuration
option.

15 years agoprocesses plugin: Do not silently ignore configuration errors.
Sebastian Harl [Sat, 22 Nov 2008 17:39:00 +0000 (18:39 +0100)]
processes plugin: Do not silently ignore configuration errors.

15 years agocollectd.conf(5): Documented the "ProcessMatch" option.
Sebastian Harl [Fri, 21 Nov 2008 18:11:00 +0000 (19:11 +0100)]
collectd.conf(5): Documented the "ProcessMatch" option.

15 years agoconfigfile.c: Ignore registered undefined config keys.
Sebastian Harl [Fri, 5 Dec 2008 16:22:53 +0000 (17:22 +0100)]
configfile.c: Ignore registered undefined config keys.

If a registered config key equals NULL, it is now ignored. Before, this would
cause a segfault. As this has happened a few times in the past, we not handle
it sanely.

15 years agoprocesses plugin: Fixed a segfault when handling unknown config options.
Sebastian Harl [Fri, 5 Dec 2008 16:11:16 +0000 (17:11 +0100)]
processes plugin: Fixed a segfault when handling unknown config options.

When using STATIC_ARRAY_SIZE() to determine the number of config keys, the
list must not include NULL. Else, the configfile module will handle that as
another config key and dereference it in case no previous key matched, i.e.
when handling unknown config options.

15 years agounixsock plugin: Make sure the initialization function is run only once.
Florian Forster [Fri, 5 Dec 2008 10:29:54 +0000 (11:29 +0100)]
unixsock plugin: Make sure the initialization function is run only once.

If called multiple times, the global `sock_fd' variable will be re-set,
breaking the plugin.

15 years agoMerge branch 'collectd-4.5'
Florian Forster [Wed, 3 Dec 2008 21:59:06 +0000 (22:59 +0100)]
Merge branch 'collectd-4.5'

15 years agoconfigure.in: Check for `kvm_openfiles'.
Florian Forster [Wed, 3 Dec 2008 21:56:18 +0000 (22:56 +0100)]
configure.in: Check for `kvm_openfiles'.

Check for both, `kvm_nlist' and `kvm_openfiles' before enabling the
tcpconns plugin with libkvm: Solaris has a libkvm, too, but doesn't
provide the necessary functions to read the connections with it. At
least not in the same way.

15 years agoMerge branch 'collectd-4.4' into collectd-4.5
Florian Forster [Wed, 3 Dec 2008 21:50:50 +0000 (22:50 +0100)]
Merge branch 'collectd-4.4' into collectd-4.5

15 years agoconfigure.in: Some improvements for Solaris, expecially the swap plugin.
Florian Forster [Wed, 3 Dec 2008 21:07:24 +0000 (22:07 +0100)]
configure.in: Some improvements for Solaris, expecially the swap plugin.

If Solaris is detected, "-D_POSIX_PTHREAD_SEMANTICS" will be added to
CPPFLAGS automatically now.

If sys/swap.h is not found, print a message suggesting to build a 64bit
binary. (sys/swap.h cannot be included when a 32bit binary is being built,
but it's most likely present under Solaris.)

Enable the swap plugin only if sys/swap.h has been found (when under
Solaris).

15 years agosrc/collectd-nagios.c: Include "config.h" before <stdlib.h>.
Florian Forster [Wed, 3 Dec 2008 20:36:08 +0000 (21:36 +0100)]
src/collectd-nagios.c: Include "config.h" before <stdlib.h>.

Otherwise _FILE_OFFSET_BITS may be redefined.

15 years agoMerge branch 'collectd-4.5'
Florian Forster [Tue, 2 Dec 2008 22:31:32 +0000 (23:31 +0100)]
Merge branch 'collectd-4.5'

15 years agosrc/plugin.[ch]: Don't use unnamed unions.
Florian Forster [Tue, 2 Dec 2008 22:30:43 +0000 (23:30 +0100)]
src/plugin.[ch]: Don't use unnamed unions.

They're non-standard and cause a lot of trouble.

15 years agolibcollectdclient/client.c: Define NI_MAXHOST to 1025.
Florian Forster [Tue, 2 Dec 2008 22:01:01 +0000 (23:01 +0100)]
libcollectdclient/client.c: Define NI_MAXHOST to 1025.

Apparently this define has been obsoleted by RFC 3493, so SunOS 5.11 no
longer defines it. This probably is a problem somewhere else, too.

15 years agoMerge branch 'collectd-4.5'
Florian Forster [Fri, 28 Nov 2008 11:00:15 +0000 (12:00 +0100)]
Merge branch 'collectd-4.5'

15 years agoMerge branch 'collectd-4.4' into collectd-4.5
Florian Forster [Fri, 28 Nov 2008 11:00:03 +0000 (12:00 +0100)]
Merge branch 'collectd-4.4' into collectd-4.5

16 years agomultimeter plugin: Check the return value of `write'.
Florian Forster [Mon, 24 Nov 2008 18:23:25 +0000 (19:23 +0100)]
multimeter plugin: Check the return value of `write'.

This resolves warnings when compiling on GNU with:
  CPPFLAGS="-D_FORTIFY_SOURCE"

16 years agocollectd.conf(5): Fix a POD error.
Florian Forster [Mon, 24 Nov 2008 18:18:43 +0000 (19:18 +0100)]
collectd.conf(5): Fix a POD error.

16 years agovalue match: Add a match to check the actual value(s) of data-sources.
Florian Forster [Mon, 24 Nov 2008 14:00:46 +0000 (15:00 +0100)]
value match: Add a match to check the actual value(s) of data-sources.

16 years agosrc/filter_chain.[ch]: Implement the built-in `return' target.
Florian Forster [Mon, 24 Nov 2008 11:05:24 +0000 (12:05 +0100)]
src/filter_chain.[ch]: Implement the built-in `return' target.

The `stop' target now aborts all processing of the value completely, `return'
only stops the current chain and continues processing the parent chain.

The collectd.conf(5) manual page has been updated and the `FC_ACTION_*' defines
have been renamed to `FC_TARGET_*'.

16 years agocollectd.conf(5): Document the regex match and the set target.
Florian Forster [Sun, 23 Nov 2008 18:09:53 +0000 (19:09 +0100)]
collectd.conf(5): Document the regex match and the set target.

16 years agoregex match: Require *all* regular expressions to match.
Florian Forster [Sun, 23 Nov 2008 18:07:10 +0000 (19:07 +0100)]
regex match: Require *all* regular expressions to match.

Before, when there were multiple regular expressions for the same field,
for example the host, only of of those regular expressions needed to
match for a successful overall match.

The new behavior is not that *all* regular expressions need to match for
a successful overall match. This makes the behavior much easier to
understand.

16 years agoset target: Don't allow setting of the `type' field.
Florian Forster [Sun, 23 Nov 2008 18:06:53 +0000 (19:06 +0100)]
set target: Don't allow setting of the `type' field.

16 years agoset target: Implement a target to set fields in a value list.
Florian Forster [Sun, 23 Nov 2008 17:19:34 +0000 (18:19 +0100)]
set target: Implement a target to set fields in a value list.

It's currently possible to re-set the `type'. This is most likely not
good and will result in unpredictable behavior. I'll remove that,
probably.

16 years agoregex match: Add myself to the list of copyright holders.
Florian Forster [Sun, 23 Nov 2008 17:15:36 +0000 (18:15 +0100)]
regex match: Add myself to the list of copyright holders.

Sebastian insisted on it ;)

16 years agosrc/filter_chain.c: Beatify debug and warning messages.
Florian Forster [Sun, 23 Nov 2008 16:22:48 +0000 (17:22 +0100)]
src/filter_chain.c: Beatify debug and warning messages.

16 years agosrc/filter_chain.c: Actually abort default targets when one signals `stop'.
Florian Forster [Sun, 23 Nov 2008 16:22:12 +0000 (17:22 +0100)]
src/filter_chain.c: Actually abort default targets when one signals `stop'.

It should not behave as documented.

16 years agosrc/filter_chain.c: Fix a rather unimportant typo.
Florian Forster [Sun, 23 Nov 2008 16:20:37 +0000 (17:20 +0100)]
src/filter_chain.c: Fix a rather unimportant typo.

16 years agocollectd.conf.in: Add something for the filtering stuff.
Florian Forster [Sun, 23 Nov 2008 12:47:20 +0000 (13:47 +0100)]
collectd.conf.in: Add something for the filtering stuff.

Mostly a pointer to the manual page for now.

16 years agocollectd.conf(5): Add an example to the filter documentation.
Florian Forster [Sun, 23 Nov 2008 12:46:18 +0000 (13:46 +0100)]
collectd.conf(5): Add an example to the filter documentation.

16 years agosrc/filter_chain.c: Implement the default behavior.
Florian Forster [Sun, 23 Nov 2008 11:49:25 +0000 (12:49 +0100)]
src/filter_chain.c: Implement the default behavior.

If no <Chain> is defined, send all values to all write plugins.

16 years agosrc/meta_data.[ch]: Added a framework for meta data.
Florian Forster [Sat, 22 Nov 2008 18:19:12 +0000 (19:19 +0100)]
src/meta_data.[ch]: Added a framework for meta data.

This framework is planned to be used in at least three places:

- Extend the global cache to allow attaching a meta-data object to each
  entry. The meta-data can then be used by other plugins to attach
  miscellaneous information to an entry. Possibly uses include
  calculation of floating averages or storing the state for a hysteresis
  threshold.

- Add a meta-data object to every `value_list_t' in
  `plugin_dispatch_values'. The meta-data object can then be used by
  matches and targets to pass information about a value-list to one
  another.

- Replace the notification meta-data stuff in src/plugin.[ch] with such
  an object.

16 years agoMerge branch 'ff/libcollectdclient'
Florian Forster [Sat, 22 Nov 2008 00:08:58 +0000 (01:08 +0100)]
Merge branch 'ff/libcollectdclient'

16 years agoMerge branch 'ff/filter'
Florian Forster [Sat, 22 Nov 2008 00:06:11 +0000 (01:06 +0100)]
Merge branch 'ff/filter'

16 years agosrc/filter_chain.c, src/match_regex.c: Add some debugging messages.
Florian Forster [Sat, 22 Nov 2008 00:05:15 +0000 (01:05 +0100)]
src/filter_chain.c, src/match_regex.c: Add some debugging messages.

16 years agosrc/plubin.c: Call `fc_process' instead of calling the write plugins directly.
Florian Forster [Sat, 22 Nov 2008 00:04:29 +0000 (01:04 +0100)]
src/plubin.c: Call `fc_process' instead of calling the write plugins directly.

16 years agosrc/filter_chain.c: Allow the create-function of mathces to be NULL.
Florian Forster [Sat, 22 Nov 2008 00:03:25 +0000 (01:03 +0100)]
src/filter_chain.c: Allow the create-function of mathces to be NULL.

Not all targets actually need to be created, for example
the `stop' target.

16 years agosrc/filter_chain.c: Add `Target' blocks to `Chain' blocks.
Florian Forster [Sat, 22 Nov 2008 00:02:08 +0000 (01:02 +0100)]
src/filter_chain.c: Add `Target' blocks to `Chain' blocks.

I simply forgot them :/

16 years agomatch_regex plugin: Fix a typo.
Florian Forster [Sat, 22 Nov 2008 00:00:41 +0000 (01:00 +0100)]
match_regex plugin: Fix a typo.

16 years agosrc/configfile.c: Dispatch the `Chain' blocks to fc_configure.
Florian Forster [Fri, 21 Nov 2008 23:58:36 +0000 (00:58 +0100)]
src/configfile.c: Dispatch the `Chain' blocks to fc_configure.

16 years agosrc/plugin.c: Use the write-list in plugin_write.
Florian Forster [Fri, 21 Nov 2008 23:57:53 +0000 (00:57 +0100)]
src/plugin.c: Use the write-list in plugin_write.

Not the flush-list, doh!

16 years agomatch_regex plugin: Renamed `filter_pcre' to `match_regex'.
Florian Forster [Fri, 21 Nov 2008 22:14:42 +0000 (23:14 +0100)]
match_regex plugin: Renamed `filter_pcre' to `match_regex'.

In order to fit into the new match/target schema, the substitute part of the
plugin has been removed for now and will be put in a target plugin in the
future.

The match_regex now registeres a match with the new infrastructure and uses
regular expressions to match certain values based on their identifier.

16 years agosrc/filter_chain.[ch]: Implement an advanced filtering framework.
Florian Forster [Fri, 21 Nov 2008 21:09:53 +0000 (22:09 +0100)]
src/filter_chain.[ch]: Implement an advanced filtering framework.

The concept separates `filter' plugins into `match' and `target' plugins. Those
two parts can be combined in wild variation, allowing *very* flexible
mechanisms.

The concept is explained in more detail in the `FILTER CONFIGURATION' section
of collectd.conf(5), also added with this commit.

16 years agosrc/plugin.[ch]: Implement `plugin_write', a function to pass values to specific...
Florian Forster [Fri, 21 Nov 2008 21:06:23 +0000 (22:06 +0100)]
src/plugin.[ch]: Implement `plugin_write', a function to pass values to specific write plugins.

This function does none of the magic `plugin_dispatch_value' does. It simiply
takes a value and passes it to the requested plugin.

This function is intended to be used with the upcoming `filter chain' code,
which will allow to pass values to specific plugins only.

16 years agoconfigure.in: Include <stdint.h> and <inttypes.h> when checking for double storage...
Florian Forster [Fri, 21 Nov 2008 16:42:37 +0000 (17:42 +0100)]
configure.in: Include <stdint.h> and <inttypes.h> when checking for double storage layout.

Some systems, for example Solaris 9, don't have <stdint.h> and define
`uint32_t' via <inttypes.h> instead. Be more permissive by including
both header files when checking how doubles are stored in memory.

16 years agocontrib/collection.cgi: Add meta-graph definitions for the vmem plugin.
Mirko Buffoni [Sun, 16 Nov 2008 09:40:32 +0000 (10:40 +0100)]
contrib/collection.cgi: Add meta-graph definitions for the vmem plugin.

16 years agocontrib/collection.cgi: Add graph definitions for the vmem plugin.
Mirko Buffoni [Sun, 16 Nov 2008 09:39:39 +0000 (10:39 +0100)]
contrib/collection.cgi: Add graph definitions for the vmem plugin.

16 years agodbi plugin: Replace `dbi_conn_error_flag' with `dbi_conn_error'
Florian Forster [Sun, 9 Nov 2008 10:21:25 +0000 (11:21 +0100)]
dbi plugin: Replace `dbi_conn_error_flag' with `dbi_conn_error'

Version 0.8 of the libdbi deprecates `dbi_conn_error_flag', so use the other
function.

16 years agomysql plugin: Fix a typo: `$endptr' -> `&endptr'.
Florian Forster [Sun, 9 Nov 2008 10:20:07 +0000 (11:20 +0100)]
mysql plugin: Fix a typo: `$endptr' -> `&endptr'.

Yes, I've done a little Perl lately ;)

Also fix a non-void function without return value..

16 years agolibcollectdclient: Use the `SSTRCATF' macro some more.
Florian Forster [Sat, 8 Nov 2008 17:04:56 +0000 (18:04 +0100)]
libcollectdclient: Use the `SSTRCATF' macro some more.

This really does make stuff shorter. Hopefully it
makes it easier to read, too.

16 years agolibcollectdclient: Document the used macros.
Florian Forster [Sat, 8 Nov 2008 17:04:21 +0000 (18:04 +0100)]
libcollectdclient: Document the used macros.

They're probably not obvious unless you've doe quite
some C coding.

16 years agolibcollectdclient: Implemented `lcc_flush'.
Florian Forster [Sat, 8 Nov 2008 16:57:04 +0000 (17:57 +0100)]
libcollectdclient: Implemented `lcc_flush'.

16 years agolibcollectdclient: Implemented `lcc_putval'.
Florian Forster [Sat, 8 Nov 2008 16:55:28 +0000 (17:55 +0100)]
libcollectdclient: Implemented `lcc_putval'.

16 years agocollectd-nagios: Use `libcollectdclient' and various improvements.
Florian Forster [Sun, 26 Oct 2008 22:09:27 +0000 (23:09 +0100)]
collectd-nagios: Use `libcollectdclient' and various improvements.

The improvements include:
- Copyright and license header.
- More consistent output.
- Frees some more memory that was allocated..
- Better standards compliance.
- Make all functions `static' (except `main', of course).
- Use `%g' instead of `%lf' to print floating point values.

16 years agosrc/libcollectdclient: Add a library which abstracts talking to the `unixsock' plugin.
Florian Forster [Sun, 26 Oct 2008 20:52:29 +0000 (21:52 +0100)]
src/libcollectdclient: Add a library which abstracts talking to the `unixsock' plugin.

16 years agoMerge branch 'master' of octo@verplant.org:/var/lib/git/collectd
Florian Forster [Sat, 8 Nov 2008 15:03:04 +0000 (16:03 +0100)]
Merge branch 'master' of octo@verplant.org:/var/lib/git/collectd