Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
Pinba plugin: close fd on error
CID #38001
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38001
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'github/pr/1419'
configfile.c: close dir on error
CID #38006
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38006
Signed-off-by: Florian Forster <octo@collectd.org>
turbostat plugin: close fd on error
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
utils_fbhash.c: fix resource leak on error
CID #38014
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38014
Signed-off-by: Florian Forster <octo@collectd.org>
multimeter plugin: fix fd leak
If open returns 0 we leak fd.
CID #38016
Signed-off-by: Florian Forster <octo@collectd.org>
If open returns 0 we leak fd.
CID #38016
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'github/pr/1413'
postgresql plugin: don't exit on malloc failure
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
perl: Check for NULL before dereferencing
CID #38023
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38023
Signed-off-by: Florian Forster <octo@collectd.org>
table plugin: fix check for realloc
We were checking the wrong thing.
CID #38024
Signed-off-by: Florian Forster <octo@collectd.org>
We were checking the wrong thing.
CID #38024
Signed-off-by: Florian Forster <octo@collectd.org>
utils_mount.c: check for null before dereferencing
CID #38025
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38025
Signed-off-by: Florian Forster <octo@collectd.org>
utils_mount.c: check for null before dereferencing
CID #38025
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38025
Signed-off-by: Florian Forster <octo@collectd.org>
zfs_arc plugin: leave enough room for terminating null
CID #38028
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38028
Signed-off-by: Florian Forster <octo@collectd.org>
teamspeak2: fix potential use after close
If connecting to the last host fails, we exit the loop
with a closed fd, which we try to fdopen() later on.
CID #38038
Signed-off-by: Florian Forster <octo@collectd.org>
If connecting to the last host fails, we exit the loop
with a closed fd, which we try to fdopen() later on.
CID #38038
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'github/pr/1403'
processes plugin: plug leak on error
CID #38004
CID #38004
types_list.c: fix two resource leaks
CID #38017
CID #38017
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
git ignore src/daemon/test_utils_time
Add src/daemon/test_utils_time to .gitignore.
Probably forgotten when introducing db1391aaa66b8b8fad82219494f61f3452441f62
Add src/daemon/test_utils_time to .gitignore.
Probably forgotten when introducing db1391aaa66b8b8fad82219494f61f3452441f62
threshold plugin: Register callbacks only once.
Fixes: #551
Signed-off-by: Florian Forster <octo@collectd.org>
Fixes: #551
Signed-off-by: Florian Forster <octo@collectd.org>
df plugin: Fix the duplicate detection.
Not that multiple devices could be mounted at the same mount point ... I think.
Fixes: #1402
Not that multiple devices could be mounted at the same mount point ... I think.
Fixes: #1402
df plugin: skip duplicate entries, fixes "uc_update: Value too old" error
Issue: #1402
Issue: #1402
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().
ceph plugin: Rewrite handling of JSON state.
The previous code didn't handle non-numeric map values correctly,
leaking state and resulting in ridiculously long key strings. This
rewrite fixes this and adds a unit test to ensure that this is actually
working as intended.
Fixes: #1350
The previous code didn't handle non-numeric map values correctly,
leaking state and resulting in ridiculously long key strings. This
rewrite fixes this and adds a unit test to ensure that this is actually
working as intended.
Fixes: #1350
snmp plugin: Use the PRIu8 macro to format uint8_t values.
Merge remote-tracking branch 'github/pr/1397'
vmem plugin: Fix pgsteal for newer Linux kernels.
Fixes: #1307
Fixes: #1307
ceph plugin: Refactor ceph_cb_number().
The previous implementation was very prone to buffer overflows.
Fixes: #1350
The previous implementation was very prone to buffer overflows.
Fixes: #1350
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>
Link collectd-tg with pthreads
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
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/1336' into collectd-5.5
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
memcached plugin: Use a DERIVE type for the "listen disabled" metric.
Fixes: #1356
Fixes: #1356
exec plugin: Revert file mode to 0644.
This fixes a regression from 94e562250296b1435e3e48cd302055d89c4c702b.
This fixes a regression from 94e562250296b1435e3e48cd302055d89c4c702b.
Merge branch 'ff/nagios'
src/daemon/plugin.c: Use sfree() exclusively.
Fixes: #1110
Fixes: #1110
Merge branch 'collectd-5.4' into collectd-5.5
irq plugin: close file descriptor on failure
CID 38018
CID 38018
fhcount plugin: close file descriptor on failure
modbus plugin: fix 2 leaks on error paths
filecount plugin: fix leak on error path
ceph plugin: close fd on error
bind: tmp doesn't point to start of allocated memory
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.
powerdns plugin: fix array initialization
Fix build with older version of libprotobuf-c
gcrypt: take search path into account
gcrypt: remove exec-prefix check
libgcrypt-config --libs already includes the correct library include path.
Also, we hardcoded it to $exec-prefix/lib, which is just plain wrong on
64bit architectures.
libgcrypt-config --libs already includes the correct library include path.
Also, we hardcoded it to $exec-prefix/lib, which is just plain wrong on
64bit architectures.
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.
utils_mount: use reentrant getmntent_r when we can
Fixes #1162
Fixes #1162
Set locale environment variables at startup.
Fixes: #1237
Fixes: #1237
ntp plugin: Unify casting to gauge_t.
Also add note about STA_NANO.
Issue: #1314.
Also add note about STA_NANO.
Issue: #1314.
Fix NTP kerninfo offset/estimated error scaling
cpu plugin: Improve error message for host_processors() failing.
Issue: #22
Issue: #22
rrdtool: unlock mutex on error
CID 37972
Signed-off-by: Florian Forster <octo@collectd.org>
CID 37972
Signed-off-by: Florian Forster <octo@collectd.org>
csv plugin: plug memory leak on error
CID 38015
Signed-off-by: Florian Forster <octo@collectd.org>
CID 38015
Signed-off-by: Florian Forster <octo@collectd.org>
rrdtool: release another lock on error
CID 37973
Signed-off-by: Florian Forster <octo@collectd.org>
CID 37973
Signed-off-by: Florian Forster <octo@collectd.org>
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