Merge branch 'collectd-5.5'
write_sensu: define _GNU_SOURCE for asprintf
On Linux, asprintf and vasprintf are only available when _GNU_SOURCE is defined.
On Linux, asprintf and vasprintf are only available when _GNU_SOURCE is defined.
Merge branch 'collectd-5.5'
write_sensu: remove custom asprintf implementation
This was guarded by HAVE_ASPRINTF, but we never had a configure check
for asprintf (or vasprintf).
This only turned up when I made the function static, since they now
clash with the prototypes in stdio.h on FreeBSD.
As far as I know all the platforms we build on have these functions.
If this turns out to be not the case, we can always add compat functions
to our utilies later.
For now, this fixes the build on FreeBSD.
This was guarded by HAVE_ASPRINTF, but we never had a configure check
for asprintf (or vasprintf).
This only turned up when I made the function static, since they now
clash with the prototypes in stdio.h on FreeBSD.
As far as I know all the platforms we build on have these functions.
If this turns out to be not the case, we can always add compat functions
to our utilies later.
For now, this fixes the build on FreeBSD.
Merge branch 'collectd-5.5'
write_riemann: add new header to Makefile.am
Fixes 'make distcheck'
Fixes 'make distcheck'
Merge branch 'collectd-5.5'
Fix prototype of subst()
Commit e1b93f5 changed the signature of this function, but not the
prototype.
Commit e1b93f5 changed the signature of this function, but not the
prototype.
write_sensu: mark asprintf as static
Commit straigh to 5.5. This plugin didn't exist in 5.4.
Commit straigh to 5.5. This plugin didn't exist in 5.4.
write_sensu: mark vasprintf as static
Commit straight to 5.5. This plugin didn't exist in 5.4
Commit straight to 5.5. This plugin didn't exist in 5.4
write_riemann: move prototype to header file
redis: mark redis_handle_query as static
Commit straight to 5.5. This plugin didn't exist in 5.4.
Commit straight to 5.5. This plugin didn't exist in 5.4.
redis: mark redis_handle_info as static
Commit straight to 5.5. This plugin didn't exist in 5.4.
Commit straight to 5.5. This plugin didn't exist in 5.4.
barometer: mark Detect_sensor_type as static
Make function start with lowercase 'd' while we're at it.
Commit straight to 5.5.
Make function start with lowercase 'd' while we're at it.
Commit straight to 5.5.
collectd.c: mark notify_systemd as static
Commit straight to 5.5. This function didn't exist in 5.4.
Commit straight to 5.5. This function didn't exist in 5.4.
collectd.c: mark notify_upstart as static
Commit straight to 5.5. This function didn't exist in 5.4.
Commit straight to 5.5. This function didn't exist in 5.4.
sensu: mark replace_str as static
Commit straight to 5.5. This plugin doesn't exist in 5.4
Commit straight to 5.5. This plugin doesn't exist in 5.4
sensu: mark sensu_format_name2 as static
Commit straight to 5.5, this plugin doesn't exist in 5.4
Commit straight to 5.5, this plugin doesn't exist in 5.4
Fix prototype of uc_get_size
Commit straight to 5.5, this function doesn't exist in 5.4.
Commit straight to 5.5, this function doesn't exist in 5.4.
Fix prototype of plugin_log_available_writers
Commit straight to 5.5, this function doesn't exist in 5.4
Commit straight to 5.5, this function doesn't exist in 5.4
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
Merge pull request #1582 from rubenk/missing-prototypes
Missing prototypes
Missing prototypes
xmms: mark cxmms_read as static
sensors: mark sensors_free_features as static
processes: mark ps_read_process as static
utils_db_query.c: make udb_query_free_one static
battery: mark dict_get_double as static
types_list.c: add header for prototypes
utils_subst.c: add header for prototypes
utils_random.c: add header for prototypes
utils_cmd_getval.c: add header for prototypes
utils_cmd_flush.c: add header for prototypes
threshold.c: mark ut_config as static
latency_counter_create: fix signature
utils_latency.c: mark change_bin_width as static
utils_cmd_putval.c: include header for prototypes
Include header for prototype of handle_putnotif
Add prototype for module_register
liboconfig: mark oconfig_free_all as static
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
CONTRIBUTING.md: improve wording
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
Merge branch 'collectd-5.5'
Extend collected metrics in redis plugin
This change adds support for other interesting Redis metrics:
* expired_keys
* keyspace_hits, keyspace_misses
* total_net_input_bytes, total_net_output_bytes
It also fixes the DS type for expired_keys, which was incorrectly
expressed as gauge instead of derive.
This change adds support for other interesting Redis metrics:
* expired_keys
* keyspace_hits, keyspace_misses
* total_net_input_bytes, total_net_output_bytes
It also fixes the DS type for expired_keys, which was incorrectly
expressed as gauge instead of derive.
redis: change expired_keys type from GAUGE to DERIVE
Thanks for @falzm for pointing this out in #1483 !
Thanks for @falzm for pointing this out in #1483 !
configure.ac: fix path when testing for liboconfig/parser.c presence
processes: use long for pids on linux and solaris
Up to now, we had a mix of `int`, `long` and `pid_t` to represent the
variable part of `/proc/<PID>/status` and friends. This patch
standardizes on `long` on the Linux and Solaris platforms.
The max size of `int` is smaller than the maximum number of processes
current kernels support. `pid_t` is used to ensure portability of
functions such as `getpid()`, which aren't used in this plugin, and
apparently resolves to an `int` on Solaris.
This is a follow up to bb978c1, which triggered a format string issue on
solaris 64 bit.
Up to now, we had a mix of `int`, `long` and `pid_t` to represent the
variable part of `/proc/<PID>/status` and friends. This patch
standardizes on `long` on the Linux and Solaris platforms.
The max size of `int` is smaller than the maximum number of processes
current kernels support. `pid_t` is used to ensure portability of
functions such as `getpid()`, which aren't used in this plugin, and
apparently resolves to an `int` on Solaris.
This is a follow up to bb978c1, which triggered a format string issue on
solaris 64 bit.
Merge pull request #1550 from mfournier/processes-longpid
processes: use long for pids on linux and solaris
processes: use long for pids on linux and solaris
Move unversioned .so to -devel subpackage
Replace traffic with interface in man page
The traffic plugin was renamed a long time ago.
The traffic plugin was renamed a long time ago.
Merge pull request #1555 from falzm/extend-interface
Report packets dropped in interface plugin
Report packets dropped in interface plugin
Merge branch 'pr/1480'
Provide the configuration tests for NetBSD.
Absent guidance to the contrary, getting this applied is a
precondition for the individual plugin updates I'll subsequently
submit pull requests for.
Absent guidance to the contrary, getting this applied is a
precondition for the individual plugin updates I'll subsequently
submit pull requests for.
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
Merge pull request #1570 from rubenk/detect-bison
configure.ac: detect bison
configure.ac: detect bison
Merge pull request #1545 from mfournier/contributing
add CONTRIBUTING.md
add CONTRIBUTING.md
Merge pull request #1567 from rubenk/fix-typo-in-config
Fix typo in collectd.conf
Fix typo in collectd.conf
Merge pull request #1506 from mfournier/apache-content-type-1170
apache: warn about possible misconfiguration
apache: warn about possible misconfiguration
Merge pull request #1561 from mfournier/modbus-set-debug
modbus: avoid enabling libmodbus's debug flag by default
modbus: avoid enabling libmodbus's debug flag by default
configure.ac: detect bison
We use some bison-specific extensions so we really need bison, not yacc.
This has bitten a few people before, so make it easier for them.
Bison is only needed when compiling from git, since we ship the generated file
in the tarball. We take this into account by checking for the generated file first.
We use some bison-specific extensions so we really need bison, not yacc.
This has bitten a few people before, so make it easier for them.
Bison is only needed when compiling from git, since we ship the generated file
in the tarball. We take this into account by checking for the generated file first.
Fix typo in collectd.conf
modbus: avoid enabling libmodbus's debug flag by default
Having this enabled makes collectd's stdout and stderr very noisy. From
now on, only activate this flag when collectd is built with
--enable-debug.
Thanks to Eric Sandeen for mentioning this problem on IRC.
Having this enabled makes collectd's stdout and stderr very noisy. From
now on, only activate this flag when collectd is built with
--enable-debug.
Thanks to Eric Sandeen for mentioning this problem on IRC.
Report packets dropped in interface plugin
Add `if_dropped` to the metrics reported by the interface plugin.
Add `if_dropped` to the metrics reported by the interface plugin.
processes: use long for pids on linux and solaris
Up to now, we had a mix of `int`, `long` and `pid_t` to represent the
variable part of `/proc/<PID>/status` and friends. This patch
standardizes on `long` on the Linux and Solaris platforms.
The max size of `int` is smaller than the maximum number of processes
current kernels support. `pid_t` is used to ensure portability of
functions such as `getpid()`, which aren't used in this plugin, and
apparently resolves to an `int` on Solaris.
This is a follow up to bb978c1, which triggered a format string issue on
solaris 64 bit.
Up to now, we had a mix of `int`, `long` and `pid_t` to represent the
variable part of `/proc/<PID>/status` and friends. This patch
standardizes on `long` on the Linux and Solaris platforms.
The max size of `int` is smaller than the maximum number of processes
current kernels support. `pid_t` is used to ensure portability of
functions such as `getpid()`, which aren't used in this plugin, and
apparently resolves to an `int` on Solaris.
This is a follow up to bb978c1, which triggered a format string issue on
solaris 64 bit.
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
Merge pull request #1521 from coreykosak/factor-out-common-code
Factor out some common functionality
Factor out some common functionality
Merge pull request #1540 from mfournier/write_sensu_segfault_fix
write_sensu: avoid calling strlen() on variable set to NULL
write_sensu: avoid calling strlen() on variable set to NULL
Merge pull request #1529 from jamtur01/patch-1
Fixed typo in CounterSum documentation
Fixed typo in CounterSum documentation
add CONTRIBUTING.md
Mostly a summarized version of, or pointers to, information found in the
wiki.
These guidelines are supposed to show up when users open new issues or
pull requests on github.
See https://github.com/blog/1184-contributing-guidelines
Mostly a summarized version of, or pointers to, information found in the
wiki.
These guidelines are supposed to show up when users open new issues or
pull requests on github.
See https://github.com/blog/1184-contributing-guidelines
RPM specfile: re-enable varnish plugin on EL7
... as the collectd-5.5 line now supports the varnish 4 API.
... as the collectd-5.5 line now supports the varnish 4 API.
write_sensu: avoid calling strlen() on variable set to NULL
This fixes a segfault when no `Tag` option is set.
This fixes a segfault when no `Tag` option is set.
Fix the addres of the Free Software Foundation
Fixed typo in CounterSum documentation
Revert "Revert "openvpn plugin: Fix "Dead assignment" warning.""
This reverts commit b40a0ef00b49cbc4d828ca2cd928c98dd27834c0.
This reverts commit b40a0ef00b49cbc4d828ca2cd928c98dd27834c0.
Merge branch 'collectd-5.4' into collectd-5.5
turbostat: fix whitespaces in log messages
Don't divide by 0 when doing percentages (e.g. with the swap plugin).
Prior to this change, if all the values being sent sum to zero, then the
calculated percentage is a division by 0 which is either Inf or NaN
depending on the numerator.
This is not a theoretical concern: it can easily happen if all the input
gauges are 0.
This change forces the output to be zero if the denominator is zero.
Prior to this change, if all the values being sent sum to zero, then the
calculated percentage is a division by 0 which is either Inf or NaN
depending on the numerator.
This is not a theoretical concern: it can easily happen if all the input
gauges are 0.
This change forces the output to be zero if the denominator is zero.
Provide a unified signature for ps_get_cmdline.
Prior to this change, ps_get_cmdline had different signatures for
KERNEL_LINUX vs. KERNEL_SOLARIS. This means that callers who want to
call this function would have to have an #if..#else that controlled which
variant of the function to call.
By giving them the same signature, callers don't have to worry about
that.
Prior to this change, ps_get_cmdline had different signatures for
KERNEL_LINUX vs. KERNEL_SOLARIS. This means that callers who want to
call this function would have to have an #if..#else that controlled which
variant of the function to call.
By giving them the same signature, callers don't have to worry about
that.
The field 're' only exists if HAVE_REGEX_H is defined (see definition at
line 194). So, consistent with all other usages, this should be protected
with an #if guard.
line 194). So, consistent with all other usages, this should be protected
with an #if guard.
Revert "openvpn plugin: Fix "Dead assignment" warning."
I cherry-picked this patch, but overlooked the fact it relates to
another change (c339d93f) only found in the collectd-5.5 branch.
Reverting, as it results in a compilation error.
This reverts commit b7f9a3c02d885e0fbe8fb7aac5c9a51b5771a9d3.
I cherry-picked this patch, but overlooked the fact it relates to
another change (c339d93f) only found in the collectd-5.5 branch.
Reverting, as it results in a compilation error.
This reverts commit b7f9a3c02d885e0fbe8fb7aac5c9a51b5771a9d3.
Factor out some common functionality in an effort to make
this code more readable.
this code more readable.
Merge branch 'collectd-5.4' into collectd-5.5
drbd plugin: improve header lines identification
Recent DRBD versions display more detailed build information in
`/proc/drbd`, which caused the header identification to fail.
Comparing the first part of each line against all known header prefixes
will hopefully make this more robust.
Fixes #1514
Signed-off-by: Florian Forster <octo@collectd.org>
Recent DRBD versions display more detailed build information in
`/proc/drbd`, which caused the header identification to fail.
Comparing the first part of each line against all known header prefixes
will hopefully make this more robust.
Fixes #1514
Signed-off-by: Florian Forster <octo@collectd.org>
df: remove legacy code skipping "rootfs" monitoring
3512bb1 added code to skip duplicate reporting of `rootfs` mounted on `/`.
f9c1c5b and f0398d0 added generic code to skip any volume mounted twice.
Depending on the order of the entries in `/etc/mtab`, reporting for `/` was
entirely skipped.
This patch basically reverts the first, non-generic patch, as it's
superseded by the 2 others.
Fixes #1402
Signed-off-by: Florian Forster <octo@collectd.org>
3512bb1 added code to skip duplicate reporting of `rootfs` mounted on `/`.
f9c1c5b and f0398d0 added generic code to skip any volume mounted twice.
Depending on the order of the entries in `/etc/mtab`, reporting for `/` was
entirely skipped.
This patch basically reverts the first, non-generic patch, as it's
superseded by the 2 others.
Fixes #1402
Signed-off-by: Florian Forster <octo@collectd.org>
ChangeLog: Fix mangled entries.
Bump version to 5.5.1; Update ChangeLog.
Merge pull request #1517 from mfournier/systemd-upstart-build-issue
systemd.collectd.service: improve systemd & capabilities explanations
systemd.collectd.service: improve systemd & capabilities explanations
docs: Add info about mode7 requirement for ntpd
Since ntpd-4.2.7p230 "mode 7" requests are ignored by default, and
that's what ntpd plugin uses currently. The ntp daemon must be
explicitly configured to enable mode7 requests.
This patch adds short information about that to collectd.conf manpage.
Related to collectd/collectd#932
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
Since ntpd-4.2.7p230 "mode 7" requests are ignored by default, and
that's what ntpd plugin uses currently. The ntp daemon must be
explicitly configured to enable mode7 requests.
This patch adds short information about that to collectd.conf manpage.
Related to collectd/collectd#932
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
collectdmon: Refactor the re-opening of STD{IN,OUT,ERR}.
Merge branch 'collectd-5.5'
Merge branch 'collectd-5.4' into collectd-5.5
docs: mention regexps for the interface plugin
It is very useful to collect data (or ignore) from a group of interfaces
that are similarly named - especially if the list is dynamic and it's
not feasible to update configuration each time an interface shows up or
disappears. It's possible to use regexps to specify interfaces to
collect data from (or ignore), but it's not clearly stated anywhere in
the documentation.
This is an attempt to improve documentation in this area.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
It is very useful to collect data (or ignore) from a group of interfaces
that are similarly named - especially if the list is dynamic and it's
not feasible to update configuration each time an interface shows up or
disappears. It's possible to use regexps to specify interfaces to
collect data from (or ignore), but it's not clearly stated anywhere in
the documentation.
This is an attempt to improve documentation in this area.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
systemd.collectd.service: improve systemd & capabilities explanations
Fixes #1444
Fixes #1444
exec plugin: Revert file mode to 0644.
This fixes a regression from 94e562250296b1435e3e48cd302055d89c4c702b.
This fixes a regression from 94e562250296b1435e3e48cd302055d89c4c702b.