Code

collectd.git
12 years agooracle plugin: Add database name and query name (if applicable) to error messages.
Florian Forster [Tue, 19 Jun 2012 11:14:32 +0000 (13:14 +0200)]
oracle plugin: Add database name and query name (if applicable) to error messages.

12 years agooracle plugin: Report the "connect id" when OCILogon() fails.
Florian Forster [Mon, 18 Jun 2012 08:49:38 +0000 (10:49 +0200)]
oracle plugin: Report the "connect id" when OCILogon() fails.

12 years agocollection3: Use {instance} in Df's grpah title.
Florian Forster [Sun, 17 Jun 2012 18:46:43 +0000 (20:46 +0200)]
collection3: Use {instance} in Df's grpah title.

{type_instance} didn't work when used with other plugins than "df", e.g.
the example configuration of the Oracle plugin uses this.

12 years agosrc/utils_dns.c: Remove duplicate line.
Florian Forster [Fri, 1 Jun 2012 05:45:30 +0000 (07:45 +0200)]
src/utils_dns.c: Remove duplicate line.

12 years agosrc/utils_dns.c: Rename the "s_addr" and "d_addr" variables.
Florian Forster [Thu, 31 May 2012 13:09:43 +0000 (15:09 +0200)]
src/utils_dns.c: Rename the "s_addr" and "d_addr" variables.

On Solaris, there is a macro called "s_addr" resulting in syntax errors
when this is used as a variable name. The variables have been renamed to
circumvent this problem. Thanks to Maciej Bliziński for reporting this
problem and helping to debug it!

12 years agocollection3: Filter out identifiers with control characters.
Florian Forster [Sun, 27 May 2012 09:13:04 +0000 (11:13 +0200)]
collection3: Filter out identifiers with control characters.

Otherwise XML errors will prevent the page from rendering.

12 years agosrc/utils_avltree.c: Add sanity check to c_avl_destroy().
Florian Forster [Sun, 27 May 2012 09:10:56 +0000 (11:10 +0200)]
src/utils_avltree.c: Add sanity check to c_avl_destroy().

12 years agonetapp plugin: Close connection on communication errors.
Florian Forster [Sat, 12 May 2012 14:17:17 +0000 (16:17 +0200)]
netapp plugin: Close connection on communication errors.

12 years agoCreate directories with permission 0777.
Florian Forster [Fri, 6 Apr 2012 14:18:18 +0000 (16:18 +0200)]
Create directories with permission 0777.

Let umask work its magic. Thanks to "Poil" for reporting this problem.
Fixes GitHub issue #63.

12 years agoChangeLog: Correct date. collectd-4.10.7
Florian Forster [Sun, 1 Apr 2012 10:06:42 +0000 (12:06 +0200)]
ChangeLog: Correct date.

12 years agoBump version to 4.10.7; Update ChangeLog.
Florian Forster [Sun, 1 Apr 2012 09:51:38 +0000 (11:51 +0200)]
Bump version to 4.10.7; Update ChangeLog.

12 years agoRevert "Proposal fix for large "MaxPacketSize" use."
Florian Forster [Sat, 31 Mar 2012 15:27:14 +0000 (17:27 +0200)]
Revert "Proposal fix for large "MaxPacketSize" use."

This reverts commit 12213f8dfeee3feb3846aa658def0bb79c1211d0.

12 years agonetwork plugin: Do not forward received notifications.
Florian Forster [Fri, 23 Mar 2012 21:21:43 +0000 (22:21 +0100)]
network plugin: Do not forward received notifications.

The network plugin would send out all notifications it got through its
callback, even the ones it received itself and even when forwarding was
disabled.

With this patch the network plugin will only transmit notifications created
locally -- forwarding of notifications is not implemented due to missing
loop-detection. For loop-detection we would have to keep track of the last
timestamp of each notifications, and since each host/plugin/type/-instance
field may be empty, this is not as straight forward as with value lists. If
someone needs this, they will need to invest some work I'm afraid.

12 years agoProposal fix for large "MaxPacketSize" use.
Cyril Feraudet [Mon, 19 Mar 2012 10:08:06 +0000 (11:08 +0100)]
Proposal fix for large "MaxPacketSize" use.

When we use a "MaxPacketSize" over two thousand of octets (to pass huge
message in notification for example), buffer may not be flushed for a
while.
By flushing buffer when there is about 1400 octets, we're sure there is
no data too longer in.

12 years agosrc/common.h: Add comment about return value of read_file_contents().
Florian Forster [Mon, 19 Mar 2012 09:47:22 +0000 (10:47 +0100)]
src/common.h: Add comment about return value of read_file_contents().

