Lua plugin: add to rpm specfile
Lua plugin: add to README
Lua plugin: make function array const
Lua plugin: Terminate array with sentinel
From the API docs:
Any array of luaL_Reg must end with a sentinel entry in which both name
and func are NULL.
From the API docs:
Any array of luaL_Reg must end with a sentinel entry in which both name
and func are NULL.
collectd-lua(5) fix syntax error in pod
Lua plugin: add section to collectd.conf(5)
Lua plugin: s/Collectd/collectd/g in manpage
Lua plugin: fix build with Lua 5.1
Lua plugin: add a manpage
Lua plugin: turn the collectd functions into a lib
Now the module shows up in 'package.loaded':
for name, func in pairs(package.loaded['collectd']) do
print(name, func)
end
returns:
dispatch_values function: 0x7f38b8a472c0
log_debug function: 0x7f38b8a47130
register_write function: 0x7f38b8a47520
log_info function: 0x7f38b8a470d0
register_read function: 0x7f38b8a47360
log_warning function: 0x7f38b8a47070
log_error function: 0x7f38b8a47100
log_notice function: 0x7f38b8a470a0
Now the module shows up in 'package.loaded':
for name, func in pairs(package.loaded['collectd']) do
print(name, func)
end
returns:
dispatch_values function: 0x7f38b8a472c0
log_debug function: 0x7f38b8a47130
register_write function: 0x7f38b8a47520
log_info function: 0x7f38b8a470d0
register_read function: 0x7f38b8a47360
log_warning function: 0x7f38b8a47070
log_error function: 0x7f38b8a47100
log_notice function: 0x7f38b8a470a0
Lua plugin: use existing type for functions array
Lua plugin: wrap debug code in COLLECT_DEBUG
No use formatting the string if we're not going to use it.
No use formatting the string if we're not going to use it.
Add a Lua plugin for Collectd
Merge pull request #900 from ccin2p3/faxmodem/cpu-numcpu
implement reporting of ncpu
implement reporting of ncpu
address @octo and @rubenk's comments
Change-Id: I5661a555d95227e63b3c873a0fd0b2360a040342
Change-Id: I5661a555d95227e63b3c873a0fd0b2360a040342
Merge pull request #1873 from rubenk/fix-duplicate-label_t
Work around Solaris 10 defining label_t
Work around Solaris 10 defining label_t
Merge pull request #1875 from rubenk/remove-configfile-h-from-plugins
Remove configfile.h from plugins
Remove configfile.h from plugins
Merge pull request #1876 from octo/issue/1819
grpc plugin: Refactor plugin.
grpc plugin: Refactor plugin.
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
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:
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:
common.c: fix calloc arguments order
Merge remote-tracking branch 'github/pr/1530'
implement reporting of ncpu
Change-Id: Ia305b74139352f16f71b1f747875d6c7a0c376a4
Change-Id: Ia305b74139352f16f71b1f747875d6c7a0c376a4
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>
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>
proto/collectd.proto: Improve documentation.
DispatchValues' documentation is now written from the POV of the server,
not the caller as it was previously worded.
DispatchValues' documentation is now written from the POV of the server,
not the caller as it was previously worded.
grpc plugin: Rename "err" to "status".
statsd, utils_latency: allow to reduce bin width
src/daemon/common.c: avoid leaking cap_header in error condition
src/daemon/common.c: avoid using private structs from <linux/capability.h>
turbostat: avoid potential unused variable
fix typographical mistake in warning message
swap plugin: fix leak on error
write_sensu plugin: fix build on OpenBSD
time_t is a long long on OpenBSD
time_t is a long long on OpenBSD
chrony plugin: fix build on OpenBSD
time_t is a long long on OpenBSD
time_t is a long long on OpenBSD
proto/*.proto: Reformat using clang-format.
grpc plugin: Move all functions to a single service again.
grpc plugin: Switch to the synchronous interface.
proto/*.proto: Add the go_package option.
grpc plugin: Turn QueryValues into a server-side streaming RPC.
Build system: set CPPFLAGS when checking for <grpc++/grpc++.h>
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')
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')
Ignore cscope files
Remove configfile.h from plugins
It is already included by collectd.h
It is already included by collectd.h
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.
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.
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.
Some versions of sys/capability.h seem to have conflicting declarations
with other (linux) kernel header files, so order matters.
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
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
turbostat plugin: use check_capability() function
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.
This is largely inspired by the capability check done in
src/turbostat.c, so most of the credits go to Vincent Brillault.
mysql plugin: Remove trailing whitespace.
Allow MySQL to use SSL connections
Merge pull request #1549 from mfournier/socket-keepalive
Enable TCP socket keepalive on write plugins
Enable TCP socket keepalive on write plugins
collectd.spec: add missing %define required by gps plugin
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) {
^
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) {
^
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]
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]
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),
^~~~~~
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),
^~~~~~
collectd.spec: add gps plugin
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
Conflicts:
README
configure.ac
src/Makefile.am
src/collectd.conf.in
src/collectd.conf.pod
src/types.db
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
Solaris 10 defines label_t in /usr/include/sys/machtypes.h,
unless POSIX_C_SOURCE is defined, or when __EXTENSIONS__ is defined.
Fixes #1301
write_tsdb: enable TCP keepalive on network socket
write_sensu: enable TCP keepalive on network socket
write_riemann: enable TCP keepalive on network socket
write_graphite: enable TCP keepalive on network socket
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
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
ceph plugin: Really fix "parse_keys" test.
This reverts commit 9521a596cb88b044a2f08db53520edd6e15c8d39.
This reverts commit 9521a596cb88b044a2f08db53520edd6e15c8d39.
collectd.spec: fix ./configure arguments order
collectd.spec: fix typo, missing "%" sign
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)
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)
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.
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.
collectd.spec: add new cpusleep plugin
Disabled on EL5 and EL6, as it requires CLOCK_BOOTTIME only available in
recent libc versions.
Disabled on EL5 and EL6, as it requires CLOCK_BOOTTIME only available in
recent libc versions.
Merge remote-tracking branch 'github/pr/1845'
src/utils_format_json.c: Fix usage of yajl_gen_config().
Merge pull request #1864 from rubenk/python-2.6
Bump minimum required Python version to 2.6
Bump minimum required Python version to 2.6
Remove Python 2.4 compatibily macros
Bump python requirement to 2.6
Fixes #1863
Fixes #1863
Merge pull request #1851 from rubenk/use-python-config-for-libpython-detection
Switch to python-config for libpython detection
Switch to python-config for libpython detection
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.
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.
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
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
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
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
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
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
Merge pull request #1856 from rubenk/snmp-dont-dispatch-values-with-empty-type-instance
snmp : don't send values for empty type_instance
snmp : don't send values for empty type_instance
Merge pull request #1490 from rubenk/uuid
Uuid plugin fixes / updates
Uuid plugin fixes / updates
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
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
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 *);
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 *);
Merge pull request #1853 from rubenk/python-plugin-fix-building-on-osx
python plugin: fix building on OSX
python plugin: fix building on OSX
Merge pull request #1844 from rubenk/sigrok
sigrok: use pkg-config to find library
sigrok: use pkg-config to find library
Merge branch 'pr/1826'
cpusleep plugin: Reformat with `clang-format -style=LLVM`.
network plugin: Minimized number of proposed changes
8 years agonetwork plugin: Improved error logging on decrypt error (wrong/missing username/password)
network plugin: Improved error logging on decrypt error (wrong/missing username/password)
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.
It returns the number of bytes, not zero, on success. This fixes a
bug introduced in 496ca2b758344bc6372ab0adf98ad8050f69b25a.
Merge remote-tracking branch 'github/master'
configure.ac: don't break Vim syntax highlighting
Merge remote-tracking branches 'github/pr/1857', 'github/pr/1859' and 'github/pr/1860'
Merge remote-tracking branch 'github/pr/1396'
python plugin: Fix double declaration of variable.
This fixes a regression from 92498b8a0e1d50c7e06d435395ac0ac307cc190c.
This fixes a regression from 92498b8a0e1d50c7e06d435395ac0ac307cc190c.
src/utils_format_json_test.c: Fix @rubenk's review comments.
src/utils_format_json.c: Add support for libyajl < 2.
write_http plugin: Implement writing of notifications.
src/utils_format_json.[ch]: Implement format_json_notification().