src/configfile.c: Set a plugin context when autoloading plugins.
Fixes: #1069
Fixes: #1069
statsd plugin: Dispatch NaN when no timer event was recorded.
This makes timing events appear faster when writing to RRD files.
Fixes: #1038, #1049
This makes timing events appear faster when writing to RRD files.
Fixes: #1038, #1049
tail_csv plugin: Print warning and continue when metric is not found.
Previously, when multiple metrics were specified on one "Collect" line and one
didn't exist, all *following* metrics would be ignored. This patch changes this
to continue in this case and configure as many metrics as possible.
Previously, when multiple metrics were specified on one "Collect" line and one
didn't exist, all *following* metrics would be ignored. This patch changes this
to continue in this case and configure as many metrics as possible.
Plugin tail_csv: the manual says that you can use multiple times the
Collect option but the code expecs t"Collect n1 n2 n3 n4", fix
to allow to put the option Collect multiple times.
Collect option but the code expecs t"Collect n1 n2 n3 n4", fix
to allow to put the option Collect multiple times.
Plugin tail_csv: if TimeFrom is not specified in config file
the default value for time_from is -1 and the type of fileds_num
is size_t, so the comparsion of signed and unsigned not work as espected
the default value for time_from is -1 and the type of fileds_num
is size_t, so the comparsion of signed and unsigned not work as espected
stats plugin: Fix reference of undeclared symbol.
Issue: #997
Issue: #997
statsd plugin: Free latency counter and AVL trees.
latency counters (used by TIMER metrics) and AVL trees (used by SET metrics)
were not freed when cleaning up unused metrics. This resulted in leaked memory.
Fixes: #997
latency counters (used by TIMER metrics) and AVL trees (used by SET metrics)
were not freed when cleaning up unused metrics. This resulted in leaked memory.
Fixes: #997
Merge remote-tracking branch 'origin/collectd-5.3' into collectd-5.4
bindings/java/Makefile.am: Add "uninstall-local" target.
Otherwise "make distcheck" will complain about leftover files.
Otherwise "make distcheck" will complain about leftover files.
bindings/java/Makefile.am: Use $(srcdir) when specifying dependencies.
This fixes out-of-tree builds, like "make distcheck" does.
This fixes out-of-tree builds, like "make distcheck" does.
write_redis: Fix timestamp sent to Redis.
Various plugins: Use the global GAUGE_FORMAT.
This fixes the postgresql, rrdtool, target_notification, write_graphite and
write_redis plugins to use the globally defined format for gauges.
Issue #1039
This fixes the postgresql, rrdtool, target_notification, write_graphite and
write_redis plugins to use the globally defined format for gauges.
Issue #1039
src/collectd.h: Define GAUGE_FORMAT.
This format is also used in format_values(), so exported gauges follow a common
format.
See also issue #1039
This format is also used in format_values(), so exported gauges follow a common
format.
See also issue #1039
src/utils_format_json.[ch]: Export gauges with 15 decimal places of precision.
Fixes: #1039
Fixes: #1039
Merge branch 'collectd-5.3' into collectd-5.4
Merge branch 'collectd-4.10' into collectd-5.3
curl_xml: fix 3 small memory leaks
Discovered while testing the previous 2 commits. NB: valgrind
already complained about these before 0afea606 was applied, so this
isn't related to issue #935.
Discovered while testing the previous 2 commits. NB: valgrind
already complained about these before 0afea606 was applied, so this
isn't related to issue #935.
Fix test for tables and empty instance
Change-Id: I9a3fc3ded9566bd68c80e5fbce2d8b717ea1848d
Change-Id: I9a3fc3ded9566bd68c80e5fbce2d8b717ea1848d
Revert "curl_xml plugin: Fixed tautological pointer comparison error."
Fixes #931
This reverts commit 0afea60611f115a28b8ec331aba610e3038c1ef2.
Fixes #931
This reverts commit 0afea60611f115a28b8ec331aba610e3038c1ef2.
Enable the processes plugin by default on Solaris.
It now builds and works correctly in both 32-bit and 64-bit mode.
It now builds and works correctly in both 32-bit and 64-bit mode.
processes: Solaris: Consistently use long to represent a pid
pid_t may be defined as an int or a long depending on circumstances.
Use a long everywhere so we don't have to fiddle with typecasts.
This fixes an issue where an incorrect printf format string would
be used for a pid_t in 32-bit builds.
pid_t may be defined as an int or a long depending on circumstances.
Use a long everywhere so we don't have to fiddle with typecasts.
This fixes an issue where an incorrect printf format string would
be used for a pid_t in 32-bit builds.
processes: Fix build for Solaris 32-bit binary
Work around a #error in <sys/procfs.h> that occurs when building a
32-bit binary with _FILE_OFFSET_BITS=64. This uses a hack similar
to the one in swap.c.
Work around a #error in <sys/procfs.h> that occurs when building a
32-bit binary with _FILE_OFFSET_BITS=64. This uses a hack similar
to the one in swap.c.
processes: Fix ps_get_cmdline() on Solaris.
Return value of read_file_contents() was checked incorrectly.
Return value of read_file_contents() was checked incorrectly.
zfs_arc: Don't spam the log if we fail to read the "l2_size" kstat value.
The value got lost with some patch to Solaris 10 and has only reappeared
recently in 11.2. If we ever fail to read this value, stop trying, so we
don't report an error on every interval.
The value got lost with some patch to Solaris 10 and has only reappeared
recently in 11.2. If we ever fail to read this value, stop trying, so we
don't report an error on every interval.
oconfig: fix oconfig_free to free all elements
The recursive nature of this function made it difficult to free the root
node of the config tree. Splitting it in 2 allows to work around this
problem.
The recursive nature of this function made it difficult to free the root
node of the config tree. Splitting it in 2 allows to work around this
problem.
Merge branch 'collectd-5.3' into collectd-5.4
/bin/sh on OSX doesn't understand -n
This breaks PACKAGEVERSION since the -n is left verbatim in the string.
Use the more portable printf instead
This breaks PACKAGEVERSION since the -n is left verbatim in the string.
Use the more portable printf instead
Merge pull request #1014 from mfournier/fix-path-to-java
improve java detection/defaults in configure script
improve java detection/defaults in configure script
RPM specfile: update summary to be consistent with .deb packages
RPM specfile: remove superfluous '--without-*' configure flags
- use _POSIX2_LINE_MAX for errbuf as stated by kvm(3).
- fix error msg on kvm_openfiles failure
- fix error msg on kvm_openfiles failure
fixes swap plugin on FreeBSD Jail
fixes processes plugin on FreeBSD Jail
configure: add return() statements in 3 AC_LANG_PROGRAM() blocks
This allows the dns and df plugins to get built also in the case the
configure script is run with `CC="gcc -Wall -Werror"`.
This allows the dns and df plugins to get built also in the case the
configure script is run with `CC="gcc -Wall -Werror"`.
RPM specfile: correct copy-paste error
make java components discovery follow symlinks
When `--with-java` points to a symlink, `find` should resolve it, making
the configure script work seamlessly with symlinks pointing to JDK
installations.
This fixes the confusing discrepancy between `--with-java=/path/to/java`
failing and `--with-java=/path/to/java/` working.
When `--with-java` points to a symlink, `find` should resolve it, making
the configure script work seamlessly with symlinks pointing to JDK
installations.
This fixes the confusing discrepancy between `--with-java=/path/to/java`
failing and `--with-java=/path/to/java/` working.
Fallback to /usr/lib/jvm if JAVA_HOME is not set
This makes the java plugin build out of the box
on systems with a JDK installed.
/usr/lib/jvm is the default location for the JDK
on at least Fedora, Red Hat and Debian.
This makes the java plugin build out of the box
on systems with a JDK installed.
/usr/lib/jvm is the default location for the JDK
on at least Fedora, Red Hat and Debian.
Merge branch 'collectd-4.10' into collectd-5.3
check if AMQP_VERSION exists
fix build with librabbitmq 0.6.0
Update meta_data.c
In the function meta_data_get_string(), when the type mismatchs,the ERROR statement should be
ERROR ("meta_data_get_string: Type mismatch for key `%s'", e->key);
not
ERROR ("meta_data_get_signed_int: Type mismatch for key `%s'", e->key);
In the function meta_data_get_string(), when the type mismatchs,the ERROR statement should be
ERROR ("meta_data_get_string: Type mismatch for key `%s'", e->key);
not
ERROR ("meta_data_get_signed_int: Type mismatch for key `%s'", e->key);
Merge branch 'collectd-5.3' into collectd-5.4
Merge branch 'collectd-4.10' into collectd-5.3
notify_email: avoid linking against libdl
This flag seems to have been accidentally added in 451d75bae1 and
prevents building the plugin on platforms which don't have GNU libc.
Conflicts:
src/Makefile.am
This flag seems to have been accidentally added in 451d75bae1 and
prevents building the plugin on platforms which don't have GNU libc.
Conflicts:
src/Makefile.am
Merge branch 'collectd-5.3' into collectd-5.4
Revert "version-gen.sh: Switch to bash due to bashisms."
The last bashism was removed in 4d376681. Reverting to /bin/sh prevents
build errors on platforms without bash installed by default.
This reverts commit 3bda88e8b425f43644e303e6957e38ae59c1bc83.
The last bashism was removed in 4d376681. Reverting to /bin/sh prevents
build errors on platforms without bash installed by default.
This reverts commit 3bda88e8b425f43644e303e6957e38ae59c1bc83.
network: set ttl before opening server sockets
If TimeToLive is defined in collectd.conf after Server options, the
net_config_ttl value is updated after network_config_add_server and
the desired ttl is not used.
If TimeToLive is defined in collectd.conf after Server options, the
net_config_ttl value is updated after network_config_add_server and
the desired ttl is not used.
Warn if ttl is out of bounds
openvpn plugin: Don't signal an error when no clients are connected.
In the multi1_read() function, an error (zero) was returned when no
clients were currently connected to the OpenVPN server, because the
"read" variable was initialized to zero and the while loop exited before
it was set to one. This is not the intended behavior.
Thanks to @srix for reporting this issue!
Fixes: #731
In the multi1_read() function, an error (zero) was returned when no
clients were currently connected to the OpenVPN server, because the
"read" variable was initialized to zero and the while loop exited before
it was set to one. This is not the intended behavior.
Thanks to @srix for reporting this issue!
Fixes: #731
Merge branch 'collectd-5.3' into collectd-5.4
dbi plugin: fix a warning mentioning snmp plugin
curl: correct typo in error message
doc & comments: s/mili/milli/
Merge branch 'collectd-4.10' into collectd-5.3
Fix type instance sanitization in bind plugin
Upgrade spec to 5.4.2
Merge branch 'collectd-5.3' into collectd-5.4
Conflicts:
contrib/redhat/collectd.spec
src/collectd.conf.pod
Conflicts:
contrib/redhat/collectd.spec
src/collectd.conf.pod
RPM specfile: bump version number
Thanks to @Poil for pointing that out !
Thanks to @Poil for pointing that out !
collectd.conf(5): move misplaced block in postgresql section
Remove more references to the Globals option
This is a follow up to commit 5eabeb9248
At this point, the last reference to Globals in the doc & examples is
the detailed explanation in collectd.conf(5).
This is a follow up to commit 5eabeb9248
At this point, the last reference to Globals in the doc & examples is
the detailed explanation in collectd.conf(5).
Makefile.am: s/INCLUDES/AM_CPPFLAGS/
Fixes the following warning:
Makefile.am:5: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Fixes the following warning:
Makefile.am:5: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
write_mongodb plugin: Fix BSON memory handling even further.
According to the mongo-c-driver 0.8.1 documentation, each call to
bson_alloc() needs to be matched by a call to bson_dealloc() and each
call to bson_init() needs to be matched by a call to bson_destroy().
Additionally, this patch adds macros for mongo-c-driver < 0.8.0 to map
the new bson_alloc() and bson_deallow() names to the old bson_create()
and bson_dispose() symbol names.
Tested with mongo-c-driver 0.8.1 and 0.7.1.
Fixes: #331, #956
According to the mongo-c-driver 0.8.1 documentation, each call to
bson_alloc() needs to be matched by a call to bson_dealloc() and each
call to bson_init() needs to be matched by a call to bson_destroy().
Additionally, this patch adds macros for mongo-c-driver < 0.8.0 to map
the new bson_alloc() and bson_deallow() names to the old bson_create()
and bson_dispose() symbol names.
Tested with mongo-c-driver 0.8.1 and 0.7.1.
Fixes: #331, #956
write_mongodb plugin: s/bson_dispose/bson_destroy/
Thanks to @eremenko for providing the initial patch!
Fixes: #331, #956
Thanks to @eremenko for providing the initial patch!
Fixes: #331, #956
Statsd: avoid doing a division by zero when calculating the percentile with an empty histogram.
Statsd: avoid doing a division by zero when calculating the average if we didn't get any values.
utils_latency: use portable format string
statsd histogram to support more than 1 second
Summary:
Problem: Collectd/Statsd supports configurable percentiles for timers but it limits the value to be 1 to 1000ms. If the timer value is more than 1000ms, it uses for min, max, average,... and drops it for percentile computation.
Solution: Added support for increasing bin width when the value is above histogram's range.
Test Plan: Tested by sending metrics within range and out-of-range (ie above 1000 ms)
Reviewers: skhajamo, shalstea
Reviewed By: skhajamo
CC: arcyd
Differential Revision: https://all.phab.dev.bloomberg.com/D156454
Summary:
Problem: Collectd/Statsd supports configurable percentiles for timers but it limits the value to be 1 to 1000ms. If the timer value is more than 1000ms, it uses for min, max, average,... and drops it for percentile computation.
Solution: Added support for increasing bin width when the value is above histogram's range.
Test Plan: Tested by sending metrics within range and out-of-range (ie above 1000 ms)
Reviewers: skhajamo, shalstea
Reviewed By: skhajamo
CC: arcyd
Differential Revision: https://all.phab.dev.bloomberg.com/D156454
configure: add liblvm2app to summary output
Merge branch 'collectd-5.3' into collectd-5.4
Conflicts:
configure.ac
Conflicts:
configure.ac
configure: add missing entries in summary output
... and reorder alphabetically.
... and reorder alphabetically.
Merge pull request #951 from tokkee/sh/debian-patches
plugin: Use strcasecmp rather than strncasecmp to find a plugin.
plugin: Use strcasecmp rather than strncasecmp to find a plugin.
Powerdns plugin: fix logging on failed lookup
Don't look past the end of the array but check the boundary first.
Don't look past the end of the array but check the boundary first.
plugin: Use strcasecmp rather than strncasecmp to find a plugin.
This makes collectd resistant against vulnerable copies of libltdl
(CVE-2009-3736). See <http://bugs.debian.org/559801#15> for further
details.
This makes collectd resistant against vulnerable copies of libltdl
(CVE-2009-3736). See <http://bugs.debian.org/559801#15> for further
details.
Bump version to 5.4.2; Update ChangeLog.
Merge branch 'collectd-5.3' into collectd-5.4
ChangeLog: Add libdbi fix.
dbi plugin: Switch to libdbi's thread-safe interface.
Macros are in place to make buliding with libdbi <0.9.0 possible.
Fixes: #950
Macros are in place to make buliding with libdbi <0.9.0 possible.
Fixes: #950
Bump version to 5.3.2; Update ChangeLog.
collectd-exec(5): Clarify the format of the Time: header.
Revert "Plugin exec: change notification time to integer."
This was working as intended.
This reverts commit 07e4683f7f985668641d79137b64d148bc18ba8a.
This was working as intended.
This reverts commit 07e4683f7f985668641d79137b64d148bc18ba8a.
Merge branch 'collectd-5.3' into collectd-5.4
Merge branch 'collectd-4.10' into collectd-5.3
Conflicts:
src/collectd.conf.pod
Conflicts:
src/collectd.conf.pod
perl plugin: plugins are linked with *_LIBADD and LIBS not *_LIBS and LIBS
Conflicts:
src/Makefile.am
Conflicts:
src/Makefile.am
libperl's ldopts include libaries and therefore should go in LIBS not LDFLAGS
Without this configure fails compile its libperl test program because
-lperl comes before the test program on the compiler command line.
Conflicts:
src/Makefile.am
Without this configure fails compile its libperl test program because
-lperl comes before the test program on the compiler command line.
Conflicts:
src/Makefile.am
Merge pull request #899 from mfournier/write_http-multiple-destionations
write_http: make callback names context-dependent
write_http: make callback names context-dependent
RPM specfile: doc clarification
ipmi: use SIGIO instead of SIGUSR2 to avoid conflict with JVM
Java uses SIGUSR2 to suspend/resume threads. The OpenIPMI plugins also
need a signal to resume its event loop when setting a timer. They can't
both use the same signal. We ask OpenIPMI to use SIGIO instead.
This should fix #114.
Java uses SIGUSR2 to suspend/resume threads. The OpenIPMI plugins also
need a signal to resume its event loop when setting a timer. They can't
both use the same signal. We ask OpenIPMI to use SIGIO instead.
This should fix #114.
added doc CollectStatistics to section rrdcached
Fixes #907
Conflicts:
src/collectd.conf.pod
Fixes #907
Conflicts:
src/collectd.conf.pod
mysql: document defaults to boolean config options
write_http: make callback names context-dependent
This allows multiple destinations to work again (fixes #821), using the
same logic as other write plugins.
The callback name would now be something like:
`write_http/http://example.com/endpoint`
which is not very nice.
The next step would be to change this plugin to use `<Node>` blocks
like many others, and pass the URL as a parameter inside each instance
block. So I see this patch as the minimum required to let 5.3 and 5.4
users use this plugin with multiple destinations.
This allows multiple destinations to work again (fixes #821), using the
same logic as other write plugins.
The callback name would now be something like:
`write_http/http://example.com/endpoint`
which is not very nice.
The next step would be to change this plugin to use `<Node>` blocks
like many others, and pass the URL as a parameter inside each instance
block. So I see this patch as the minimum required to let 5.3 and 5.4
users use this plugin with multiple destinations.
RPM specfile: misc improvements related to perl files
Avoids installing some files in two different packages & locations. Also
avoid unnecessary dependencies on -perl and -contrib packages.
Supersedes #896.
Thanks to @faxm0dem for helping work things out !
Avoids installing some files in two different packages & locations. Also
avoid unnecessary dependencies on -perl and -contrib packages.
Supersedes #896.
Thanks to @faxm0dem for helping work things out !
Merge branch 'collectd-5.3' into collectd-5.4
Merge branch 'collectd-4.10' into collectd-5.3
Fix check for htonll in configure.ac
types_list: fix carriage return sign
Many thanks to @NsLib for mentioning this !
Many thanks to @NsLib for mentioning this !
RPM specfile: avoid packaging some files twice
Fixes #874
Fixes #874
configure: Fixed check for AM_PATH_LIBCCRYPT
collectd.conf example: remove erroneous quotes
Thanks to @ymettier for pointing that out !
Thanks to @ymettier for pointing that out !