12 years agotcpconns plugin: Include <bsd/nlist.h> rather than <nlist.h>.
Florian Forster [Sun, 18 Mar 2012 08:14:54 +0000 (09:14 +0100)]
tcpconns plugin: Include <bsd/nlist.h> rather than <nlist.h>.

It appears that <nlist.h> is being deprecated / moved.
This hopefully fixes Debian bug #664429.

12 years agosrc/common.c: parse_value: Strip trailing whitespace before parsing.
Florian Forster [Fri, 16 Mar 2012 17:26:08 +0000 (18:26 +0100)]
src/common.c: parse_value: Strip trailing whitespace before parsing.

This hopefully avoids the annoying "trailing garbage" message when the buffer
only contains a newline or space at the end.

12 years agocollectd.conf(5): Document the "Hits" and "Hysteresis" threshold options.
Florian Forster [Fri, 16 Mar 2012 16:44:50 +0000 (17:44 +0100)]
collectd.conf(5): Document the "Hits" and "Hysteresis" threshold options.

Fixes GitHub issue #53.

12 years agoMakefile adds dependency on $(LIBLTDL), which is valued "-lltdl"
Clemens Lang [Sat, 10 Mar 2012 01:30:26 +0000 (02:30 +0100)]
Makefile adds dependency on $(LIBLTDL), which is valued "-lltdl"

When building on OS X, the collectd build failed, because the collectd target
has a dependency on "-lltdl", which is the value the variable $(LIBLTDL) has.
Obviously, this should be the file name instead. I am however not sure how to
specify the correct filename in this case.

Fixes GitHub issue #54.

Signed-off-by: Florian Forster <octo@collectd.org>
12 years agoMerge pull request #44 from octo/ff/perl
Florian Forster [Sun, 11 Mar 2012 12:11:33 +0000 (05:11 -0700)]
Merge pull request #44 from octo/ff/perl

Fix race condition in the Perl plugin.

12 years agocollectd.conf(5): Improve the network plugin's documentation.
Florian Forster [Sun, 11 Mar 2012 12:04:13 +0000 (13:04 +0100)]
collectd.conf(5): Improve the network plugin's documentation.

The example given was confusing since it didn't make it clear enough, that only
one "Server" stanza is required.

Resolves GitHub issue #19.

12 years agonetwork plugin: Fix compiler warnings.
Florian Forster [Sun, 11 Mar 2012 11:57:10 +0000 (12:57 +0100)]
network plugin: Fix compiler warnings.

Resolves GitHub issue #49.

12 years agosnmp plugin: Keep track of signedness of ASN values.
Florian Forster [Sun, 11 Mar 2012 11:13:37 +0000 (12:13 +0100)]
snmp plugin: Keep track of signedness of ASN values.

Prior to this, the signed variant was used when casting to gauge_t. This caused
problems with values larger than 2^31-1, since they were casted to negative
values.

Hopefully fixes GitHub issue #50.

12 years agoFixed memory leak in collectdclient library.
Jason Schmidlapp [Thu, 1 Mar 2012 01:27:50 +0000 (20:27 -0500)]
Fixed memory leak in collectdclient library.

Signed-off-by: Florian Forster <octo@collectd.org>
12 years agoperl plugin: Fix a race condition.
Florian Forster [Sun, 4 Mar 2012 10:10:20 +0000 (11:10 +0100)]
perl plugin: Fix a race condition.

This hopefully fixes GitHub issue #9.

12 years agoMerge pull request #40 from octo/db/processes
Florian Forster [Thu, 1 Mar 2012 09:57:02 +0000 (01:57 -0800)]
Merge pull request #40 from octo/db/processes

Add support for processes with spaces in their names.

12 years agoprocesses plugin: Support processes with spaces in their names.
Florian Forster [Thu, 1 Mar 2012 08:56:56 +0000 (09:56 +0100)]
processes plugin: Support processes with spaces in their names.

… without replacing the space in the process name. This is done by using
an equivalent of strchr() and strrchr() to determine the boundaries of
the second "field".

Change-Id: Id4c1a84c0544554fae05623457d2a7a3e0630db2

12 years agoprocesses plugin: Support processes with spaces in their name.
Darrell Bishop [Sat, 5 Nov 2011 08:29:00 +0000 (09:29 +0100)]
processes plugin: Support processes with spaces in their name.

Fixes GitHub issue #11.

Change-Id: Ifa9db0e020f19da43bbf49bba0626e70c16dc30f

12 years agoconntrack plugin: Strip newlie before calling parse_value().
Florian Forster [Wed, 29 Feb 2012 19:47:08 +0000 (20:47 +0100)]
conntrack plugin: Strip newlie before calling parse_value().

