Sebastian Harl [Tue, 9 Dec 2008 11:49:36 +0000 (12:49 +0100)]
collectd-nagios: Be more verbose before bailing out with usage().
Sebastian Harl [Mon, 8 Dec 2008 23:47:30 +0000 (00:47 +0100)]
collectd-nagios: Added "percentage" to the help output.
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.
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>
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.
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.
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.
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.
Sebastian Harl [Sat, 22 Nov 2008 17:39:00 +0000 (18:39 +0100)]
processes plugin: Do not silently ignore configuration errors.
Sebastian Harl [Fri, 21 Nov 2008 18:11:00 +0000 (19:11 +0100)]
collectd.conf(5): Documented the "ProcessMatch" option.
Florian Forster [Wed, 3 Dec 2008 21:59:06 +0000 (22:59 +0100)]
Merge branch 'collectd-4.5'
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.
Florian Forster [Wed, 3 Dec 2008 21:50:50 +0000 (22:50 +0100)]
Merge branch 'collectd-4.4' into collectd-4.5
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).
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.
Florian Forster [Tue, 2 Dec 2008 22:31:32 +0000 (23:31 +0100)]
Merge branch 'collectd-4.5'
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.
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.
Florian Forster [Fri, 28 Nov 2008 11:00:15 +0000 (12:00 +0100)]
Merge branch '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
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"
Florian Forster [Mon, 24 Nov 2008 18:18:43 +0000 (19:18 +0100)]
collectd.conf(5): Fix a POD error.
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.
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_*'.
Florian Forster [Sun, 23 Nov 2008 18:09:53 +0000 (19:09 +0100)]
collectd.conf(5): Document the regex match and the set target.
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.
Florian Forster [Sun, 23 Nov 2008 18:06:53 +0000 (19:06 +0100)]
set target: Don't allow setting of the `type' field.
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.
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 ;)
Florian Forster [Sun, 23 Nov 2008 16:22:48 +0000 (17:22 +0100)]
src/filter_chain.c: Beatify debug and warning messages.
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.
Florian Forster [Sun, 23 Nov 2008 16:20:37 +0000 (17:20 +0100)]
src/filter_chain.c: Fix a rather unimportant typo.
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.
Florian Forster [Sun, 23 Nov 2008 12:46:18 +0000 (13:46 +0100)]
collectd.conf(5): Add an example to the filter documentation.
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.
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.
Florian Forster [Sat, 22 Nov 2008 00:08:58 +0000 (01:08 +0100)]
Merge branch 'ff/libcollectdclient'
Florian Forster [Sat, 22 Nov 2008 00:06:11 +0000 (01:06 +0100)]
Merge branch 'ff/filter'
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.
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.
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.
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 :/
Florian Forster [Sat, 22 Nov 2008 00:00:41 +0000 (01:00 +0100)]
match_regex plugin: Fix a typo.
Florian Forster [Fri, 21 Nov 2008 23:58:36 +0000 (00:58 +0100)]
src/configfile.c: Dispatch the `Chain' blocks to fc_configure.
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!
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.
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.
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.
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.
Mirko Buffoni [Sun, 16 Nov 2008 09:40:32 +0000 (10:40 +0100)]
contrib/collection.cgi: Add meta-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.
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.
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..
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.
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.
Florian Forster [Sat, 8 Nov 2008 16:57:04 +0000 (17:57 +0100)]
libcollectdclient: Implemented `lcc_flush'.
Florian Forster [Sat, 8 Nov 2008 16:55:28 +0000 (17:55 +0100)]
libcollectdclient: Implemented `lcc_putval'.
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.
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.
Florian Forster [Sat, 8 Nov 2008 15:03:04 +0000 (16:03 +0100)]
Merge branch 'master' of octo@verplant.org:/var/lib/git/collectd
Florian Forster [Sat, 8 Nov 2008 15:02:30 +0000 (16:02 +0100)]
mysql plugin: Be more careful when parsing the `Port' argument.
Florian Forster [Sat, 8 Nov 2008 14:54:03 +0000 (15:54 +0100)]
collectd.conf(5): Document the new options of the mysql plugin.
Mirko Buffoni [Wed, 29 Oct 2008 11:24:04 +0000 (12:24 +0100)]
mysql plugin: Allow configuration of `Port' and `Socket'.
Hi,
I have a patch for mysql collectd library.
The patch allow to specify also Port and Socket
parameters for those who have a non-standard configuration
of mysql.
It's very straightforward. If accepted, there is only to
change documentation and config file to reflect the new
parameters.
Enjoy
Mirko
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Florian Forster [Sat, 8 Nov 2008 08:46:29 +0000 (09:46 +0100)]
filter_pcre: Handle out of memory situations more gracefully.
Florian Forster [Sat, 8 Nov 2008 08:01:12 +0000 (09:01 +0100)]
Merge branch 'sh/next'
Florian Forster [Sat, 8 Nov 2008 08:00:00 +0000 (09:00 +0100)]
Merge branch 'collectd-4.5'
Florian Forster [Sat, 8 Nov 2008 07:59:17 +0000 (08:59 +0100)]
Merge branch 'collectd-4.4' into collectd-4.5
Florian Forster [Fri, 7 Nov 2008 18:49:52 +0000 (19:49 +0100)]
src/utils_rrdcreate.c: srrd_create: Copy the `filename' argument.
Some versions of librrd, for example the one in Debian Etch, don't have the
`const' qualifier for the first (filename) argument for `rrd_create_r'. So
we'll copy the argument first. This sucks big time, but is the only reasonable
way to get around this.
Sebastian Harl [Fri, 10 Oct 2008 13:07:05 +0000 (15:07 +0200)]
Install types.db into PKGDATADIR instead of PKGLIBDIR.
The FHS specifies that /usr/share should be used to store architecture
independent data while /usr/lib includes object files, libraries and
architecture dependent data.
Sebastian Harl [Fri, 31 Oct 2008 19:03:12 +0000 (20:03 +0100)]
contrib/oracle: Fixed some typos.
Sebastian Harl [Fri, 31 Oct 2008 18:49:08 +0000 (19:49 +0100)]
filter_pcre plugin: Added support to rewrite value lists.
For this purpose "Substitute*" options have been introduced for each regex
option. Upon a successful match, the matching substring will be replaced by
the specified replacement text.
Configuration example:
<Plugin filter_pcre>
<RegEx>
Plugin "^sensors$"
PluginInstance "^Some Weird Sensor Chip Name Prefix"
SubstitutePluginInstance "foo"
</RegEx>
</Plugin>
Sebastian Harl [Wed, 29 Oct 2008 20:24:00 +0000 (21:24 +0100)]
utils_subst: Added a module providing functions for string substitution.
Currently, the functions subst() and asubst() are available which may be used
to replace parts of a string with a specified replacement text. The latter
automatically allocates the memory required for the return value while the
former writes to a user specified buffer.
Sebastian Harl [Wed, 29 Oct 2008 17:56:21 +0000 (18:56 +0100)]
utils_*.h: Made header files self-hosting.
Added (hopefully) all missing includes.
Sebastian Harl [Thu, 30 Oct 2008 18:15:41 +0000 (19:15 +0100)]
filecount plugin: Added the "Recursive" config option.
This option controls whether or not to recurse into subdirectories. It's
enabled by default, so backward-compatibility is retained.
Sebastian Harl [Thu, 30 Oct 2008 09:24:53 +0000 (10:24 +0100)]
collectd.conf(5): Added a missing </RegEx> to the configuration example.
Sebastian Harl [Wed, 29 Oct 2008 16:15:13 +0000 (17:15 +0100)]
libiptc/Makefile.am: Added xtables.h, libxtc.h to libiptc_la_SOURCES.
Else, those files would not be included in the tarball.
Sebastian Harl [Sat, 1 Nov 2008 11:19:29 +0000 (12:19 +0100)]
src/Makefile: Build ipvs and uuid plugins using $AM_CFLAGS.
Sebastian Harl [Sat, 1 Nov 2008 10:28:30 +0000 (11:28 +0100)]
configure, mysql plugin: Check for mysql.h as well.
Up to now, only mysql/mysql.h has been checked for. However, mysql_config
--cflags usually adds the complete path to mysql.h to the include flags. In
most setups, mysql/mysql.h can be found in the search path as well (usually
the header is available in something like /usr/include/mysql/mysql.h) so this
issue has not been found so far. However, if that's not the case, the build
will fail.
Thanks to Dusty Doris <collectd@dusty.name> for reporting this.
Florian Forster [Fri, 31 Oct 2008 17:05:39 +0000 (18:05 +0100)]
contrib/collection3: Add the `format' parameter to the graph.cgi.
With this parameter one can specify the file format the graph is returned in,
for example `format=SVG' for an SVG image.
Florian Forster [Fri, 31 Oct 2008 14:55:19 +0000 (15:55 +0100)]
src/utils_complain.c: Include "collectd.h" as first header file.
This is needed to get the _FILE_OFFSET_BITS define right.
Florian Forster [Fri, 31 Oct 2008 14:44:53 +0000 (15:44 +0100)]
apcups plugin: Include "collectd.h" *before" <stdlib.h>.
If not defined, <stdlib.h> sets/defines _FILE_OFFSET_BITS. Since (in 32bit
mode) "collectd.h" defines that, too, you'll run into compilation problems.
Florian Forster [Fri, 31 Oct 2008 10:31:43 +0000 (11:31 +0100)]
Merge branch 'ff/oracle'
Conflicts:
configure.in
Roman Klesel [Fri, 31 Oct 2008 10:09:50 +0000 (11:09 +0100)]
contrib/oracle: Add an example schema and SQL statements for the oracle plugin.
create_schema.ddl: Script to create a schema that can be queried by
collectd.
db_systat.sql: Sample SQL statements to be used in the collectd
configuration.
Sebastian Harl [Thu, 30 Oct 2008 15:27:37 +0000 (16:27 +0100)]
filecount plugin: Fixed an off-by-one error in the configuration code.
The memory allocated to store the information about configured directories did
not take into account the newly added directory. This would cause a segfault
at some point of time (when specifying more than four directories in my case).
Thanks to Martin Janota <janota.m@cce.cz> for finding and reporting this bug.
Ulrich Habel [Wed, 29 Oct 2008 06:01:12 +0000 (07:01 +0100)]
perl plugin: Fix an uninitialized variable warning.
Resolves: #33
Ulrich Habel [Wed, 29 Oct 2008 05:54:26 +0000 (06:54 +0100)]
src/utils_dns.c: Cast a `char' to `int' when using `tolower'.
This is needed at least on NetBSD, but probably on other non-GNU libcs as well.
Resolves: #32
Sebastian Harl [Tue, 28 Oct 2008 21:02:38 +0000 (22:02 +0100)]
filter_pcre: Added a plugin to filter value lists based on PCRE.
The user may specify a set of Perl-compatible regular expressions to match any
component of the (host, plugin, plugin instance, type, type instance) tuple.
Any of the filter flags may be used to handle a successful match.
Sample plugin configuration:
<Plugin filter_pcre>
<RegEx>
Host "^mail\d+$"
Plugin "^tcpconns$"
TypeInstance "^SYN_"
Action NoWrite
</Plugin>
Devid Antonio Filoni [Sat, 18 Oct 2008 20:01:53 +0000 (22:01 +0200)]
libiptc/libip6tc.c: Fix a glibc 2.8 compatibility problem.
Hi,
the attached patch fix the build with glibc 2.8. Please include it in
the next version.
Thanks,
Devid Antonio Filoni
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Florian Forster [Mon, 20 Oct 2008 06:42:11 +0000 (08:42 +0200)]
src/configfile.c: Fix a closing-brace comment.
Florian Forster [Mon, 20 Oct 2008 06:40:58 +0000 (08:40 +0200)]
filter_ignore plugin: Add a simple plugin to ignore specific identifiers.
Still needs documentation and testing.
Florian Forster [Thu, 16 Oct 2008 21:17:15 +0000 (23:17 +0200)]
ChangeLog: Fix a typo.
Florian Forster [Thu, 16 Oct 2008 21:16:38 +0000 (23:16 +0200)]
ChangeLog: Fix a typo.
Florian Forster [Thu, 16 Oct 2008 20:50:15 +0000 (22:50 +0200)]
Merge branch 'collectd-4.5'
Florian Forster [Thu, 16 Oct 2008 20:42:44 +0000 (22:42 +0200)]
Bumped version to 4.5.1; Updated ChangeLog.
Florian Forster [Thu, 16 Oct 2008 20:14:28 +0000 (22:14 +0200)]
Merge branch 'collectd-4.5'
Florian Forster [Thu, 16 Oct 2008 20:13:33 +0000 (22:13 +0200)]
Merge branch 'collectd-4.4' into collectd-4.5
Conflicts:
ChangeLog
version-gen.sh
Florian Forster [Thu, 16 Oct 2008 20:07:59 +0000 (22:07 +0200)]
ChangeLog: Added the changed poisoning behavior.
Florian Forster [Thu, 16 Oct 2008 20:04:46 +0000 (22:04 +0200)]
src/collectd.h: Poison various insecure string functions only when debugging is enabled.
Because the `poison' pragma complains about macros (which are then never
used), this feature does more harm than good in everyday use. So we'll
only activate it when building in debug mode, so hopefully authors of
new plugins will use this.
Florian Forster [Thu, 16 Oct 2008 19:41:47 +0000 (21:41 +0200)]
Bumped version to 4.4.4; Updated ChangeLog.
Florian Forster [Thu, 16 Oct 2008 19:22:20 +0000 (21:22 +0200)]
Updated the TODO file.