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 !
Merge branch 'collectd-4.10' into collectd-5.3
Conflicts:
src/libvirt.c
Conflicts:
src/libvirt.c
virt plugin: only gather stats for running domains
Conflicts:
src/libvirt.c
Conflicts:
src/libvirt.c
redhat initscript: move restart block to a function
This ensures the "condrestart" option will work.
This ensures the "condrestart" option will work.
netlink: ensure size_t portability in DEBUG() statement
This prevents the following error when building on 32bit systems with
gcc 4.7.2:
netlink.c: In function 'ir_read':
netlink.c:783:7: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' [-Werror=format]
This prevents the following error when building on 32bit systems with
gcc 4.7.2:
netlink.c: In function 'ir_read':
netlink.c:783:7: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' [-Werror=format]
Merge pull request #839 from yogeswaran/python
Fix Py list length check in cpy_build_meta()
Fix Py list length check in cpy_build_meta()
Fixed indentation and decreased reference count
Fix Py list length check in cpy_build_meta()
Merge pull request #827 from yogeswaran/collectdctl
collectdctl command hangs on AIX and returns error 0 on Solaris.
collectdctl command hangs on AIX and returns error 0 on Solaris.
Removed extra semicolon
RPM specfile: require package providing ltdl.h
Wrap the content of macro with do/while to make it safer as per code review comment
cpu: remove legacy assignment to undefiend variable
This finishes up the cleanup done by f7100301fa. It also fixes #828
(build error on Mac OS).
Many thanks to @njh for pointing that out !
This finishes up the cleanup done by f7100301fa. It also fixes #828
(build error on Mac OS).
Many thanks to @njh for pointing that out !
collectdctl command hangs on AIX and returns error 0 on Solaris.
Summary:
Problem: collectdctl command hangs on AIX and returns error 0 on Solaris.
Root cause - client (collectdctl) and server (collectd daemon) are using fprintf to communicate using Unix domain socket, Since fprintf buffers, command sent by client did not reach server, since client does not get the response, it closes the socket which forces the client to flush the command, now server receives the command, when responding, it gets socket error because the client already closed the socket.
Solution: Added flush after all fprintf calls.
Test Plan: Tested collectdctl on AIX and SunOS for listval, getval commands
Reviewers: skhajamo
Reviewed By: skhajamo
CC: arcyd
Differential Revision: https://all.phab.dev.bloomberg.com/D155584
Summary:
Problem: collectdctl command hangs on AIX and returns error 0 on Solaris.
Root cause - client (collectdctl) and server (collectd daemon) are using fprintf to communicate using Unix domain socket, Since fprintf buffers, command sent by client did not reach server, since client does not get the response, it closes the socket which forces the client to flush the command, now server receives the command, when responding, it gets socket error because the client already closed the socket.
Solution: Added flush after all fprintf calls.
Test Plan: Tested collectdctl on AIX and SunOS for listval, getval commands
Reviewers: skhajamo
Reviewed By: skhajamo
CC: arcyd
Differential Revision: https://all.phab.dev.bloomberg.com/D155584
Merge branch 'collectd-5.3' into collectd-5.4
Conflicts:
src/write_graphite.c
Conflicts:
src/write_graphite.c
Merge branch 'collectd-4.10' into collectd-5.3
Revert "Let snmp_synch_response deal with PDU freeing"
This reverts commit 9d6f72e5054cfbb183585991fefcf119259d71c4.
The proper fix to this issue is in the collectd-4.10 branch. See also
79e90bba.
This reverts commit 9d6f72e5054cfbb183585991fefcf119259d71c4.
The proper fix to this issue is in the collectd-4.10 branch. See also
79e90bba.
Revert "Let snmp_synch_response deal with PDU freeing"
This reverts commit e767dc103a142e1c57800f06a9c384f21a48aef5.
The proper fix to this issue is in the collectd-4.10 branch. See also
79e90bba.
This reverts commit e767dc103a142e1c57800f06a9c384f21a48aef5.
The proper fix to this issue is in the collectd-4.10 branch. See also
79e90bba.
snmp: avoid freeing req under normal operation
Equivalent patch to 79e90bba5, to avoid issue #804 introduced while
fixing #610.
Equivalent patch to 79e90bba5, to avoid issue #804 introduced while
fixing #610.
Let snmp_synch_response deal with PDU freeing
When reading from tables, upon errors the PDUs sent are already
freed by snmp_synch_response since they are right after
snmp_send is called.
This commit syncs collectd's approach with other occurences of
snmp_synch_response calls.
There might be a few corner cases where we leak PDUs, but it
is unclear how to check for those since we would need to
have an indication that snmp_send was never called, which
as far as I can tell is not possible.
The potential for failure in snmp_send is rather low and will
be easily spotted though, since when crafting invalid PDUs
snmp send will constantly fail and since valid configurations
can never leak memory.
This fixes #804
When reading from tables, upon errors the PDUs sent are already
freed by snmp_synch_response since they are right after
snmp_send is called.
This commit syncs collectd's approach with other occurences of
snmp_synch_response calls.
There might be a few corner cases where we leak PDUs, but it
is unclear how to check for those since we would need to
have an indication that snmp_send was never called, which
as far as I can tell is not possible.
The potential for failure in snmp_send is rather low and will
be easily spotted though, since when crafting invalid PDUs
snmp send will constantly fail and since valid configurations
can never leak memory.
This fixes #804
Let snmp_synch_response deal with PDU freeing
When reading from tables, upon errors the PDUs sent are already
freed by snmp_synch_response since they are right after
snmp_send is called.
This commit syncs collectd's approach with other occurences of
snmp_synch_response calls.
There might be a few corner cases where we leak PDUs, but it
is unclear how to check for those since we would need to
have an indication that snmp_send was never called, which
as far as I can tell is not possible.
The potential for failure in snmp_send is rather low and will
be easily spotted though, since when crafting invalid PDUs
snmp send will constantly fail and since valid configurations
can never leak memory.
This fixes #804
When reading from tables, upon errors the PDUs sent are already
freed by snmp_synch_response since they are right after
snmp_send is called.
This commit syncs collectd's approach with other occurences of
snmp_synch_response calls.
There might be a few corner cases where we leak PDUs, but it
is unclear how to check for those since we would need to
have an indication that snmp_send was never called, which
as far as I can tell is not possible.
The potential for failure in snmp_send is rather low and will
be easily spotted though, since when crafting invalid PDUs
snmp send will constantly fail and since valid configurations
can never leak memory.
This fixes #804
Merge pull request #796 from mfournier/write_redis-colon-mistake
write_redis: re-add colon dropped in b7984797 + manpage
write_redis: re-add colon dropped in b7984797 + manpage
Link aggregation.so to libm.so
Conflicts:
src/Makefile.am
Conflicts:
src/Makefile.am
Merge pull request #765 from tokkee/sh/write-err
Use the complain mechanism to report write failures.
Use the complain mechanism to report write failures.
network: don't enable gcrypt thread callbacks when gcrypt recent enough
From `gcrypt.h`:
> NOTE: Since Libgcrypt 1.6 the thread callbacks are not anymore used.
> However we keep it to allow for some source code compatibility if used
> in the standard way.
Otherwise, we get a deprecation warning which is turned into an error:
```
CC libcollectdclient_la-network_buffer.lo
../../../src/libcollectdclient/network_buffer.c:58:15: error: 'gcry_thread_cbs' is deprecated (declared at /usr/include/gcrypt.h:213) [-Werror=deprecated-declarations]
GCRY_THREAD_OPTION_PTHREAD_IMPL;
```
Fixes: #632
From `gcrypt.h`:
> NOTE: Since Libgcrypt 1.6 the thread callbacks are not anymore used.
> However we keep it to allow for some source code compatibility if used
> in the standard way.
Otherwise, we get a deprecation warning which is turned into an error:
```
CC libcollectdclient_la-network_buffer.lo
../../../src/libcollectdclient/network_buffer.c:58:15: error: 'gcry_thread_cbs' is deprecated (declared at /usr/include/gcrypt.h:213) [-Werror=deprecated-declarations]
GCRY_THREAD_OPTION_PTHREAD_IMPL;
```
Fixes: #632
add write_redis to manpage
write_redis: re-add colon dropped in b7984797
When running f3706b0b87, the following command gets sent to redis:
"ZADD" "collectd/hostname/entropy/entropy" "1415487432.000000" "1415487432:932"
Meaning the value actually stored, and later returned by redis is:
"<timstamp>:<value>".
b7984797 accidentally dropped the comma separating the timestamp and the
value, which leads the plugin to store a somewhat confusing value in
redis:
"ZADD" "collectd/hostname/entropy/entropy" "1415487432.000000" "1415487432932"
When running f3706b0b87, the following command gets sent to redis:
"ZADD" "collectd/hostname/entropy/entropy" "1415487432.000000" "1415487432:932"
Meaning the value actually stored, and later returned by redis is:
"<timstamp>:<value>".
b7984797 accidentally dropped the comma separating the timestamp and the
value, which leads the plugin to store a somewhat confusing value in
redis:
"ZADD" "collectd/hostname/entropy/entropy" "1415487432.000000" "1415487432932"
redhat initscript: add timeout when stopping the daemon
This mitigates the risk of having 2 daemons running simultaneously
during a short period, on restart.
The debian package's initscript does the same thing, using the same
timeout value.
This mitigates the risk of having 2 daemons running simultaneously
during a short period, on restart.
The debian package's initscript does the same thing, using the same
timeout value.
Merge pull request #764 from tokkee/sh/collectd-5.3
write_graphite plugin: Improved error reporting when connecting to the server.
write_graphite plugin: Improved error reporting when connecting to the server.
fix grammar in plugin loading error message
"cause for this problem are" => "cause for this problem is"
"cause for this problem are" => "cause for this problem is"
logfile: avoid total silence in case of a misconfiguration
Basically the same patch that was applied to syslog.c in 84c38056
Basically the same patch that was applied to syslog.c in 84c38056
correct typo in error message
Syslog: if we can't find the loglevel specified by the configuration string default to 'info' and warn about the unknown configuration option. no way to make syslog totaly silent anymore.
curl_json: fix the array access implemented in f1e1e37e
In the avl-tree we store two different structs, cj_key_t for the value
we search, c_avl_tree_t for sub-nodes.
The old version does assume when it will find a key, and when a tree,
which doesn't have to be right in all cases.
Therefore we utilize the magic to revalidate this cast.
Being able to tell tree from key, we now can also implement array access
on the right most node of the tree-path.
In the avl-tree we store two different structs, cj_key_t for the value
we search, c_avl_tree_t for sub-nodes.
The old version does assume when it will find a key, and when a tree,
which doesn't have to be right in all cases.
Therefore we utilize the magic to revalidate this cast.
Being able to tell tree from key, we now can also implement array access
on the right most node of the tree-path.
Use the complain mechanism to report write failures.
This ensures that we don't spam the log for each submitted value. Instead, an
exponential backup is used to report permanent errors starting at one message
per second.
This ensures that we don't spam the log for each submitted value. Instead, an
exponential backup is used to report permanent errors starting at one message
per second.
write_graphite plugin: Improved error reporting when connecting to the server.
statsd: clarify/simplify documentation & example
Added documentation for StatsD module per added functionality in issue #403.
Bit shift right by 8 to get return code from exit status
Pull-Request: #741
Signed-off-by: Florian Forster <octo@collectd.org>
Pull-Request: #741
Signed-off-by: Florian Forster <octo@collectd.org>
cpu plugin: Remove temperature code for Mac OS X.
This code would throw an error for some systems, because the temperature
couldn't be read. Since the plugin still works in general, this was very
confusing to users. Becaus the temperature, even when read sucessfully, was
never dispatched, remove the code entirely. We might want to add this back to
the apple_sensors plugin eventually.
Fixes: #22
This code would throw an error for some systems, because the temperature
couldn't be read. Since the plugin still works in general, this was very
confusing to users. Becaus the temperature, even when read sucessfully, was
never dispatched, remove the code entirely. We might want to add this back to
the apple_sensors plugin eventually.
Fixes: #22
swap plugin: Make "cached" optional under Linux.
This is the smallest possible fix for OpenVZ, where cached is not available.
master has a more complete fix which should be used going forward.
Fixes: #733
This is the smallest possible fix for OpenVZ, where cached is not available.
master has a more complete fix which should be used going forward.
Fixes: #733
Fix typo in if caluse
Fixes #729
Signed-off-by: Florian Forster <octo@collectd.org>
Fixes #729
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-5.3' into collectd-5.4
src/common.c: Fix strstripnewline().
Because the length of the string was decremented too late, the function
would actually overwrite the trailing null byte instead of the newline.
Because the length of the string was decremented too late, the function
would actually overwrite the trailing null byte instead of the newline.
RPM specfile: enable lvm plugin on RHEL7
Merge branch 'collectd-5.3' into collectd-5.4
Conflicts:
contrib/redhat/collectd.spec
Conflicts:
contrib/redhat/collectd.spec
RPM specfile: enable netlink plugin on RHEL > 5
RPM specfile: fix bogus dates
modern rpmbuild versions appear to be more strict on this point.
modern rpmbuild versions appear to be more strict on this point.
RPM specfile: support for RHEL7
RPM specfile: remove define accidentally re-added when handling merge conflict
RPM specfile: remove macro accidentally re-added when handling merge conflict
RPM specfile: remove duplicate modbus block
Merge branch 'collectd-5.3' into collectd-5.4
Conflicts:
src/curl.c
Conflicts:
src/curl.c
network plugin: Improve client connecting behavior.
This moves the socket creation logic so it's called from
networt_send_buffer_plain(). This allows us to recover after network
failures or when collectd was started before the network was available.
Fixes: #627
This moves the socket creation logic so it's called from
networt_send_buffer_plain(). This allows us to recover after network
failures or when collectd was started before the network was available.
Fixes: #627
src/utils_match.[ch]: Implement match_value_reset().
This is called from the curl and memcachec plugins. Previously, gauge
average, minimum and maximum values were calculated since the start of
the daemon, rather than per-interval. This is not the documented
functionality.
Fixes: #663
This is called from the curl and memcachec plugins. Previously, gauge
average, minimum and maximum values were calculated since the start of
the daemon, rather than per-interval. This is not the documented
functionality.
Fixes: #663
curl plugin: Use the utility functions for config handling.
Merge remote-tracking branch 'github/collectd-5.3' into collectd-5.3
src/meta_data.c: If the meta_data_t is empty, avoid calling malloc(0).
src/utils_format_json.c: Handle empty meta_data_t gracefully.
Previously, `meta != NULL` and `keys_num == 0` was possible and would
result in "{}", which is not valid JSON.
Fixes: 716
Previously, `meta != NULL` and `keys_num == 0` was possible and would
result in "{}", which is not valid JSON.
Fixes: 716
python plugin: Don't create empty meta_data_t objects.
Fixes: #716
Fixes: #716
src/utils_rrdcreate.c: Free "args".
Thanks to Yves Mettier for pointing this out!
Fixes: #661
Thanks to Yves Mettier for pointing this out!
Fixes: #661