processes plugin: plug leak on error
CID #38004
CID #38004
Merge pull request #1404 from rubenk/libcollectdclient-fix-double-close
libcollectdclient: don't close socket twice
libcollectdclient: don't close socket twice
Merge pull request #1406 from rubenk/snmp-uninitialized-read
snmp plugin: don't read from uninitialized pointer
snmp plugin: don't read from uninitialized pointer
snmp plugin: don't read from uninitialized pointer
if the first snmp_pdu_create inside the loop returns an error,
we exit the loop with res uninitialized and then call snmp_free_pdu on it.
CID #38037
if the first snmp_pdu_create inside the loop returns an error,
we exit the loop with res uninitialized and then call snmp_free_pdu on it.
CID #38037
libcollectdclient: don't close socket twice
CID #38039
CID #38039
Merge branch 'pr/1395'
ping plugin: Limit payload to 65487 bytes.
A couple of coding style fixes have also been applied.
A couple of coding style fixes have also been applied.
Merge branch 'pr/846'
write_graphite plugin: Rename "ForceReconnectTimeout" to "ReconnectInterval".
write_graphite plugin: Coding style fixes.
Merge pull request #1391 from rubenk/openvpn
openvpn plugin: Check return value of malloc().
openvpn plugin: Check return value of malloc().
snmp plugin: Use the PRIu8 macro to format uint8_t values.
Merge remote-tracking branch 'github/pr/1397'
GenericJMX plugin: memory leak, indent and compile warn fixes
- call close() on JMXConnector if JMX connection fails; fixes memory leak
- fix indentation errors
- fix "unchecked" compile warnings
- some refactoring
- call close() on JMXConnector if JMX connection fails; fixes memory leak
- fix indentation errors
- fix "unchecked" compile warnings
- some refactoring
snmp: accept to use IpAddress for instances
Some interesting MIB are indexed with an IP address (for example,
BGP4-MIB). Make collectd able to use those indexes as instances. Format
the IP as string. IPv6 are usually encoded as Octet String, so, they
should be already supported.
Signed-off-by: Vincent Bernat <vincent@bernat.im>
Some interesting MIB are indexed with an IP address (for example,
BGP4-MIB). Make collectd able to use those indexes as instances. Format
the IP as string. IPv6 are usually encoded as Octet String, so, they
should be already supported.
Signed-off-by: Vincent Bernat <vincent@bernat.im>
Merge branch 'ff/statsd'
Merge branch 'pr/1394'
varnish plugin: Fix implicit cast from int to bool.
Also revert the inclusion of <stdbool.h> as per our coding guidelines.
The native C99 _Bool is used instead.
Also revert the inclusion of <stdbool.h> as per our coding guidelines.
The native C99 _Bool is used instead.
utils_time.[ch]: Control mocking by preprocessor define.
This allows us to test rfc3339() while mocking out cdtime().
This allows us to test rfc3339() while mocking out cdtime().
src/daemon/utils_time.[ch]: Create RFC 3339 strings.
RFC 3339 is a "profile" of ISO 8601, i.e. (almost) all valid RFC 3339
strings are also valid ISO 8601 strings.
RFC 3339 is a "profile" of ISO 8601, i.e. (almost) all valid RFC 3339
strings are also valid ISO 8601 strings.
Merge pull request #1293 from mfournier/read-threads-timing
Read threads timing
Read threads timing
GenericJMX plugin: fix indentation/bracket error
1e2ad9c0 contained a mistake which resulted in the following build
error. It seems to be a bad copy-paste when creating #1330 from the
patch in #1291.
```
./org/collectd/java/GenericJMXConfValue.java:535: error: variable tmp is already defined in constructor GenericJMXConfValue(OConfigItem)
String tmp = getConfigString (child);
```
1e2ad9c0 contained a mistake which resulted in the following build
error. It seems to be a bad copy-paste when creating #1330 from the
patch in #1291.
```
./org/collectd/java/GenericJMXConfValue.java:535: error: variable tmp is already defined in constructor GenericJMXConfValue(OConfigItem)
String tmp = getConfigString (child);
```
Allow Size 0 in ping plugin, and fix minor style issues there
Add config option "Size" to ping plugin
Cleaning conditional directives that break statements.
collectd-java(5): Document the new "PluginName" option.
GenericJMX plugin: Implement the "PluginName" config option.
Issue: #1291
Signed-off-by: Florian Forster <octo@collectd.org>
Issue: #1291
Signed-off-by: Florian Forster <octo@collectd.org>
GenericJMX plugin: Support TabularData for java.lang:type=GarbageCollector.
Issue: #1290
Signed-off-by: Florian Forster <octo@collectd.org>
Issue: #1290
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'github/pr/1370'
RPM specfile: include new notify_nagios plugin in package
fixed typo
fixed metric lost on forced reconnects because of data buffer reset
added new ForceReconnectTimeout to write_graphite plugin
Merge branch 'ff/nagios'
src/daemon/plugin.c: Use sfree() exclusively.
Fixes: #1110
Fixes: #1110
src/ceph_test.c: Use the EXPECT_EQ_STR() macro.
Merge branch 'collectd-5.5'
ceph plugin: Rewrite parse_keys() and compact_ds_name().
This rewrite removes the logic to add the original length to the end of
the buffer in case of truncation. This logic was guarded by:
tmp[DATA_MAX_NAME_LEN - 1] = '\0';
if(strlen(tmp) > DATA_MAX_NAME_LEN - 1) { ... }
and was therefore dead code.
Fixes: #1350
This rewrite removes the logic to add the original length to the end of
the buffer in case of truncation. This logic was guarded by:
tmp[DATA_MAX_NAME_LEN - 1] = '\0';
if(strlen(tmp) > DATA_MAX_NAME_LEN - 1) { ... }
and was therefore dead code.
Fixes: #1350
ceph plugin: Add unit test for parse_keys().
This is used to demonstrate a buffer overflow: when the first part of a
key is >63 characters, key_chars_remaining underflows and causes a buffer
overflow in the following iteration.
Issue: #1350
This is used to demonstrate a buffer overflow: when the first part of a
key is >63 characters, key_chars_remaining underflows and causes a buffer
overflow in the following iteration.
Issue: #1350
Merge pull request #1388 from rubenk/curl_json
curl_json: remove dead code
curl_json: remove dead code
Merge pull request #1386 from rubenk/rrdtool-unlock-on-error
rrdtool: unlock mutex on error
rrdtool: unlock mutex on error
Merge pull request #1387 from rubenk/redis-null-terminate-buffer
redis plugin: make sure buffer is null-terminated
redis plugin: make sure buffer is null-terminated
curl_json: remove dead code
CID 37963
CID 37963
Merge pull request #1389 from rubenk/perl-unlock-on-error
perl: unlock mutex on error
perl: unlock mutex on error
Merge pull request #1385 from rubenk/gcrypt-fix
configure.ac: remove wrong gcrypt check
configure.ac: remove wrong gcrypt check
openvpn: free resource on error
openvpn: fix error message
openvpn: check return value of malloc
CID 37987
CID 37987
perl: unlock mutex on error
CID 37970
CID 37970
redis plugin: make sure buffer is null-terminated
CID 37938
CID 37938
rrdtool: unlock mutex on error
CID 37972
CID 37972
Merge pull request #1384 from rubenk/irq-close-file-descriptor-on-failure
irq plugin: close file descriptor on failure
irq plugin: close file descriptor on failure
Merge pull request #1383 from rubenk/fhcount-close-file-descriptor-on-failure
fhcount plugin: close file descriptor on failure
fhcount plugin: close file descriptor on failure
Merge pull request #1382 from rubenk/modbus-fix-resource-leaks
modbus plugin: fix 2 leaks on error paths
modbus plugin: fix 2 leaks on error paths
Merge pull request #1381 from rubenk/filecount-fix-resource-leak
filecount plugin: fix leak on error path
filecount plugin: fix leak on error path
configure.ac: remove wrong gcrypt check
After all the effort to detect GCRYPT_CPPFLAGS and GCRYPT_LIBS
in previous checks, this check blindly overwrites them, even
if the AM_PATH_LIBGCRYPT macro isn't found.
Also, I think it's better to check for specific functionality in a library
than an explicit minimum version, which we already did.
After all the effort to detect GCRYPT_CPPFLAGS and GCRYPT_LIBS
in previous checks, this check blindly overwrites them, even
if the AM_PATH_LIBGCRYPT macro isn't found.
Also, I think it's better to check for specific functionality in a library
than an explicit minimum version, which we already did.
irq plugin: close file descriptor on failure
CID 38018
CID 38018
fhcount plugin: close file descriptor on failure
filecount plugin: fix leak on error path
modbus plugin: fix 2 leaks on error paths
Merge pull request #1380 from rubenk/csv-plug-leak-on-error-path
Csv plug leak on error path
Csv plug leak on error path
Merge pull request #1379 from rubenk/ceph-close-fd-on-error
ceph plugin: close fd on error
ceph plugin: close fd on error
Merge pull request #1378 from rubenk/bind-dont-free-invalid-pointer
bind: tmp doesn't point to start of allocated memory
bind: tmp doesn't point to start of allocated memory
Merge pull request #1377 from rubenk/mqtt-fix-out-of-bounds-write
mqtt: fix an out-of-bounds write
mqtt: fix an out-of-bounds write
Merge pull request #1376 from rubenk/amqp-fix-buffer-size
amqp: use the right buffer size for sstrncpy
amqp: use the right buffer size for sstrncpy
Merge pull request #1375 from rubenk/redis-unlock-lock
write_redis: don't return with lock held
write_redis: don't return with lock held
Merge pull request #1374 from rubenk/powerdns-fix-array-initialization
powerdns plugin: fix array initialization
powerdns plugin: fix array initialization
csv plugin: remove trailing whitespace
csv plugin: plug memory leak on error
CID 38015
CID 38015
ceph plugin: close fd on error
bind: tmp doesn't point to start of allocated memory
mqtt: fix an out-of-bounds write
CID 37990
CID 37990
amqp: use the right buffer size for sstrncpy
buffer is a char *, not an array, so size_of returns the size
of the pointer.
buffer is a char *, not an array, so size_of returns the size
of the pointer.
write_redis: don't return with lock held
powerdns plugin: fix array initialization
Merge pull request #1371 from rubenk/mqtt-plug-leak
mqtt: plug leak on error path
mqtt: plug leak on error path
Fix build with older version of libprotobuf-c
Revert "Set bugreport url and homepage url"
The net-snmp public headers are generated by autoconf
so they also define PACKAGE_URL (and lots more).
Apparently this is completely normal and documented at
http://www.net-snmp.org/tutorial/tutorial-5/toolkit/autoconf/index.html
This reverts commit e16e805eae42f911a6f9ab81420fcaf1a957810f.
The net-snmp public headers are generated by autoconf
so they also define PACKAGE_URL (and lots more).
Apparently this is completely normal and documented at
http://www.net-snmp.org/tutorial/tutorial-5/toolkit/autoconf/index.html
This reverts commit e16e805eae42f911a6f9ab81420fcaf1a957810f.
Merge pull request #1199 from rubenk/remove-gcrypt-exec-prefix-check
Remove gcrypt exec prefix check
Remove gcrypt exec prefix check
Merge pull request #1210 from rubenk/protoc
Protoc
Protoc
mqtt: plug leak on error path
Merge pull request #958 from rubenk/fix-version-gen-sh
Only run git describe when we're in a git repo
Only run git describe when we're in a git repo
Only run git describe when we're in a git repo
This fixes an issue I see when extracting a collectd
tarball into another git repo (the Fedora collectd rpm one).
In that case version-gen.sh picked up the last tag from the Fedora
repo, which is the wrong one.
This fixes an issue I see when extracting a collectd
tarball into another git repo (the Fedora collectd rpm one).
In that case version-gen.sh picked up the last tag from the Fedora
repo, which is the wrong one.
Merge pull request #1219 from rubenk/version-gen
Some more version-gen.sh tweaks
Some more version-gen.sh tweaks
Merge pull request #1220 from rubenk/set-package-bugreport-and-homepage
Set bugreport url and homepage url
Set bugreport url and homepage url
protoc: check for headers in new location as well
Newer versions of protobuf-c have their headers in
/usr/include/protobuf-c, and a symlink from
/usr/include/google/protobuf-c/.
These symlinks will eventually disappear however, so be prepared.
Newer versions of protobuf-c have their headers in
/usr/include/protobuf-c, and a symlink from
/usr/include/google/protobuf-c/.
These symlinks will eventually disappear however, so be prepared.
protoc: check for libprotobuf-c as well
protoc: simplify configure check
protoc: slightly nicer output in silent mode
make[1]: Entering directory '/home/ruben/src/collectd/src'
PROTOC-C pinba.pb-c.c
PROTOC-C riemann.pb-c.c
make[1]: Entering directory '/home/ruben/src/collectd/src'
PROTOC-C pinba.pb-c.c
PROTOC-C riemann.pb-c.c
protoc: log when compiler is missing
In the case where we do have the required headers
but don't have the compiler, this makes it more clear
that we're missing the latter.
In the case where we do have the required headers
but don't have the compiler, this makes it more clear
that we're missing the latter.
Silence protoc-c in silence mode
Instead of showing the full command line, this shows:
GEN pinba.pb-c.c
GEN riemann.pb-c.c
Instead of showing the full command line, this shows:
GEN pinba.pb-c.c
GEN riemann.pb-c.c
write_riemann: only compile .proto files when enabled
If the write_riemann plugin is not enabled there's no
need to compile the protobuf files.
If the write_riemann plugin is not enabled there's no
need to compile the protobuf files.
Pinba: only compile .proto files when enabled
If the pinba plugin is not enabled there's no
need to compile the protobuf files.
If the pinba plugin is not enabled there's no
need to compile the protobuf files.
write_kafka: fix indentation
It was all over the place.
I went with 4 spaces since that's what the majority
of code used.
It was all over the place.
I went with 4 spaces since that's what the majority
of code used.
Merge remote-tracking branch 'github/pr/1366'
snmp plugin: plug leak in error path.
Partial back port of #1368.
Signed-off-by: Florian Forster <octo@collectd.org>
Partial back port of #1368.
Signed-off-by: Florian Forster <octo@collectd.org>
Travis: switch to new Trusty environment
https://docs.travis-ci.com/user/trusty-ci-environment
https://docs.travis-ci.com/user/trusty-ci-environment
statsd plugin: Implement the "CounterSum" option.
Issues: #929, #1282, #1311
Issues: #929, #1282, #1311
Merge branch 'pr/1345'