Code

collectd.git
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 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 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 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.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 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 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 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/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 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

15 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"

15 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.

15 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.

15 years agoMerge branch 'collectd-4.4' into 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

15 years agolibiptc/Makefile.am: Added xtables.h, libxtc.h to libiptc_la_SOURCES.
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.

15 years agosrc/Makefile: Build ipvs and uuid plugins using $AM_CFLAGS.
Sebastian Harl [Sat, 1 Nov 2008 11:19:29 +0000 (12:19 +0100)]
src/Makefile: Build ipvs and uuid plugins using $AM_CFLAGS.

15 years agoconfigure, mysql plugin: Check for mysql.h as well.
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.

15 years agocontrib/collection3: Add the `format' parameter to the graph.cgi.
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.

15 years agosrc/utils_complain.c: Include "collectd.h" as first header file.
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.

15 years agoapcups plugin: Include "collectd.h" *before" <stdlib.h>.
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.

15 years agofilecount plugin: Fixed an off-by-one error in the configuration code.
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.

15 years agoperl plugin: Fix an uninitialized variable warning.
Ulrich Habel [Wed, 29 Oct 2008 06:01:12 +0000 (07:01 +0100)]
perl plugin: Fix an uninitialized variable warning.

Resolves: #33

15 years agosrc/utils_dns.c: Cast a `char' to `int' when using `tolower'.
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

15 years agolibiptc/libip6tc.c: Fix a glibc 2.8 compatibility problem.
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>
15 years agosrc/configfile.c: Fix a closing-brace comment.
Florian Forster [Mon, 20 Oct 2008 06:42:11 +0000 (08:42 +0200)]
src/configfile.c: Fix a closing-brace comment.

15 years agoChangeLog: Fix a typo.
Florian Forster [Thu, 16 Oct 2008 21:17:15 +0000 (23:17 +0200)]
ChangeLog: Fix a typo.

15 years agoChangeLog: Fix a typo.
Florian Forster [Thu, 16 Oct 2008 21:16:38 +0000 (23:16 +0200)]
ChangeLog: Fix a typo.

15 years agoBumped version to 4.5.1; Updated ChangeLog. collectd-4.5.1
Florian Forster [Thu, 16 Oct 2008 20:42:44 +0000 (22:42 +0200)]
Bumped version to 4.5.1; Updated ChangeLog.

15 years agoMerge branch 'collectd-4.4' into 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

15 years agoChangeLog: Added the changed poisoning behavior. collectd-4.4.4
Florian Forster [Thu, 16 Oct 2008 20:07:59 +0000 (22:07 +0200)]
ChangeLog: Added the changed poisoning behavior.

15 years agosrc/collectd.h: Poison various insecure string functions only when debugging is enabled.
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.

15 years agoBumped version to 4.4.4; Updated ChangeLog.
Florian Forster [Thu, 16 Oct 2008 19:41:47 +0000 (21:41 +0200)]
Bumped version to 4.4.4; Updated ChangeLog.

15 years agopostgresql plugin: Added another missing call to PQclear().
Sebastian Harl [Tue, 14 Oct 2008 10:57:21 +0000 (12:57 +0200)]
postgresql plugin: Added another missing call to PQclear().

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agopostgresql plugin: Do not open new connections during reinitialization.
Sebastian Harl [Tue, 14 Oct 2008 11:41:18 +0000 (13:41 +0200)]
postgresql plugin: Do not open new connections during reinitialization.

When reinitializing the plugin a new connection to all databases has been
opened. Now, we check if the connection already exists. In that case no new
connection will be opened but the existing connection will be pinged instead.

Thanks to Admin <collectd-info@internode.com.au> for finding and reporting
this.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agopostgresql plugin: Add a couple of PQclear() calls.
Florian Forster [Thu, 16 Oct 2008 08:05:31 +0000 (10:05 +0200)]
postgresql plugin: Add a couple of PQclear() calls.

The postgresql plugin is missing a couple of PQclear() calls

Thanks to Admin <collectd-info@internode.com.au> for pointing this out.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agocontrib/exec-munin.px: Fix the folding markers..
Florian Forster [Thu, 16 Oct 2008 07:51:33 +0000 (09:51 +0200)]
contrib/exec-munin.px: Fix the folding markers..

15 years agosrc/Makefile.am: Use $mkinstalldirs instead of $(INSTALL) -D.
Sebastian Harl [Fri, 10 Oct 2008 10:28:04 +0000 (12:28 +0200)]
src/Makefile.am: Use $mkinstalldirs instead of $(INSTALL) -D.

Some systems (e.g. Solaris 8) do not support the -D option.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agosrc/utils_tail.c: Call `clearerr' before `fgets'.
Florian Forster [Fri, 10 Oct 2008 10:40:38 +0000 (12:40 +0200)]
src/utils_tail.c: Call `clearerr' before `fgets'.

