Ruben Kerkhof [Sat, 13 Aug 2016 17:21:21 +0000 (19:21 +0200)]
Merge pull request #1887 from rubenk/make-xfs-optional
Add an option to disable building with XFS support
Ruben Kerkhof [Sat, 13 Aug 2016 16:51:55 +0000 (18:51 +0200)]
liboconfig: make function static
Ruben Kerkhof [Sat, 13 Aug 2016 16:45:10 +0000 (18:45 +0200)]
configfile.h: remove unused declaration
Ruben Kerkhof [Sat, 13 Aug 2016 15:36:48 +0000 (17:36 +0200)]
Stop using net-snmp-config to detect libnetsmp
net-snmp-config returns the settings used to compile and link
libnetsnmp, not the settings needed to compile and link code against it.
This resulted in various issues, namely overlinking, failure to compile
without compiler optimisations, and overriding of our compiler flags.
One example is the following, just noticed on RHEL5:
cc1: warnings being treated as errors
snmp.c: In function 'csnmp_config_add_host':
snmp.c:767: warning: ISO C90 forbids mixed declarations and code
make[3]: *** [snmp_la-snmp.lo] Error 1
We do compile in C99 mode, but net-snmp-config adds
-Wdeclaration-after-statement to our build command line. The GCC on
RHEL5 returns a warning, while later GCCs just ignore this.
Ruben Kerkhof [Sat, 13 Aug 2016 14:34:37 +0000 (16:34 +0200)]
collectdmon: define PREFIX and LOCALSTATEDIR
Not an issue in practice, but this helps when running the code through
lint.
Ruben Kerkhof [Sat, 13 Aug 2016 14:27:47 +0000 (16:27 +0200)]
collectdctl: prefix may be undefined as well
This won't happen in practice since ./configure sets it, but it isn't
set when running the code through lint.
Ruben Kerkhof [Sat, 13 Aug 2016 14:25:06 +0000 (16:25 +0200)]
ceph plugin: just continue
Ruben Kerkhof [Sat, 13 Aug 2016 14:21:32 +0000 (16:21 +0200)]
barometer plugin: add missing include
Ruben Kerkhof [Sat, 13 Aug 2016 14:21:01 +0000 (16:21 +0200)]
collectctl: define LOCALSTATEDIR if not defined
Ruben Kerkhof [Sat, 13 Aug 2016 13:58:04 +0000 (15:58 +0200)]
write_log plugin: mark unused attribute as unused
Ruben Kerkhof [Sat, 13 Aug 2016 13:55:39 +0000 (15:55 +0200)]
treewide: use designated initializers for user_data
Ruben Kerkhof [Sat, 13 Aug 2016 13:23:27 +0000 (15:23 +0200)]
openldap plugin: replace comma with semicolon
This incidentally worked, but it is not a good idea.
Ruben Kerkhof [Sat, 13 Aug 2016 11:23:34 +0000 (13:23 +0200)]
Add an option to disable building with XFS support
Right now, if you have the xfs development headers installed,
they will be picked up. Add an option to disable this behaviour.
Fixes #1878
Ruben Kerkhof [Sat, 13 Aug 2016 09:39:29 +0000 (11:39 +0200)]
zone plugin: fix typo in error message
Ruben Kerkhof [Sat, 13 Aug 2016 09:28:36 +0000 (11:28 +0200)]
collectd.conf(5): add Host option for curl_json
Ruben Kerkhof [Sat, 13 Aug 2016 09:13:13 +0000 (11:13 +0200)]
configure.ac: check for ExtUtils::MakeMaker
The perl bindings need this module so perl can generate Makefile.pl.
Fixes #1886
Ruben Kerkhof [Fri, 12 Aug 2016 11:15:28 +0000 (13:15 +0200)]
Merge pull request #900 from ccin2p3/faxmodem/cpu-numcpu
implement reporting of ncpu
Fᴀʙɪᴇɴ Wᴇʀɴʟɪ [Fri, 12 Aug 2016 11:04:00 +0000 (13:04 +0200)]
address @octo and @rubenk's comments
Change-Id: I5661a555d95227e63b3c873a0fd0b2360a040342
Ruben Kerkhof [Fri, 12 Aug 2016 09:22:37 +0000 (11:22 +0200)]
Merge pull request #1873 from rubenk/fix-duplicate-label_t
Work around Solaris 10 defining label_t
Ruben Kerkhof [Fri, 12 Aug 2016 08:58:59 +0000 (10:58 +0200)]
Merge pull request #1875 from rubenk/remove-configfile-h-from-plugins
Remove configfile.h from plugins
Sebastian Harl [Thu, 11 Aug 2016 20:51:50 +0000 (22:51 +0200)]
Merge pull request #1876 from octo/issue/1819
grpc plugin: Refactor plugin.
Ruben Kerkhof [Thu, 11 Aug 2016 16:40:40 +0000 (18:40 +0200)]
Merge branch 'collectd-5.5'
Ruben Kerkhof [Thu, 11 Aug 2016 15:45:48 +0000 (17:45 +0200)]
Merge branch 'collectd-5.4' into collectd-5.5
Ruben Kerkhof [Thu, 11 Aug 2016 15:44:42 +0000 (17:44 +0200)]
md: fix deprecation warning with latest glibc
md.c: In function ‘md_process’:
md.c:120:3: warning: ‘__makedev_from_sys_types’ is deprecated:
In the GNU C Library, `makedev' is defined by <sys/sysmacros.h>.
For historical compatibility, it is currently defined by
<sys/types.h> as well, but we plan to remove this soon.
To use `makedev', include <sys/sysmacros.h> directly.
If you did not intend to use a system-defined macro `makedev',
you should #undef it after including <sys/types.h>.
[-Wdeprecated-declarations]
if (st.st_rdev != makedev (MD_MAJOR, minor))
^~
In file included from /usr/include/features.h:397:0,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from ./daemon/collectd.h:34,
from md.c:22:
Ruben Kerkhof [Thu, 11 Aug 2016 15:14:54 +0000 (17:14 +0200)]
common.c: fix calloc arguments order
Florian Forster [Thu, 11 Aug 2016 15:10:13 +0000 (17:10 +0200)]
Merge remote-tracking branch 'github/pr/1530'
Fabien Wernli [Tue, 20 Jan 2015 14:21:06 +0000 (15:21 +0100)]
implement reporting of ncpu
Change-Id: Ia305b74139352f16f71b1f747875d6c7a0c376a4
David Gibson [Wed, 10 Aug 2016 10:07:14 +0000 (20:07 +1000)]
Fix conceptual buglet in default_callback
The 'DERIVE' path in default_callback() increments the 'counter' field of
value instead of the 'derive' field. Since those fields have the same
type and offset within the value union this will still work fine, but
AFAICT it's conceptually incorrect. This corrects it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Florian Forster <octo@collectd.org>
Florian Forster [Thu, 11 Aug 2016 06:34:31 +0000 (08:34 +0200)]
proto/collectd.proto: Improve documentation.
DispatchValues' documentation is now written from the POV of the server,
not the caller as it was previously worded.
Florian Forster [Thu, 11 Aug 2016 05:53:10 +0000 (07:53 +0200)]
grpc plugin: Rename "err" to "status".
Pavel Rochnyack [Sun, 20 Mar 2016 09:43:36 +0000 (15:43 +0600)]
statsd, utils_latency: allow to reduce bin width
Marc Fournier [Wed, 10 Aug 2016 20:42:23 +0000 (22:42 +0200)]
src/daemon/common.c: avoid leaking cap_header in error condition
Marc Fournier [Wed, 10 Aug 2016 16:14:35 +0000 (18:14 +0200)]
src/daemon/common.c: avoid using private structs from <linux/capability.h>
Marc Fournier [Wed, 10 Aug 2016 16:12:54 +0000 (18:12 +0200)]
turbostat: avoid potential unused variable
Marc Fournier [Wed, 10 Aug 2016 16:12:10 +0000 (18:12 +0200)]
fix typographical mistake in warning message
Ruben Kerkhof [Wed, 10 Aug 2016 15:17:57 +0000 (17:17 +0200)]
swap plugin: fix leak on error
Ruben Kerkhof [Wed, 10 Aug 2016 14:03:20 +0000 (16:03 +0200)]
write_sensu plugin: fix build on OpenBSD
time_t is a long long on OpenBSD
Ruben Kerkhof [Wed, 10 Aug 2016 14:02:54 +0000 (16:02 +0200)]
chrony plugin: fix build on OpenBSD
time_t is a long long on OpenBSD
Florian Forster [Wed, 10 Aug 2016 12:46:24 +0000 (14:46 +0200)]
proto/*.proto: Reformat using clang-format.
Florian Forster [Wed, 10 Aug 2016 12:42:59 +0000 (14:42 +0200)]
grpc plugin: Move all functions to a single service again.
Florian Forster [Tue, 2 Aug 2016 12:15:45 +0000 (14:15 +0200)]
grpc plugin: Switch to the synchronous interface.
Florian Forster [Fri, 29 Jul 2016 09:24:42 +0000 (11:24 +0200)]
proto/*.proto: Add the go_package option.
Florian Forster [Tue, 2 Aug 2016 06:14:24 +0000 (08:14 +0200)]
grpc plugin: Turn QueryValues into a server-side streaming RPC.
Florian Forster [Wed, 10 Aug 2016 12:43:42 +0000 (14:43 +0200)]
Build system: set CPPFLAGS when checking for <grpc++/grpc++.h>
Ruben Kerkhof [Wed, 10 Aug 2016 11:04:27 +0000 (13:04 +0200)]
common.c: fix compilation on OpenBSD
cc1: warnings being treated as errors
common.c: In function 'set_sock_opts':
common.c:1572: warning: unused variable 'tcp_keepintvl'
common.c:1571: warning: unused variable 'tcp_keepidle'
*** Error 1 in target 'common.lo'
*** Error 1 in src/daemon (Makefile:1048 'common.lo': @echo " CC " common.lo;depbase=`echo common.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$|...)
*** Error 1 in src (Makefile:5007 'all-recursive')
*** Error 2 in src (Makefile:3284 'all')
*** Error 1 in /root/src/collectd (Makefile:611 'all-recursive')
Ruben Kerkhof [Wed, 10 Aug 2016 09:01:41 +0000 (11:01 +0200)]
Ignore cscope files
Ruben Kerkhof [Wed, 10 Aug 2016 08:26:45 +0000 (10:26 +0200)]
Remove configfile.h from plugins
It is already included by collectd.h
Marc Fournier [Tue, 17 May 2016 05:36:34 +0000 (07:36 +0200)]
check_capability: explicitly target recent linux implementations
There are several, incompatible, capabilities implementations, all
exposed through `<sys/capability.h>`. Currently only Linux's V3
function and capability sets are supported.
This patch guards against using Linux-specific functions & capabilities
on other implementations, while structring the code to allow adding
support for them.
Marc Fournier [Tue, 10 May 2016 16:01:49 +0000 (18:01 +0200)]
iptables: include libiptc headers before capability.h
Some versions of sys/capability.h seem to have conflicting declarations
with other (linux) kernel header files, so order matters.
Marc Fournier [Tue, 26 Jan 2016 20:46:59 +0000 (21:46 +0100)]
check and warn about capabilities misconfiguration
Add WARNING() statements to a bunch of plugins which require special
privileges to work properly. They would be emitted once at startup time,
if running as root with privileges dropped, or if running as a normal
users without the needed capabilities explicitly set.
Related to #1444
Marc Fournier [Tue, 26 Jan 2016 17:30:17 +0000 (18:30 +0100)]
turbostat plugin: use check_capability() function
Marc Fournier [Tue, 26 Jan 2016 17:14:09 +0000 (18:14 +0100)]
src/daemon/common.[ch]: add check_capability() function
This is largely inspired by the capability check done in
src/turbostat.c, so most of the credits go to Vincent Brillault.
Florian Forster [Tue, 9 Aug 2016 19:46:21 +0000 (21:46 +0200)]
mysql plugin: Remove trailing whitespace.
Brian Lalor [Thu, 3 Sep 2015 22:41:21 +0000 (18:41 -0400)]
Allow MySQL to use SSL connections
Marc Fournier [Tue, 9 Aug 2016 14:55:03 +0000 (16:55 +0200)]
Merge pull request #1549 from mfournier/socket-keepalive
Enable TCP socket keepalive on write plugins
Marc Fournier [Tue, 9 Aug 2016 12:40:36 +0000 (14:40 +0200)]
collectd.spec: add missing %define required by gps plugin
Ruben Kerkhof [Tue, 9 Aug 2016 11:57:36 +0000 (13:57 +0200)]
collectdctl.c: fix two compiler warnings
collectdctl.c: In function ‘flush’:
collectdctl.c:315:21: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
for (int i = 0; i < plugins_num; ++i) {
^
collectdctl.c:323:25: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
for (int j = 0; j < identifiers_num; ++j) {
^
Ruben Kerkhof [Tue, 9 Aug 2016 11:51:46 +0000 (13:51 +0200)]
gps plugin: fix compiler warning
gps.c:242:12: warning: function declaration isn’t a prototype
[-Wstrict-prototypes]
static int cgps_read ()
^~~~~~~~~
gps.c: In function ‘cgps_read’:
gps.c:242:12: warning: old-style function definition
[-Wold-style-definition]
Ruben Kerkhof [Tue, 9 Aug 2016 11:51:02 +0000 (13:51 +0200)]
utils_db_query.c: fix compiler warning
utils_db_query.c: In function ‘udb_result_submit’:
utils_db_query.c:259:11: warning: declaration of ‘status’ shadows a
previous local [-Wshadow]
int status = strjoin (vl.type_instance, sizeof
(vl.type_instance),
^~~~~~
Marc Fournier [Tue, 9 Aug 2016 11:15:15 +0000 (13:15 +0200)]
collectd.spec: add gps plugin
Marc Fournier [Tue, 9 Aug 2016 11:14:04 +0000 (13:14 +0200)]
Merge remote-tracking branch 'origin/pr/1346'
Conflicts:
README
configure.ac
src/Makefile.am
src/collectd.conf.in
src/collectd.conf.pod
src/types.db
Ruben Kerkhof [Tue, 9 Aug 2016 10:57:21 +0000 (12:57 +0200)]
Work around Solaris 10 defining label_t
Solaris 10 defines label_t in /usr/include/sys/machtypes.h,
unless POSIX_C_SOURCE is defined, or when __EXTENSIONS__ is defined.
Fixes #1301
Marc Fournier [Sat, 13 Feb 2016 11:29:37 +0000 (12:29 +0100)]
write_tsdb: enable TCP keepalive on network socket
Marc Fournier [Sat, 13 Feb 2016 11:29:30 +0000 (12:29 +0100)]
write_sensu: enable TCP keepalive on network socket
Marc Fournier [Sat, 13 Feb 2016 11:29:21 +0000 (12:29 +0100)]
write_riemann: enable TCP keepalive on network socket
Marc Fournier [Sat, 13 Feb 2016 11:29:13 +0000 (12:29 +0100)]
write_graphite: enable TCP keepalive on network socket
Marc Fournier [Sat, 13 Feb 2016 10:51:23 +0000 (11:51 +0100)]
daemon/common.[ch]: add set_sock_opts() function
Enables the TCP keepalive mechanism on a given socket.
This would typically be used on sockets opened by write plugins
which submit data to a remote server.
Up to now, collectd fails to notice when a remote server dies without
properly closing the network connection, leading to more and more memory
getting allocated as the values pile up in the write queue.
The keepalive values are proportional to the configured `Interval`. The
first probe is emitted `10 x Interval` seconds after the last TCP packet
was seen, and then once per `Interval` until the threshold defined by
the OS is reached.
See: http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/#checkdeadpeers
Florian Forster [Tue, 9 Aug 2016 08:14:03 +0000 (10:14 +0200)]
ceph plugin: Really fix "parse_keys" test.
This reverts commit
9521a596cb88b044a2f08db53520edd6e15c8d39.
Marc Fournier [Mon, 8 Aug 2016 13:36:15 +0000 (15:36 +0200)]
collectd.spec: fix ./configure arguments order
Marc Fournier [Mon, 8 Aug 2016 12:07:18 +0000 (14:07 +0200)]
collectd.spec: fix typo, missing "%" sign
Ruben Kerkhof [Mon, 8 Aug 2016 11:12:08 +0000 (13:12 +0200)]
Include collectd.h before testing.h
testing.h includes system headers that set #define _FILE_OFFSET_BITS 32,
if not already defined. We define them in config.h, which is included by collectd.h
Fixes tests on 32-bit Solaris (#1301)
Marc Fournier [Mon, 8 Aug 2016 10:27:02 +0000 (12:27 +0200)]
collectd.spec: specify PYTHON_CONFIG on EL5
Since
4ad7200, python-config becomes mandatory. We have to explicitly
specify it's path for EL5 as we're using a non-default python
installation on this distro.
Marc Fournier [Mon, 8 Aug 2016 09:58:16 +0000 (11:58 +0200)]
collectd.spec: add new cpusleep plugin
Disabled on EL5 and EL6, as it requires CLOCK_BOOTTIME only available in
recent libc versions.
Florian Forster [Mon, 8 Aug 2016 06:41:04 +0000 (08:41 +0200)]
Merge remote-tracking branch 'github/pr/1845'
Florian Forster [Sun, 7 Aug 2016 17:12:21 +0000 (19:12 +0200)]
src/utils_format_json.c: Fix usage of yajl_gen_config().
trenkel [Sun, 7 Aug 2016 16:26:02 +0000 (18:26 +0200)]
Merge pull request #1864 from rubenk/python-2.6
Bump minimum required Python version to 2.6
Ruben Kerkhof [Sun, 7 Aug 2016 16:03:21 +0000 (18:03 +0200)]
Remove Python 2.4 compatibily macros
Ruben Kerkhof [Sun, 7 Aug 2016 15:10:12 +0000 (17:10 +0200)]
Bump python requirement to 2.6
Fixes #1863
Ruben Kerkhof [Sun, 7 Aug 2016 13:49:02 +0000 (15:49 +0200)]
Merge pull request #1851 from rubenk/use-python-config-for-libpython-detection
Switch to python-config for libpython detection
Ruben Kerkhof [Sun, 7 Aug 2016 11:10:14 +0000 (13:10 +0200)]
python: use LIBPYTHON_LIBS too
python-config --ldflags returns -lpython (yeah I know)
autoconf prepends ldflags in its configuration tests
so conftest.c will never look for symbols in -lpython.
python-config --libs also returns -lpython, but this is appended.
Ruben Kerkhof [Fri, 5 Aug 2016 18:55:37 +0000 (20:55 +0200)]
Switch to python-config for libpython detection
The old way of detecting libpython was unreliable and did not work on
OS X.
Instead use python-config which was introduced in python 2.6.
For older versions of python you can still set PYTHON_CPPFLAGS and
PYTHON_LDFLAGS on the ./configure command line.
By default we look for python3-config, python2-config and last
python-config. The path to python-config can be overriden by setting
PYTHON_CONFIG.
Fixes #888 and #27
Ruben Kerkhof [Sun, 7 Aug 2016 12:13:11 +0000 (14:13 +0200)]
perl plugin: fix build on RHEL5
perl.c: In function 'init_pi':
perl.c:2304: warning: implicit declaration of function
'pthread_mutexattr_settype'
perl.c:2304: error: 'PTHREAD_MUTEX_RECURSIVE' undeclared (first use in
this function)
perl.c:2304: error: (Each undeclared identifier is reported only once
perl.c:2304: error: for each function it appears in.)
make[3]: *** [perl_la-perl.lo] Error 1
Ruben Kerkhof [Sun, 7 Aug 2016 11:35:53 +0000 (13:35 +0200)]
utils_dns.c: fix build on OSX
utils_dns.c:759:11: error: use of undeclared identifier 'ns_t_apl'
case ns_t_apl: return ("APL");
Apparently Apple forgot to add some record types
when they bumped the version number of /usr/include/arpa/nameser.h
Ruben Kerkhof [Sun, 7 Aug 2016 10:45:22 +0000 (12:45 +0200)]
Merge pull request #1856 from rubenk/snmp-dont-dispatch-values-with-empty-type-instance
snmp : don't send values for empty type_instance
Ruben Kerkhof [Sun, 7 Aug 2016 10:12:08 +0000 (12:12 +0200)]
Merge pull request #1490 from rubenk/uuid
Uuid plugin fixes / updates
Ruben Kerkhof [Sat, 6 Aug 2016 06:31:04 +0000 (08:31 +0200)]
snmp : don't send values for empty type_instance
If you have multiple Instance values that are empty string,
they all end up in the same rrd file, resulting in:
rrdc_update (/collectd/rrd/vc3/snmp/if_errors.rrd, [
1352632188:0:0], 1) failed with status -1
Fixes #176
Ruben Kerkhof [Sun, 7 Aug 2016 09:59:31 +0000 (11:59 +0200)]
perl plugin: needs _LARGEFILE64_SOURCE
libperl compiled with LARGE_FILES support defines its own Off_t
as off64_t, even if off_t is 64-bit wide on 64bit platforms.
off64_t is only exposed in the libc headers if _LARGEFILE64_SOURCE
is defined.
In file included from perl.c:47:0:
/usr/lib/x86_64-linux-gnu/perl/5.20/CORE/perl.h:2398:22: error: unknown
type name 'off64_t'
# define Off_t off64_t
^
/usr/lib/x86_64-linux-gnu/perl/5.20/CORE/perlio.h:277:15: note: in
expansion of macro 'Off_t'
PERL_EXPORT_C Off_t PerlIO_tell(PerlIO *);
Ruben Kerkhof [Sun, 7 Aug 2016 09:50:25 +0000 (11:50 +0200)]
Merge pull request #1853 from rubenk/python-plugin-fix-building-on-osx
python plugin: fix building on OSX
Ruben Kerkhof [Sun, 7 Aug 2016 09:45:05 +0000 (11:45 +0200)]
Merge pull request #1844 from rubenk/sigrok
sigrok: use pkg-config to find library
Florian Forster [Sun, 7 Aug 2016 08:32:28 +0000 (10:32 +0200)]
Merge branch 'pr/1826'
Florian Forster [Sun, 7 Aug 2016 08:30:22 +0000 (10:30 +0200)]
cpusleep plugin: Reformat with `clang-format -style=LLVM`.
Pavel Rochnyack [Wed, 8 Jun 2016 07:15:54 +0000 (13:15 +0600)]
network plugin: Minimized number of proposed changes
Pavel Rochnyack [Tue, 31 May 2016 08:21:53 +0000 (14:21 +0600)]
network plugin: Improved error logging on decrypt error (wrong/missing username/password)
Florian Forster [Sat, 6 Aug 2016 19:21:56 +0000 (21:21 +0200)]
src/utils_db_query.c: Correctly handle return value of strjoin().
It returns the number of bytes, not zero, on success. This fixes a
bug introduced in
496ca2b758344bc6372ab0adf98ad8050f69b25a.
Florian Forster [Sat, 6 Aug 2016 19:15:18 +0000 (21:15 +0200)]
Merge remote-tracking branch 'github/master'
Ruben Kerkhof [Sat, 6 Aug 2016 19:13:41 +0000 (21:13 +0200)]
configure.ac: don't break Vim syntax highlighting
Florian Forster [Sat, 6 Aug 2016 19:13:22 +0000 (21:13 +0200)]
Merge remote-tracking branches 'github/pr/1857', 'github/pr/1859' and 'github/pr/1860'
Florian Forster [Sat, 6 Aug 2016 18:51:01 +0000 (20:51 +0200)]
Merge remote-tracking branch 'github/pr/1396'
Florian Forster [Sat, 6 Aug 2016 18:44:09 +0000 (20:44 +0200)]
python plugin: Fix double declaration of variable.
This fixes a regression from
92498b8a0e1d50c7e06d435395ac0ac307cc190c.
Florian Forster [Sat, 6 Aug 2016 11:59:11 +0000 (13:59 +0200)]
src/utils_format_json_test.c: Fix @rubenk's review comments.