Change-Id: Ifa4db20a6b937912db77a214d2c0ef3eeebfa164

12 years agoUse parse_value in the conntrack plugin and submit the result even if it's zero
Louis Opter [Tue, 28 Feb 2012 17:23:06 +0000 (18:23 +0100)]
Use parse_value in the conntrack plugin and submit the result even if it's zero

Dear collectd,

Please find attached a patch for the conntrack plugin.

The patch is about two things:

1. submit the value even if it is zero (which is a legitimate value according
   to types.db);
2. use parse_value and a value_t instead of directly using a double and atof(3).

The first point was important because it meant that the metric was not created
when the initial value was zero. (It could also lead to holes in your graphs).

The parse_value return value is correctly checked, note that the parsed file
ends with a \n which mean that parse_value always complain when running in
debug/info maybe we should replace it with a \0 before handing the buffer to
parse_value() ?

Thanks

--
Louis Opter

Signed-off-by: Florian Forster <octo@collectd.org>
12 years agoFix buffer size for memcached stats answer
Timon [Tue, 28 Feb 2012 11:10:35 +0000 (17:10 +0600)]
Fix buffer size for memcached stats answer

Typical stats answer has ~1900 bytes length.
$ memcached-tool localhost:11211 stats | wc -c
1863
But buffer for this answer was only 1024 bytes length.

Signed-off-by: Florian Forster <octo@collectd.org>
12 years agoAlso check in ip4tc for iptc_init
Andrew Elwell [Sun, 26 Feb 2012 21:32:08 +0000 (22:32 +0100)]
Also check in ip4tc for iptc_init

./configure --enable-iptables was failing on fedora as iptc_init
wasn't found. This patches configure.in to also look in ip4tc

Signed-off-by: Florian Forster <octo@collectd.org>
12 years agocontrib/exec-nagios.px: Implement the "NRPEConfig" option.
Florian Forster [Mon, 19 Apr 2010 11:04:35 +0000 (13:04 +0200)]
contrib/exec-nagios.px: Implement the "NRPEConfig" option.

12 years agobind plugin: Fix use of the "QType" types.
Florian Forster [Sat, 25 Feb 2012 15:56:35 +0000 (16:56 +0100)]
bind plugin: Fix use of the "QType" types.

This should resolve GitHub issue #21.

Change-Id: I67e4b440a6fbc8a8608fa672fb3320b05f9c0a12

12 years agodf plugin: Fix a compiler issue with Mac OS X 10.7.
Florian Forster [Sat, 25 Feb 2012 10:42:19 +0000 (11:42 +0100)]
df plugin: Fix a compiler issue with Mac OS X 10.7.

Xcode Version 4.1 (11C74), GitHub issue #24

Change-Id: Ic6f49a95868c7f77bfb19f9c8afc87a97a1bf670

12 years agoUpdate ChangeLog. collectd-4.10.6
Florian Forster [Sun, 19 Feb 2012 09:58:46 +0000 (10:58 +0100)]
Update ChangeLog.

Change-Id: I41518e6e48c089e79919d1bc65b03744872bcec0

12 years agoexec plugin: Replace tabs with spaces to fix indentation.
Florian Forster [Fri, 17 Feb 2012 14:09:26 +0000 (15:09 +0100)]
exec plugin: Replace tabs with spaces to fix indentation.

Change-Id: I6e623f237c1d79007bd471732476a4e32dafde97

12 years agonetwork plugin: Fixed incorrect collectd warning when configuring network plugin.
Gerrie Roos [Tue, 20 Dec 2011 04:30:59 +0000 (06:30 +0200)]
network plugin: Fixed incorrect collectd warning when configuring network plugin.

Cosmetic only

Change-Id: I4c4c8fe19c23e9aa31b35e61eba31aa686429c10
Signed-off-by: Florian Forster <octo@collectd.org>
12 years agoexec plugin: incorrectly exited select loop on signal.
Gerrie Roos [Tue, 10 Jan 2012 07:00:42 +0000 (09:00 +0200)]
exec plugin: incorrectly exited select loop on signal.

Sometimes dead modules won't be started up correctly or running ones
would not generate stats anymore.  Problem manifests more often under
load and on multicore hw

Change-Id: Ifb70a74c0cd55fc421b65a1f4332147916eadb70
Signed-off-by: Florian Forster <octo@collectd.org>
12 years agoconfigure.in: Use the `--libs_r' option of mysql-config.
Cyril Feraudet [Tue, 14 Feb 2012 09:47:27 +0000 (10:47 +0100)]
configure.in: Use the `--libs_r' option of mysql-config.