Hopefully this will resolve problems under the dietlibc.

15 years agosrc/Makefile.am: Fix a copy'n'paste typo.
Florian Forster [Fri, 10 Oct 2008 07:29:10 +0000 (09:29 +0200)]
src/Makefile.am: Fix a copy'n'paste typo.

15 years agocollectd.conf: Added a sample <Plugin> section in the perl config.
Sebastian Harl [Fri, 10 Oct 2008 07:08:07 +0000 (09:08 +0200)]
collectd.conf: Added a sample <Plugin> section in the perl config.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agotypes.db: Reintroduced the "spam_check" type.
Sebastian Harl [Wed, 8 Oct 2008 13:46:39 +0000 (15:46 +0200)]
types.db: Reintroduced the "spam_check" type.

This is used by the "email" plugin. Apparently, it got lost when converting
the plugin to the v4 interface: Instead of "spam_check", "email_check" had
been added to types.db. I did not remove "email_check" though as this would
introduce a regression - though very unlikely, somebody out there might be
using that type.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agocollection.cgi: Added support for the "connection" type.
Sebastian Harl [Wed, 8 Oct 2008 10:23:08 +0000 (12:23 +0200)]
collection.cgi: Added support for the "connection" type.

This is used e.g. by the "ipvs" plugin.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoMerge branch 'collectd-4.4' into collectd-4.5
Florian Forster [Fri, 10 Oct 2008 07:01:54 +0000 (09:01 +0200)]
Merge branch 'collectd-4.4' into collectd-4.5

15 years agosrc/utils_cache.c: Fix a serious memory leak.
Florian Forster [Fri, 10 Oct 2008 06:17:22 +0000 (08:17 +0200)]
src/utils_cache.c: Fix a serious memory leak.

