gmond plugin: Check return value of sendto(2).
CID: 38113
CID: 38113
gmond plugin: Check return value of setsockopt(2).
CID: 38112
CID: 38112
configure.ac: warn when pkg-config is not installed
It hasn't been optional for a while now.
Fixes:
checking for rrd.h... no
./configure: 25157: Syntax error: word unexpected (expecting ")")
Signed-off-by: Florian Forster <octo@collectd.org>
It hasn't been optional for a while now.
Fixes:
checking for rrd.h... no
./configure: 25157: Syntax error: word unexpected (expecting ")")
Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_ignorelist.c: Refactoring / code style fixes.
One of the goals was to remove uses of smalloc().
One of the goals was to remove uses of smalloc().
swap plugin: don't exit when malloc fails
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
curl_json plugin: Rewrite logic to add a path to db->tree.
CID: 37991
CID: 37991
curl_xml plugin: Correctly free xpath object.
CID: 37993
Signed-off-by: Florian Forster <octo@collectd.org>
CID: 37993
Signed-off-by: Florian Forster <octo@collectd.org>
ping plugin: Protect access to ping_thread_error.
This is primarily to make Coverity happy.
CID: 37976
This is primarily to make Coverity happy.
CID: 37976
ping plugin: Remove "static" from local variable.
This caused Coverity to see concurrency issues where there are none.
CID: 37934
This caused Coverity to see concurrency issues where there are none.
CID: 37934
rrdtool plugin: Improve handling of the "DataDir" option.
CID: 37977
CID: 37977
python plugin: Check return value of cpy_unicode_or_bytes_to_string().
CID: 37984
CID: 37984
python plugin: Check return value of malloc().
CID: 37981, 37982, 37983
CID: 37981, 37982, 37983
python plugin: Fix memory leak.
The regiser_read / register_write functions assume a user_data_t*
pointing to static memory and will not store / free the pointer.
CID: 38002
The regiser_read / register_write functions assume a user_data_t*
pointing to static memory and will not store / free the pointer.
CID: 38002
tail plugin: Fix memory leak.
CID: 38013
CID: 38013
postgresql plugin: Register a new user data pointer with udb_query_set_user_data() unconditionally.
CID: 38019
CID: 38019
email plugin: Refactor the accept() loop.
This removes the assumption that accept() returning a socket (success)
implies that errno is not equal to EINTR. This is probably a reasonable
assumption, but trips up Coverity may be a bit hard to read.
CID: 38009
This removes the assumption that accept() returning a socket (success)
implies that errno is not equal to EINTR. This is probably a reasonable
assumption, but trips up Coverity may be a bit hard to read.
CID: 38009
email plugin: Free "connection" in error handling.
CID: 38010
CID: 38010
postgresql plugin: Remove invalid free().
CID: 37936
CID: 37936
src/collectd-tg.c: Explicitly null-terminate string.
CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_format_json.c: Make sure "keys" is freed in all error paths.
CID: 38008
CID: 38008
sigrok plugin: don't pass status to strerror
CID #38120
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38120
Signed-off-by: Florian Forster <octo@collectd.org>
multimeter plugin: Initizliaze "struct termios".
CID: 38036
CID: 38036
configure.ac: fix previous change to detect libjvm
This worked on OSX but failed on Linux.
Signed-off-by: Florian Forster <octo@collectd.org>
This worked on OSX but failed on Linux.
Signed-off-by: Florian Forster <octo@collectd.org>
meta_data.c: check return value of md_entry_alloc
CID #37986
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37986
Signed-off-by: Florian Forster <octo@collectd.org>
iptables plugin: remove dead code
ip version is either IPv4 or IPv6
CID #37962
Signed-off-by: Florian Forster <octo@collectd.org>
ip version is either IPv4 or IPv6
CID #37962
Signed-off-by: Florian Forster <octo@collectd.org>
src/filter_chain.c: Refactor fc_process_chain() a wee bit.
src/filter_chain.c: Delete dead code.
CID: 37961
CID: 37961
src/common.c: Check arguments of parse_values().
CID: 37965
CID: 37965
libcollectdclient: Check return value of setsockopt().
Coverity CID 37944.
Signed-off-by: Florian Forster <octo@collectd.org>
Coverity CID 37944.
Signed-off-by: Florian Forster <octo@collectd.org>
configure.ac: fix libjvm detection on OSX
Shared libraries have the extension .dylib instead of .so
Ideally we look at shrext_cmds from libtool to find the shared library
extension but this works too.
Signed-off-by: Florian Forster <octo@collectd.org>
Shared libraries have the extension .dylib instead of .so
Ideally we look at shrext_cmds from libtool to find the shared library
extension but this works too.
Signed-off-by: Florian Forster <octo@collectd.org>
unixsock: check return value of chmod
CID #37948
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37948
Signed-off-by: Florian Forster <octo@collectd.org>
bind plugin: plug small leak
CID #37992
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37992
Signed-off-by: Florian Forster <octo@collectd.org>
curl_xml plugin: plug a few leaks on error
CID #37993
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37993
Signed-off-by: Florian Forster <octo@collectd.org>
stats plugin: close fd on error
CID #37995
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37995
Signed-off-by: Florian Forster <octo@collectd.org>
utils_cache.c: plug leak on error
CID #38000
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38000
Signed-off-by: Florian Forster <octo@collectd.org>
Aggregration plugin: plug leak on error
CID #38005
Signed-off-by: Florian Forster <octo@collectd.org>
CID #38005
Signed-off-by: Florian Forster <octo@collectd.org>
varnish plugin: fix two resource leaks on error
CID #42774
Signed-off-by: Florian Forster <octo@collectd.org>
CID #42774
Signed-off-by: Florian Forster <octo@collectd.org>
libcollectdclient: free result of getaddrinfo
CID #37997
Signed-off-by: Florian Forster <octo@collectd.org>
CID #37997
Signed-off-by: Florian Forster <octo@collectd.org>
madwifi: make code a little bit clearer
buf2 is initialized to zero, readlink
will write at most sizeof(buf2) -1 bytes,
so the trailing null should not be overwritten.
Coverity doesn't see that, rewrite the code
differently so it does.
CID #38027
Signed-off-by: Florian Forster <octo@collectd.org>
buf2 is initialized to zero, readlink
will write at most sizeof(buf2) -1 bytes,
so the trailing null should not be overwritten.
Coverity doesn't see that, rewrite the code
differently so it does.
CID #38027
Signed-off-by: Florian Forster <octo@collectd.org>
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>
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>
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>
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>
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>
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
vmem plugin: Fix pgsteal for newer Linux kernels.
Fixes: #1307
Fixes: #1307
Link collectd-tg with pthreads
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
irq plugin: close file descriptor on failure
CID 38018
CID 38018
modbus plugin: fix 2 leaks on error paths
filecount plugin: fix leak on error path
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
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>
the swrite interface is 'non-zero'
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
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>
processes.c: plug memory leak in error path
Found with Infer (http://fbinfer.com/)
Signed-off-by: Florian Forster <octo@collectd.org>
Found with Infer (http://fbinfer.com/)
Signed-off-by: Florian Forster <octo@collectd.org>
c_avl_pick needs to update the 'size' field of the tree when it deletes
a node.
Signed-off-by: Florian Forster <octo@collectd.org>
a node.
Signed-off-by: Florian Forster <octo@collectd.org>
Remove duplicate call to pthread_mutex_destroy.
statsd plugin: Correctly free metrics at shutdown.
The previous shutdown handler leaked "timer" and "set" metrics. This is
not a huge problem in itself, as the daemon is exiting shortly after
anyway, but it makes debugging of memory leaks very hard.
Issue: #997
The previous shutdown handler leaked "timer" and "set" metrics. This is
not a huge problem in itself, as the daemon is exiting shortly after
anyway, but it makes debugging of memory leaks very hard.
Issue: #997
apache plugin: DRY: use macro to determine number of fields.
apache: parse whole response, not only the first 16 lines
mod_status recently started reporting more statistics. According to
http://www.apache.org/dist/httpd/CHANGES_2.4 `mod_proxy, mod_ssl,
mod_cache_socache, mod_socache_*: Support machine readable server-status
produced when using the "?auto" query string.` for version 2.4.13
onwards.
As we can't assume everything we need will be included in the first 16
lines of output anymore, we now simply scan through the whole output.
mod_status recently started reporting more statistics. According to
http://www.apache.org/dist/httpd/CHANGES_2.4 `mod_proxy, mod_ssl,
mod_cache_socache, mod_socache_*: Support machine readable server-status
produced when using the "?auto" query string.` for version 2.4.13
onwards.
As we can't assume everything we need will be included in the first 16
lines of output anymore, we now simply scan through the whole output.
Remove POLLRDNORM (equivalent to POLLIN)
Checking for closed peer connection before send
Fix clang complaining about extraneous parenthesis.
ASN_GAUGE (SNMP-SMIv2 Gauge32) is unsigned, not signed.
Start write threads after plugin initialization.
Some plugins such as "network" create own threads from within their
init callbacks which can then start submitting data to the queue
right away, even if the read threads haven't been started yet.
If write threads are started before plugin initialization, this can
result in a race where a plugin's write callback gets called before
that plugin's init callback has completed.
To fix this, delay starting the write threads until after all plugins
have been initialized.
Some plugins such as "network" create own threads from within their
init callbacks which can then start submitting data to the queue
right away, even if the read threads haven't been started yet.
If write threads are started before plugin initialization, this can
result in a race where a plugin's write callback gets called before
that plugin's init callback has completed.
To fix this, delay starting the write threads until after all plugins
have been initialized.
statsd: provide a gauge for counters, holding the absolute count.
When not using StoreRates false, this allows statsd aggregators
to hold on to the absolute count, if needed.
When not using StoreRates false, this allows statsd aggregators
to hold on to the absolute count, if needed.
apcups: prefix plugin name in INFO and DEBUG statements
Fixes #1329
Fixes #1329
write_redis: remove unused variable from wr_write()
collectd.conf.pod: correct a small typo
Fix a few typos in collectd-exec(5)
processes: correctly count processes on FreeBSD
because actually we count threads instead of processes
(partial backport of 85c31a6d66 for collectd-5.4 /mf)
because actually we count threads instead of processes
(partial backport of 85c31a6d66 for collectd-5.4 /mf)
python: Fix double-free bug.
gmond: fix linking against libganglia at build time
Current versions of libganglia don't ship the ganglia-config utility
anymore. Change the configure script to not expect it to be in $PATH and
provide sensible defaults instead.
Fix #1129
Current versions of libganglia don't ship the ganglia-config utility
anymore. Change the configure script to not expect it to be in $PATH and
provide sensible defaults instead.
Fix #1129
mysql: use mysql_config --include for include path
According to the mysql_config manpage, --cflags shows the
compiler flags the library was compiled with. We certainly don't
want to use those.
According to the mysql_config manpage, --cflags shows the
compiler flags the library was compiled with. We certainly don't
want to use those.
mysql: just search for mysql_get_server_version
If we found that symbol, assume we also found mysql_init.
If we found that symbol, assume we also found mysql_init.