Rather than the `--libs' option.

Change-Id: Idd2a3828f4d154f353c44a4b69aa094acbadcabf
Signed-off-by: Florian Forster <octo@collectd.org>
12 years agoBump version to 4.10.6; Update ChangeLog.
Florian Forster [Sun, 5 Feb 2012 13:02:07 +0000 (14:02 +0100)]
Bump version to 4.10.6; Update ChangeLog.

Change-Id: I95bfb6e742ba7ad9e2b9c89dc990cd4bf573dbfa

12 years agoBuild system: Remove superfluous C(PP)FLAG.
Florian Forster [Sun, 5 Feb 2012 12:49:45 +0000 (13:49 +0100)]
Build system: Remove superfluous C(PP)FLAG.

Change-Id: Ic2f665869f863b1e0dca9b5ccde2803715386a3c

12 years agoBuild system: Use pkg-config to configure libiptc.
Florian Forster [Sat, 4 Feb 2012 15:28:02 +0000 (16:28 +0100)]
Build system: Use pkg-config to configure libiptc.

This hopefully fixes Goobuntu Bug #375733.

Change-Id: I0a4215351ce836fb62418cbd40bee27fd695d9da

12 years agoversion-gen.sh: Switch to bash due to bashisms.
Jo-Philipp Wich [Thu, 2 Feb 2012 22:27:45 +0000 (23:27 +0100)]
version-gen.sh: Switch to bash due to bashisms.

Change-Id: I8480afad2d157382fb7e5ff35785e97066c8553c

12 years agoRevert "interface plugin: Fix for bogus interfaces under Solaris."
Florian Forster [Mon, 30 Jan 2012 15:29:13 +0000 (16:29 +0100)]
Revert "interface plugin: Fix for bogus interfaces under Solaris."

This results in problems on aggregated interfaces, amongst other things.
I guess Solaris users will need to use the "IgnoreSelected" option to
get rid of "bogus" interfaces.

This reverts commit e7a75874a24c1bf19931d5b4b423a0daa7f9be6b.

12 years agoMinor doc fixes for the Python plugin.
Florian Forster [Thu, 26 Jan 2012 21:54:34 +0000 (22:54 +0100)]
Minor doc fixes for the Python plugin.

Change-Id: I233d0ae4ec035c74811ef33aa119573066c9a3f6

12 years agoMerge pull request #2 from trenkel/collectd-4.10
Florian Forster [Thu, 26 Jan 2012 13:00:33 +0000 (05:00 -0800)]
Merge pull request #2 from trenkel/collectd-4.10

Even more fun than memory leaks: Memory corruption.

12 years agopython: Fixed crash bug in case the plugin had more than one configuration block.
Sven Trenkel [Thu, 26 Jan 2012 11:20:28 +0000 (11:20 +0000)]
python: Fixed crash bug in case the plugin had more than one configuration block.

12 years agooracle plugin: Fix use of the OCIErrorGet() function.
Florian Forster [Thu, 26 Jan 2012 10:36:03 +0000 (11:36 +0100)]
oracle plugin: Fix use of the OCIErrorGet() function.

Change-Id: I9899b98517fe0c239bffcf7a75681560029aa2ba

12 years agocommon: check_create_dir(): Support symlinks as well.
Jonathan Nieder [Mon, 9 Jan 2012 18:01:50 +0000 (19:01 +0100)]
common: check_create_dir(): Support symlinks as well.

Previously, the following situation would cause an endless look (as reported
by Michael Prokop in Debian bug #619123): the (CSV or RRD) datadir is a
symlink pointing to a non-existent target.

With this patch applied, check_create_dir() fails with "<file> exists but is
not a directory".

Signed-off-by: Sebastian Harl <sh@tokkee.org>
12 years agobuild system, ipvs plugin: Check for linux/ip_vs.h as well.
Sebastian Harl [Mon, 9 Jan 2012 10:16:19 +0000 (11:16 +0100)]
build system, ipvs plugin: Check for linux/ip_vs.h as well.

Also, try to find ip_vs.h without using KERNEL_CFLAGS at first. The Linux
kernel headers should not be used directly -- in current kernel versions this
generates warnings leading to build failures because of -Werror.

12 years agoUpdate ChangeLog. collectd-4.10.5
Florian Forster [Sat, 21 Jan 2012 17:24:45 +0000 (18:24 +0100)]
Update ChangeLog.

Change-Id: I7361ea08e1695b2928463150df36d385aa51299c

12 years agooracle plugin: Fix a memory leak.
Florian Forster [Sat, 21 Jan 2012 17:21:46 +0000 (18:21 +0100)]
oracle plugin: Fix a memory leak.

Parameters must be freed using OCIDescriptorFree. D'oh!

Thanks to Rena Vetterling for helping me hunt down this problem!

Change-Id: Ic374ae13085c8d2afbdf9a3c0ceef92b485e7723

12 years agooracle plugin: Improve the error printing function.
Florian Forster [Sat, 21 Jan 2012 17:01:24 +0000 (18:01 +0100)]
oracle plugin: Improve the error printing function.

Change-Id: Ie52c80bd4a686b403037c97383176adf3e701419

12 years agoBump version to 4.10.5; Update ChangeLog.
Florian Forster [Sat, 21 Jan 2012 12:04:28 +0000 (13:04 +0100)]
Bump version to 4.10.5; Update ChangeLog.

Change-Id: I900278064970e0c2d2bf471f4f80c7672aa8211f

12 years agodf: Set negative free space values to zero.
Toni Ylenius [Fri, 6 Jan 2012 16:13:56 +0000 (18:13 +0200)]
df: Set negative free space values to zero.

Some file systems (eg. UFS) may report negative free spave values.
Previously this caused underflow, but now it is prevented by setting
negative values to zero.

Change-Id: I821adb8a6d7a40dcbd6c65ab3541fbcd714f8aba

Conflicts:

src/df.c

12 years agonetwork plugin: Use the new plugin_dispatch_values_secure().
Florian Forster [Wed, 23 Nov 2011 13:40:58 +0000 (14:40 +0100)]
network plugin: Use the new plugin_dispatch_values_secure().

Change-Id: I2cc65a36366c6c714cd79c2905879bce313efe31

12 years agosrc/plugin.[ch]: Add plugin_dispatch_values_secure().
Florian Forster [Wed, 23 Nov 2011 13:28:27 +0000 (14:28 +0100)]
src/plugin.[ch]: Add plugin_dispatch_values_secure().

Change-Id: I1f7403b2e82edd099f0168d0a0735cd18f8ce05a

12 years agosrc/meta_data.[ch]: Add meta_data_clone().
Florian Forster [Wed, 23 Nov 2011 13:28:01 +0000 (14:28 +0100)]
src/meta_data.[ch]: Add meta_data_clone().

Change-Id: I8449e27c908cbe75ea4ea3b8dd4df556f9aec9e7

12 years agoMerge "Fix case when availrmem < freemem" into collectd-4.10
Florian Forster [Sat, 21 Jan 2012 10:14:53 +0000 (11:14 +0100)]
Merge "Fix case when availrmem < freemem" into collectd-4.10

12 years agoFix case when availrmem < freemem
Fabien Wernli [Fri, 9 Dec 2011 15:30:30 +0000 (16:30 +0100)]
Fix case when availrmem < freemem

Change-Id: I03b188afeb2357e7b8c426bd0c6daff06fda2c4f

Conflicts:

src/memory.c

12 years agopython: Fixed memory leaks during dispatch.
Sven Trenkel [Tue, 17 Jan 2012 01:56:03 +0000 (01:56 +0000)]
python: Fixed memory leaks during dispatch.

12 years agosrc/common.c: parse_value: Be more verbose about parsing problems.
Florian Forster [Mon, 19 Dec 2011 14:17:39 +0000 (15:17 +0100)]
src/common.c: parse_value: Be more verbose about parsing problems.

Change-Id: I784ec4ee9a1e89a82fdc9da54ed1fafd3d9c3e57

12 years agoThis improves solaris memory plugin granularity.
Fabien Wernli [Tue, 25 Oct 2011 13:15:16 +0000 (15:15 +0200)]
This improves solaris memory plugin granularity.

Locked memory is now only tracking non-kernel locked memory.
We add kernel and unusable memory.
Source: http://www.brendangregg.com/K9Toolkit/swapinfo

Change-Id: I4f4d281e991068dc845d8c3615d285fc2a3296c8

12 years agouse 64bit counters if available
Fabien Wernli [Thu, 27 Oct 2011 15:14:06 +0000 (17:14 +0200)]
use 64bit counters if available

12 years agoMerge "Fix file:// not working as return code is 0 and not 200, as fixed beforehand...
Florian Forster [Fri, 25 Nov 2011 09:48:22 +0000 (10:48 +0100)]
Merge "Fix file:// not working as return code is 0 and not 200, as fixed beforehand in curl_json. Remove mention of http in documention as file also works now (and ftp most likely too)" into collectd-4.10

12 years agoFix file:// not working as return code is 0 and not 200, as fixed
Fabien Wernli [Fri, 4 Nov 2011 10:25:59 +0000 (11:25 +0100)]
Fix file:// not working as return code is 0 and not 200, as fixed
beforehand in curl_json.
Remove mention of http in documention as file also works now (and ftp most likely too)

Change-Id: Iccb35e6b8c831f555dc5bbd17fa8d04672e13eb3

12 years agoMerge "interface plugin: Fix for bogus interfaces under Solaris." into collectd-4.10
Florian Forster [Thu, 24 Nov 2011 14:43:21 +0000 (15:43 +0100)]
Merge "interface plugin: Fix for bogus interfaces under Solaris." into collectd-4.10

13 years agoChangeLog: Add thanks to Peter Green. collectd-4.10.4
Florian Forster [Fri, 14 Oct 2011 20:41:21 +0000 (22:41 +0200)]
ChangeLog: Add thanks to Peter Green.

Change-Id: Ie392f7dfc7d637c92e286b0bf6d5d32877f70f76

13 years agoBump version to 4.10.4; Update ChangeLog.
Florian Forster [Fri, 7 Oct 2011 15:21:57 +0000 (17:21 +0200)]
Bump version to 4.10.4; Update ChangeLog.

Change-Id: Ie23cf45f929c52e94e968c7129d24aca7a287dd5

13 years agointerface plugin: Fix for bogus interfaces under Solaris.
Eddy Geez [Sat, 3 Sep 2011 13:10:21 +0000 (09:10 -0400)]
interface plugin: Fix for bogus interfaces under Solaris.

Under newer versions of Solaris, the method for finding network interfaces
results in 'collectd' gathering statistics on an interface called 'mac', along
with 16 interfaces named 'wrsmd0' through 'wrsmd15' (which are for WCI Remote
Shared Memory). The 'mac' interface is especially problematic because it
occurs multiple times, which results in warnings from rrdtool about insertions
with the same timestamp.

Change-Id: I1ae070ecbc820da25c0f0ad457aba80213339fd2
Signed-off-by: Florian Forster <octo@collectd.org>
13 years agocollectd.conf.in: Use the "Globals" option for perl and python.
Florian Forster [Fri, 2 Sep 2011 22:41:05 +0000 (18:41 -0400)]
collectd.conf.in: Use the "Globals" option for perl and python.

Change-Id: Icaccaab601b91bc829c4da94c5344e0d766735bd

13 years agoAdd RPM .spec file and startup script for AIX
Aurelien Reynaud [Thu, 14 Oct 2010 19:18:47 +0000 (21:18 +0200)]
Add RPM .spec file and startup script for AIX

Change-Id: Ic6187891e2014d84f8b2926df1c8b2012f26923f
Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@collectd.org>
13 years agoMerge "curl_json plugin: Be more clever building the type instance." into collectd...
Florian Forster [Fri, 2 Sep 2011 22:48:47 +0000 (00:48 +0200)]
Merge "curl_json plugin: Be more clever building the type instance." into collectd-4.10

13 years agoirq plugin: Implement collection of non-numeric interrupts.
Bostjan Skufca [Fri, 2 Sep 2011 00:35:38 +0000 (20:35 -0400)]
irq plugin: Implement collection of non-numeric interrupts.

Hi all!

I've created a patch that enables collectd to collect all irqs present in
/proc/interrupts, with numeric and string names (NMI, LOC, RES, etc).

Two notices:
a) Unfortunately I was unable to build collectd from git repo (build.sh
   failures), therefore I created this patch for latest stable release: 4.10.1
b) I am fairly unexperienced in C programming, so please inform me gently of my
   mistakes:) But I am already using a patched version and it works fine.

Any feedback on code quality or recommendations are welcome.

Change-Id: Ia17bd953921051dfe53e838b76672adbef9e73c3
Signed-off-by: Florian Forster <octo@collectd.org>
13 years agoprocesses plugin: Fixed handling of ProcessMatch regexes containing spaces.
Sebastian Harl [Wed, 24 Aug 2011 16:26:12 +0000 (18:26 +0200)]
processes plugin: Fixed handling of ProcessMatch regexes containing spaces.

Previously, something like 'ProcessMatch name "My Regex"' would have been
interpreted as three values. This was caused by using the old, non-complex
config interface which joins all config values using a space and passing the
resulting string to the plugin. The processes plugin used to use strsplit() to
re-gain a list of all values, obviously ignoring any quoting that might exist.

This has been fixed by using the complex config interface, which passes all
values as an array of strings and thus honoring the quoting handled by
liboconfig.

13 years agocurl_json plugin: Be more clever building the type instance.
Florian Forster [Sat, 27 Aug 2011 19:29:42 +0000 (15:29 -0400)]
curl_json plugin: Be more clever building the type instance.

When the key of the parent object is empty, don't use it. The previous code led
to type instances starting with a dash, e.g. "-foo".

Also, be more verbose when unable to resolve types.

Change-Id: Ib5f55efe1acc1e819ac3189b6780a4e998bf9c9f

13 years agoMerge "fix xff excessive rounding" into collectd-4.10
Florian Forster [Fri, 26 Aug 2011 12:37:25 +0000 (14:37 +0200)]
Merge "fix xff excessive rounding" into collectd-4.10

13 years ago.gitignore: Added collectdctl.
Sebastian Harl [Thu, 12 Aug 2010 20:12:47 +0000 (22:12 +0200)]
.gitignore: Added collectdctl.

13 years agosrc/plugin.c: add info to 'Invalid value list' error message
Xavier Mehrenberger [Sat, 11 Jun 2011 21:01:57 +0000 (23:01 +0200)]
src/plugin.c: add info to 'Invalid value list' error message

Signed-off-by: Florian Forster <octo@collectd.org>
13 years agocollectd_unixsock.py: Fix infinite wait.
Peter Warasin [Mon, 27 Jun 2011 18:10:51 +0000 (20:10 +0200)]
collectd_unixsock.py: Fix infinite wait.

raise a KeyError if getval() or getthreshold() unixsock returns replies an
error because of request of an unknown identifier

Signed-off-by: Florian Forster <octo@collectd.org>
13 years agoconfigure: Link with ip4tc and ip6tc, too.
Florian Forster [Sun, 21 Aug 2011 14:40:23 +0000 (16:40 +0200)]
configure: Link with ip4tc and ip6tc, too.

This solves this problem:

octo@leeloo:/tmp $ gcc -o conftest -g -O2     conftest.c -liptc -ldl
/usr/bin/ld: /tmp/ccuJEDqP.o: undefined reference to symbol 'iptc_init'
/usr/bin/ld: note: 'iptc_init' is defined in DSO /lib64/libip4tc.so.0 so try adding it to the linker command line
/lib64/libip4tc.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

Why the iptables plugin compiles without this is beyond me.

Change-Id: If615bee0c9524d907ca1834d5c337ed50c625c5b

13 years agofix xff excessive rounding
Francois-Xavier Bourlet [Sun, 21 Aug 2011 09:05:40 +0000 (11:05 +0200)]
fix xff excessive rounding

Hi,

When generating arguments for rrd_create, the previous
format string "%.1f", was rounding up the value too aggressively.

ex: for xff==0.9999 the result would be -> 1.0 (invalid value for xff!)

The new format string is "%.10f", which lead up to 10 digits after the
dot, enough to be close to the double type limit, and so handling
correctly the previous example.

Change-Id: I7c6cc55b0d43beb5ef351bb04b67f4628249c737

13 years agoconfigure.in: Add AC_CONFIG_AUX_DIR for libltdl.
Florian Forster [Tue, 16 Aug 2011 06:51:59 +0000 (08:51 +0200)]
configure.in: Add AC_CONFIG_AUX_DIR for libltdl.

13 years agomysql plugin: Remove sideeffect-free function call.
Florian Forster [Tue, 16 Aug 2011 06:51:21 +0000 (08:51 +0200)]
mysql plugin: Remove sideeffect-free function call.

13 years agonotify_email plugin: Remove useless function and fix indentation.
Florian Forster [Tue, 16 Aug 2011 06:50:40 +0000 (08:50 +0200)]
notify_email plugin: Remove useless function and fix indentation.

13 years agoMany build fixes that turned up with GCC 4.6.
Peter Green [Tue, 16 Aug 2011 06:48:52 +0000 (08:48 +0200)]
Many build fixes that turned up with GCC 4.6.

Signed-off-by: Florian Forster <octo@collectd.org>
13 years agosrc/csv.c: use a bigger buffer
Colin Patrick McCabe [Wed, 27 Jul 2011 17:00:30 +0000 (10:00 -0700)]
src/csv.c: use a bigger buffer

The CSV plugin formerly used a relatively small output buffer. If you
had a large dataset, you would always get error -1 because the line
length was be too long. This patch extends the buffer.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
13 years agocurl_json plugin: Add compatibility code for libyajl v2.
Florian Forster [Tue, 5 Jul 2011 14:28:10 +0000 (16:28 +0200)]
curl_json plugin: Add compatibility code for libyajl v2.

Thanks to "spupykin" of the Arch Linux project on whose patch this commit is
loosely based.

13 years agoVarious plugins: Set the cURL option "CURLOPT_NOSIGNAL".
Mike Flisher [Sun, 22 May 2011 15:39:29 +0000 (17:39 +0200)]
Various plugins: Set the cURL option "CURLOPT_NOSIGNAL".

This fixes problems with version 7.21.2 (and later) of libcurl that are due to
collectd being a multi-threaded program.

Signed-off-by: Florian Forster <octo@collectd.org>
13 years agosrc/meta_data.c: Free a leaking mutex.
Rafal Lesniak [Fri, 13 May 2011 15:15:54 +0000 (17:15 +0200)]
src/meta_data.c: Free a leaking mutex.

This problem primarily manifested on FreeBSD but may well effect other
systems as well.

Thanks to Tomas Krasnican for reporting this problem.

Signed-off-by: Florian Forster <octo@collectd.org>
13 years agodf plugin: Improve error message.
Florian Forster [Mon, 9 May 2011 21:36:17 +0000 (23:36 +0200)]
df plugin: Improve error message.

13 years agonotify_desktop plugin: Add compatibility code for libnotify 0.7.
Samuli Suominen [Mon, 28 Mar 2011 00:16:33 +0000 (02:16 +0200)]
notify_desktop plugin: Add compatibility code for libnotify 0.7.

The current code in src/notify_desktop.c is not compatible with the new
libnotify 0.7 API

This:

  notification = notify_notification_new (summary, n->message, NULL, NULL);

Should now be:

  notification = notify_notification_new (summary, n->message, NULL;

As in, one argument less for notify_notification_new.

But we can't just remove it or it'll break compability with libnotify
0.4.x and 0.5.x.

This piece of code sets dummy NOTIFY_CHECK_VERSION for libnotify-0.4.x,
because NOTIFY_CHECK_VERSION was added only in 0.5.x:

  #ifndef NOTIFY_CHECK_VERSION
  #define NOTIFY_CHECK_VERSION(x,y,z) 0
  #endif

Then we can freely use NOTIFY_CHECK_VERSION, and it will work with all
of 0.4, 0.5 and 0.7 series:

  #if NOTIFY_CHECK_VERSION (0, 7, 0)
  do something cool
  #endif

I'm attaching the working patch.  It's been tested with all of the
mentioned versions, as well as it's in active use at Gentoo Linux.

Thanks, Samuli

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
13 years agoBump version to 4.10.3; Update ChangeLog. collectd-4.10.3
Florian Forster [Sat, 26 Mar 2011 16:00:17 +0000 (09:00 -0700)]
Bump version to 4.10.3; Update ChangeLog.

13 years agoMerge branch 'collectd-4.9' into collectd-4.10
Florian Forster [Sat, 26 Mar 2011 15:53:22 +0000 (08:53 -0700)]
Merge branch 'collectd-4.9' into collectd-4.10

Conflicts:
ChangeLog
version-gen.sh

13 years agoBump version to 4.9.5; Update ChangeLog. collectd-4.9.5
Florian Forster [Fri, 25 Mar 2011 15:39:17 +0000 (08:39 -0700)]
Bump version to 4.9.5; Update ChangeLog.

13 years agolibvirt plugin: Correctly check the status code of virDomainGetVcpus().
Florian Forster [Sat, 19 Mar 2011 14:43:41 +0000 (15:43 +0100)]
libvirt plugin: Correctly check the status code of virDomainGetVcpus().

The status code is less than zero on failure and the number of vCPUs
otherwise. Thanks to "JLPC" for pointing this problem out.

13 years agoFix compilation error with plugin_register_shutdown
Bruno Prémont [Fri, 18 Mar 2011 07:24:40 +0000 (08:24 +0100)]
Fix compilation error with plugin_register_shutdown

Compiling collectd-4.10.2 on an OpenSuSE 11.3 system causes the
following error:
  snmp.c: In function ‘module_register’:
  snmp.c:1620:3: error: passing argument 1 of ‘plugin_register_shutdown’ discards qualifiers from pointer target type
  plugin.h:275:5: note: expected ‘char *’ but argument is of type ‘const char *’

Convert plugin_register_shutdown's name argument from 'char *' to
'const char *' in order to match the other plugin_register_*
functions.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
13 years agoMerge branch 'collectd-4.9' into collectd-4.10
Florian Forster [Mon, 14 Mar 2011 19:06:53 +0000 (20:06 +0100)]
Merge branch 'collectd-4.9' into collectd-4.10

13 years agodispatch proper values in Python write plugin
Gregory Szorc [Sat, 5 Mar 2011 06:25:45 +0000 (22:25 -0800)]
dispatch proper values in Python write plugin

Fixes the Python write callback so the appropriate value is dispatched to
Python. Previously, the code only looked at the first element of a data set
to determine which value type (GAUGE, COUNTER, etc) to dispatch. If your data
set consisted of multiple values of different types, then the Python write
plugin was receiving bad values for the elements at position n > 0 whose type
was not the same as that at position 0.