Whenever a data set went missing, the its name (the `key'; up to (5*64)+4
bytes) was not free'd.

Thanks to Niraj Tolia for reporting this :)

15 years agosrc/configfile.c: Fix a minor memory leak.
Florian Forster [Thu, 9 Oct 2008 06:43:48 +0000 (08:43 +0200)]
src/configfile.c: Fix a minor memory leak.

Thanks to Niraj Tolia for reporting this :)

15 years agonetwork plugin: Fix a minor memory leak.
Florian Forster [Thu, 9 Oct 2008 06:43:20 +0000 (08:43 +0200)]
network plugin: Fix a minor memory leak.

Thanks to Niraj Tolia for reporting this :)

15 years agocollectd-nagios(1): Make the documentation easier to read, more correct and fix errors.
Florian Forster [Mon, 6 Oct 2008 21:53:37 +0000 (23:53 +0200)]
collectd-nagios(1): Make the documentation easier to read, more correct and fix errors.

15 years agoconfigure.in: Correct the `--enable-<plugin>' code.
Florian Forster [Mon, 6 Oct 2008 13:35:42 +0000 (15:35 +0200)]
configure.in: Correct the `--enable-<plugin>' code.

The new behavior is documented in the `README' file, too.

15 years agoconfigure.in: Let configure bail out on missing dependencies
Bruno Prémont [Sun, 5 Oct 2008 12:09:08 +0000 (14:09 +0200)]
configure.in: Let configure bail out on missing dependencies

The patch below adds check in AC_PLUGIN() that verifies if the
dependencies are met for any enabled plugin.

In case some dependency is missing (default is disabled and enabled
is selected) configure will fail after dumping summary so all
dependency issues are visible in a single configure pass.

A later addition would be to list requirements (dependencies, OS/Kernel
restrictions) for all plugins in an easily accessible location (e.g.
INSTALL file)

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agosrc/collectd-nagios.c: Improve handling of lines returned from `GETVAL'.
Florian Forster [Mon, 6 Oct 2008 09:46:59 +0000 (11:46 +0200)]
src/collectd-nagios.c: Improve handling of lines returned from `GETVAL'.

Then selecting only certain data sources with the `-d' option, the program
would try to read more lines from the server than the server reports, resulting
in the communication never finishing.

This patch resolves that problem and introduces a couple other error handling
blocks.

Thanks to Fabian Linzberger for pointing this out.

15 years agonetlink plugin: Fix an incorrect format string.
Florian Forster [Sun, 5 Oct 2008 10:12:52 +0000 (12:12 +0200)]
netlink plugin: Fix an incorrect format string.

15 years agoMerge branch 'collectd-4.4' into collectd-4.5
Florian Forster [Fri, 3 Oct 2008 21:14:44 +0000 (23:14 +0200)]
Merge branch 'collectd-4.4' into collectd-4.5

Conflicts:

src/utils_ignorelist.c

15 years agosrc/utils_ignorelist.c: Fix an off-by-one errror when adding regular expressions.
Florian Forster [Fri, 3 Oct 2008 21:11:47 +0000 (23:11 +0200)]
src/utils_ignorelist.c: Fix an off-by-one errror when adding regular expressions.

Resolves: #20

15 years agocollectdmon: Do not block SIGCHLD.
Sebastian Harl [Thu, 2 Oct 2008 13:25:10 +0000 (15:25 +0200)]
collectdmon: Do not block SIGCHLD.

There is no reason to do so as we do not need to synchronize any waitpid()
calls. In fact, doing so was wrong because waitpid() should then return with
an error according to POSIX. This was still working so far since waitpid()
would not return until all children terminated and this is all we really care
about.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agocollectd.conf(5): Briefly document "OKAY"-notifications.
Sebastian Harl [Thu, 2 Oct 2008 13:05:51 +0000 (15:05 +0200)]
collectd.conf(5): Briefly document "OKAY"-notifications.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoipvs plugin: Use sizeof() instead of a constant.
Sebastian Harl [Thu, 2 Oct 2008 12:54:06 +0000 (14:54 +0200)]
ipvs plugin: Use sizeof() instead of a constant.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoiptables plugin, utils_ignorelist: Fixed an off-by-one error each.
Sebastian Harl [Thu, 2 Oct 2008 12:53:06 +0000 (14:53 +0200)]
iptables plugin, utils_ignorelist: Fixed an off-by-one error each.

Those were introduced when unifying the string handling in commit 5f9ec13b in
cases where the exact length of the string to be copied is passed to sstrncpy
instead of the size of the destination buffer.

In case of the iptables plugin this prevented the table or chain name to match
correctly as the user configuration was truncated. In case of the ignorelist a
given regex was truncated.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoMerge branch 'collectd-4.4' into collectd-4.5
Florian Forster [Fri, 3 Oct 2008 11:35:45 +0000 (13:35 +0200)]
Merge branch 'collectd-4.4' into collectd-4.5

15 years agobuild.sh: Check for more (all?) programs needed.
Florian Forster [Fri, 3 Oct 2008 11:30:58 +0000 (13:30 +0200)]
build.sh: Check for more (all?) programs needed.

15 years agocollection.cgi: Added support for the memcached-specific types.
Sebastian Harl [Sat, 20 Sep 2008 14:34:39 +0000 (16:34 +0200)]
collection.cgi: Added support for the memcached-specific types.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoperl plugin: Disable plugin after fatal configuration errors.
Sebastian Harl [Tue, 16 Sep 2008 13:40:14 +0000 (15:40 +0200)]
perl plugin: Disable plugin after fatal configuration errors.

Currently, the only such case is the failure to bootstrap the Perl interpreter
and Collectd module. This fixes a segfault that happened when trying to
configure Perl plugins in that case.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agosrc/plugin.c: Increase the plugin_log() message buffer to 1024 bytes.
Sebastian Harl [Tue, 16 Sep 2008 13:38:48 +0000 (15:38 +0200)]
src/plugin.c: Increase the plugin_log() message buffer to 1024 bytes.

512 bytes is not enough for some perl error messages.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoperl plugin: Log the perl error messages if bootstrapping Collectd failed.
Sebastian Harl [Tue, 16 Sep 2008 13:36:18 +0000 (15:36 +0200)]
perl plugin: Log the perl error messages if bootstrapping Collectd failed.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agocontrib/collection3: Added graphs for `apache_{bytes,requests}'.
Florian Forster [Mon, 22 Sep 2008 12:00:31 +0000 (14:00 +0200)]
contrib/collection3: Added graphs for `apache_{bytes,requests}'.

15 years agocontrib/collection3: Use `instance' rather than `plugin_instance'
Florian Forster [Mon, 22 Sep 2008 12:00:02 +0000 (14:00 +0200)]
contrib/collection3: Use `instance' rather than `plugin_instance'

for all the `disk_*' graphs.

15 years agosnmp plugin: Improve parsing of strings to values.
Florian Forster [Mon, 22 Sep 2008 11:57:29 +0000 (13:57 +0200)]
snmp plugin: Improve parsing of strings to values.

The ``strings'' returned by the Net-SNMP library may not be null
terminated. What the fuck were those guys thinking? At least there's a
`val_len' member in `struct variable_list' we can use to determine the
amount of bytes we need to copy.

15 years agocollection3/etc/collection.conf: Added some mysql stuff.
Florian Forster [Wed, 17 Sep 2008 11:42:59 +0000 (13:42 +0200)]
collection3/etc/collection.conf: Added some mysql stuff.

15 years agoAUTHORS: Fixed typo.
Florian Forster [Sat, 13 Sep 2008 15:52:54 +0000 (17:52 +0200)]
AUTHORS: Fixed typo.

15 years agocollectd.conf(5): Fixed typo.
Florian Forster [Sat, 13 Sep 2008 15:32:03 +0000 (17:32 +0200)]
collectd.conf(5): Fixed typo.

15 years agocollectd.conf(5): Changed the default socket paths of the powerdns plugin.
Florian Forster [Fri, 12 Sep 2008 14:27:35 +0000 (16:27 +0200)]
collectd.conf(5): Changed the default socket paths of the powerdns plugin.

15 years agopowerdns plugin: Use `LOCALSTATEDIR' instead of "/var".
Boian Berberov [Fri, 12 Sep 2008 14:20:10 +0000 (16:20 +0200)]
powerdns plugin: Use `LOCALSTATEDIR' instead of "/var".

I was working on updating Gentoo's ebuild and I noticed that localstatedir was
not used in certain places.  Please review these patches and consider them.

Boian Berberov

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoconfigure: Allow `--with-libperl=/path/to/binary', too.
Florian Forster [Fri, 5 Sep 2008 08:50:16 +0000 (10:50 +0200)]
configure: Allow `--with-libperl=/path/to/binary', too.

That way one can specify an alternative path, without setting the global
`CFLAGS' and `LDFLAGS' variables.

15 years agoconfigure: Get the check for libperl in sync with the way it's used.
Sebastian Harl [Thu, 4 Sep 2008 13:55:30 +0000 (15:55 +0200)]
configure: Get the check for libperl in sync with the way it's used.

 * Define PERL_NO_GET_CONTEXT.
 * Use the API functions without the Perl_ prefix.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoMerge branch 'collectd-4.4' collectd-4.5.0
Florian Forster [Thu, 4 Sep 2008 13:01:23 +0000 (15:01 +0200)]
Merge branch 'collectd-4.4'

15 years agoMerge branch 'collectd-4.3' into collectd-4.4
Florian Forster [Thu, 4 Sep 2008 13:01:06 +0000 (15:01 +0200)]
Merge branch 'collectd-4.3' into collectd-4.4

15 years agoprocesses plugin: Fix a format string.
Florian Forster [Thu, 4 Sep 2008 13:00:40 +0000 (15:00 +0200)]
processes plugin: Fix a format string.

15 years agoapple_sensors plugin: Add a missing semicolon.
Florian Forster [Thu, 4 Sep 2008 12:58:57 +0000 (14:58 +0200)]
apple_sensors plugin: Add a missing semicolon.

15 years agoBumped version to 4.5.0.
Florian Forster [Thu, 4 Sep 2008 08:52:34 +0000 (10:52 +0200)]
Bumped version to 4.5.0.

15 years agoMerge branch 'collectd-4.4'
Florian Forster [Thu, 4 Sep 2008 08:49:13 +0000 (10:49 +0200)]
Merge branch 'collectd-4.4'

Conflicts:

ChangeLog

15 years agoChangeLog: Added an entry about the ability to configure Perl plugins.
Sebastian Harl [Tue, 2 Sep 2008 11:03:08 +0000 (13:03 +0200)]
ChangeLog: Added an entry about the ability to configure Perl plugins.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoChangeLog: Be slightly more specific about the features of the PostgreSQL plugin.
Sebastian Harl [Tue, 2 Sep 2008 11:02:30 +0000 (13:02 +0200)]
ChangeLog: Be slightly more specific about the features of the PostgreSQL plugin.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
15 years agoBumped version to 4.4.3; Updated ChangeLog. collectd-4.4.3
Florian Forster [Mon, 1 Sep 2008 11:37:27 +0000 (13:37 +0200)]
Bumped version to 4.4.3; Updated ChangeLog.

15 years agoMerge branch 'collectd-4.3' into collectd-4.4
Florian Forster [Mon, 1 Sep 2008 06:04:10 +0000 (08:04 +0200)]
Merge branch 'collectd-4.3' into collectd-4.4

Conflicts:

ChangeLog
version-gen.sh

15 years agoChangeLog: Entry for 4.3.4: Bring plugins in alphabetical order.
Florian Forster [Mon, 1 Sep 2008 06:01:33 +0000 (08:01 +0200)]
ChangeLog: Entry for 4.3.4: Bring plugins in alphabetical order.

15 years agoBumped version to 4.3.3; Updated ChangeLog. collectd-4.3.4
Florian Forster [Sun, 31 Aug 2008 13:11:15 +0000 (15:11 +0200)]
Bumped version to 4.3.3; Updated ChangeLog.