common: check_create_dir(): Support symlinks as well.
Previously, the following situation would cause an endless look (as reported
by Michael Prokop in Debian bug #619123): the (CSV or RRD) datadir is a
symlink pointing to a non-existent target.
With this patch applied, check_create_dir() fails with "<file> exists but is
not a directory".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Previously, the following situation would cause an endless look (as reported
by Michael Prokop in Debian bug #619123): the (CSV or RRD) datadir is a
symlink pointing to a non-existent target.
With this patch applied, check_create_dir() fails with "<file> exists but is
not a directory".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
build system, ipvs plugin: Check for linux/ip_vs.h as well.
Also, try to find ip_vs.h without using KERNEL_CFLAGS at first. The Linux
kernel headers should not be used directly -- in current kernel versions this
generates warnings leading to build failures because of -Werror.
Also, try to find ip_vs.h without using KERNEL_CFLAGS at first. The Linux
kernel headers should not be used directly -- in current kernel versions this
generates warnings leading to build failures because of -Werror.
network plugin: Copy received value-lists before dispatching them.
A network packet may contain some parts (e.g. hostname) only once. When
parsing the packet, the network plugin incrementally builds up the value list
and dispatches it after parsing a value. This may happen several times without
changing other parts (like the hostname).
However, using the filter-chains, those "static" parts may be overwritten /
modified while dispatching the values. Thus, they cannot reliably be reused
after calling plugin_dispatch_values(). Copying the value list to a temporary
list fixes this.
A network packet may contain some parts (e.g. hostname) only once. When
parsing the packet, the network plugin incrementally builds up the value list
and dispatches it after parsing a value. This may happen several times without
changing other parts (like the hostname).
However, using the filter-chains, those "static" parts may be overwritten /
modified while dispatching the values. Thus, they cannot reliably be reused
after calling plugin_dispatch_values(). Copying the value list to a temporary
list fixes this.
src/common.c: parse_value: Be more verbose about parsing problems.
Change-Id: I784ec4ee9a1e89a82fdc9da54ed1fafd3d9c3e57
Change-Id: I784ec4ee9a1e89a82fdc9da54ed1fafd3d9c3e57
This improves solaris memory plugin granularity.
Locked memory is now only tracking non-kernel locked memory.
We add kernel and unusable memory.
Source: http://www.brendangregg.com/K9Toolkit/swapinfo
Change-Id: I4f4d281e991068dc845d8c3615d285fc2a3296c8
Locked memory is now only tracking non-kernel locked memory.
We add kernel and unusable memory.
Source: http://www.brendangregg.com/K9Toolkit/swapinfo
Change-Id: I4f4d281e991068dc845d8c3615d285fc2a3296c8
use 64bit counters if available
Merge "Fix file:// not working as return code is 0 and not 200, as fixed beforehand in curl_json. Remove mention of http in documention as file also works now (and ftp most likely too)" into collectd-4.10
Fix file:// not working as return code is 0 and not 200, as fixed
beforehand in curl_json.
Remove mention of http in documention as file also works now (and ftp most likely too)
Change-Id: Iccb35e6b8c831f555dc5bbd17fa8d04672e13eb3
beforehand in curl_json.
Remove mention of http in documention as file also works now (and ftp most likely too)
Change-Id: Iccb35e6b8c831f555dc5bbd17fa8d04672e13eb3
Merge "interface plugin: Fix for bogus interfaces under Solaris." into collectd-4.10
ChangeLog: Add thanks to Peter Green.
Change-Id: Ie392f7dfc7d637c92e286b0bf6d5d32877f70f76
Change-Id: Ie392f7dfc7d637c92e286b0bf6d5d32877f70f76
Bump version to 4.10.4; Update ChangeLog.
Change-Id: Ie23cf45f929c52e94e968c7129d24aca7a287dd5
Change-Id: Ie23cf45f929c52e94e968c7129d24aca7a287dd5
interface plugin: Fix for bogus interfaces under Solaris.
Under newer versions of Solaris, the method for finding network interfaces
results in 'collectd' gathering statistics on an interface called 'mac', along
with 16 interfaces named 'wrsmd0' through 'wrsmd15' (which are for WCI Remote
Shared Memory). The 'mac' interface is especially problematic because it
occurs multiple times, which results in warnings from rrdtool about insertions
with the same timestamp.
Change-Id: I1ae070ecbc820da25c0f0ad457aba80213339fd2
Signed-off-by: Florian Forster <octo@collectd.org>
Under newer versions of Solaris, the method for finding network interfaces
results in 'collectd' gathering statistics on an interface called 'mac', along
with 16 interfaces named 'wrsmd0' through 'wrsmd15' (which are for WCI Remote
Shared Memory). The 'mac' interface is especially problematic because it
occurs multiple times, which results in warnings from rrdtool about insertions
with the same timestamp.
Change-Id: I1ae070ecbc820da25c0f0ad457aba80213339fd2
Signed-off-by: Florian Forster <octo@collectd.org>
collectd.conf.in: Use the "Globals" option for perl and python.
Change-Id: Icaccaab601b91bc829c4da94c5344e0d766735bd
Change-Id: Icaccaab601b91bc829c4da94c5344e0d766735bd
Add RPM .spec file and startup script for AIX
Change-Id: Ic6187891e2014d84f8b2926df1c8b2012f26923f
Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@collectd.org>
Change-Id: Ic6187891e2014d84f8b2926df1c8b2012f26923f
Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@collectd.org>
Merge "curl_json plugin: Be more clever building the type instance." into collectd-4.10
irq plugin: Implement collection of non-numeric interrupts.
Hi all!
I've created a patch that enables collectd to collect all irqs present in
/proc/interrupts, with numeric and string names (NMI, LOC, RES, etc).
Two notices:
a) Unfortunately I was unable to build collectd from git repo (build.sh
failures), therefore I created this patch for latest stable release: 4.10.1
b) I am fairly unexperienced in C programming, so please inform me gently of my
mistakes:) But I am already using a patched version and it works fine.
Any feedback on code quality or recommendations are welcome.
Change-Id: Ia17bd953921051dfe53e838b76672adbef9e73c3
Signed-off-by: Florian Forster <octo@collectd.org>
Hi all!
I've created a patch that enables collectd to collect all irqs present in
/proc/interrupts, with numeric and string names (NMI, LOC, RES, etc).
Two notices:
a) Unfortunately I was unable to build collectd from git repo (build.sh
failures), therefore I created this patch for latest stable release: 4.10.1
b) I am fairly unexperienced in C programming, so please inform me gently of my
mistakes:) But I am already using a patched version and it works fine.
Any feedback on code quality or recommendations are welcome.
Change-Id: Ia17bd953921051dfe53e838b76672adbef9e73c3
Signed-off-by: Florian Forster <octo@collectd.org>
processes plugin: Fixed handling of ProcessMatch regexes containing spaces.
Previously, something like 'ProcessMatch name "My Regex"' would have been
interpreted as three values. This was caused by using the old, non-complex
config interface which joins all config values using a space and passing the
resulting string to the plugin. The processes plugin used to use strsplit() to
re-gain a list of all values, obviously ignoring any quoting that might exist.
This has been fixed by using the complex config interface, which passes all
values as an array of strings and thus honoring the quoting handled by
liboconfig.
Previously, something like 'ProcessMatch name "My Regex"' would have been
interpreted as three values. This was caused by using the old, non-complex
config interface which joins all config values using a space and passing the
resulting string to the plugin. The processes plugin used to use strsplit() to
re-gain a list of all values, obviously ignoring any quoting that might exist.
This has been fixed by using the complex config interface, which passes all
values as an array of strings and thus honoring the quoting handled by
liboconfig.
curl_json plugin: Be more clever building the type instance.
When the key of the parent object is empty, don't use it. The previous code led
to type instances starting with a dash, e.g. "-foo".
Also, be more verbose when unable to resolve types.
Change-Id: Ib5f55efe1acc1e819ac3189b6780a4e998bf9c9f
When the key of the parent object is empty, don't use it. The previous code led
to type instances starting with a dash, e.g. "-foo".
Also, be more verbose when unable to resolve types.
Change-Id: Ib5f55efe1acc1e819ac3189b6780a4e998bf9c9f
Merge "fix xff excessive rounding" into collectd-4.10
.gitignore: Added collectdctl.
src/plugin.c: add info to 'Invalid value list' error message
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
collectd_unixsock.py: Fix infinite wait.
raise a KeyError if getval() or getthreshold() unixsock returns replies an
error because of request of an unknown identifier
Signed-off-by: Florian Forster <octo@collectd.org>
raise a KeyError if getval() or getthreshold() unixsock returns replies an
error because of request of an unknown identifier
Signed-off-by: Florian Forster <octo@collectd.org>
configure: Link with ip4tc and ip6tc, too.
This solves this problem:
octo@leeloo:/tmp $ gcc -o conftest -g -O2 conftest.c -liptc -ldl
/usr/bin/ld: /tmp/ccuJEDqP.o: undefined reference to symbol 'iptc_init'
/usr/bin/ld: note: 'iptc_init' is defined in DSO /lib64/libip4tc.so.0 so try adding it to the linker command line
/lib64/libip4tc.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
Why the iptables plugin compiles without this is beyond me.
Change-Id: If615bee0c9524d907ca1834d5c337ed50c625c5b
This solves this problem:
octo@leeloo:/tmp $ gcc -o conftest -g -O2 conftest.c -liptc -ldl
/usr/bin/ld: /tmp/ccuJEDqP.o: undefined reference to symbol 'iptc_init'
/usr/bin/ld: note: 'iptc_init' is defined in DSO /lib64/libip4tc.so.0 so try adding it to the linker command line
/lib64/libip4tc.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
Why the iptables plugin compiles without this is beyond me.
Change-Id: If615bee0c9524d907ca1834d5c337ed50c625c5b
fix xff excessive rounding
Hi,
When generating arguments for rrd_create, the previous
format string "%.1f", was rounding up the value too aggressively.
ex: for xff==0.9999 the result would be -> 1.0 (invalid value for xff!)
The new format string is "%.10f", which lead up to 10 digits after the
dot, enough to be close to the double type limit, and so handling
correctly the previous example.
Change-Id: I7c6cc55b0d43beb5ef351bb04b67f4628249c737
Hi,
When generating arguments for rrd_create, the previous
format string "%.1f", was rounding up the value too aggressively.
ex: for xff==0.9999 the result would be -> 1.0 (invalid value for xff!)
The new format string is "%.10f", which lead up to 10 digits after the
dot, enough to be close to the double type limit, and so handling
correctly the previous example.
Change-Id: I7c6cc55b0d43beb5ef351bb04b67f4628249c737
configure.in: Add AC_CONFIG_AUX_DIR for libltdl.
mysql plugin: Remove sideeffect-free function call.
notify_email plugin: Remove useless function and fix indentation.
Many build fixes that turned up with GCC 4.6.
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
src/csv.c: use a bigger buffer
The CSV plugin formerly used a relatively small output buffer. If you
had a large dataset, you would always get error -1 because the line
length was be too long. This patch extends the buffer.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
The CSV plugin formerly used a relatively small output buffer. If you
had a large dataset, you would always get error -1 because the line
length was be too long. This patch extends the buffer.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
curl_json plugin: Add compatibility code for libyajl v2.
Thanks to "spupykin" of the Arch Linux project on whose patch this commit is
loosely based.
Thanks to "spupykin" of the Arch Linux project on whose patch this commit is
loosely based.
Various plugins: Set the cURL option "CURLOPT_NOSIGNAL".
This fixes problems with version 7.21.2 (and later) of libcurl that are due to
collectd being a multi-threaded program.
Signed-off-by: Florian Forster <octo@collectd.org>
This fixes problems with version 7.21.2 (and later) of libcurl that are due to
collectd being a multi-threaded program.
Signed-off-by: Florian Forster <octo@collectd.org>
src/meta_data.c: Free a leaking mutex.
This problem primarily manifested on FreeBSD but may well effect other
systems as well.
Thanks to Tomas Krasnican for reporting this problem.
Signed-off-by: Florian Forster <octo@collectd.org>
This problem primarily manifested on FreeBSD but may well effect other
systems as well.
Thanks to Tomas Krasnican for reporting this problem.
Signed-off-by: Florian Forster <octo@collectd.org>
df plugin: Improve error message.
notify_desktop plugin: Add compatibility code for libnotify 0.7.
The current code in src/notify_desktop.c is not compatible with the new
libnotify 0.7 API
This:
notification = notify_notification_new (summary, n->message, NULL, NULL);
Should now be:
notification = notify_notification_new (summary, n->message, NULL;
As in, one argument less for notify_notification_new.
But we can't just remove it or it'll break compability with libnotify
0.4.x and 0.5.x.
This piece of code sets dummy NOTIFY_CHECK_VERSION for libnotify-0.4.x,
because NOTIFY_CHECK_VERSION was added only in 0.5.x:
#ifndef NOTIFY_CHECK_VERSION
#define NOTIFY_CHECK_VERSION(x,y,z) 0
#endif
Then we can freely use NOTIFY_CHECK_VERSION, and it will work with all
of 0.4, 0.5 and 0.7 series:
#if NOTIFY_CHECK_VERSION (0, 7, 0)
do something cool
#endif
I'm attaching the working patch. It's been tested with all of the
mentioned versions, as well as it's in active use at Gentoo Linux.
Thanks, Samuli
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
The current code in src/notify_desktop.c is not compatible with the new
libnotify 0.7 API
This:
notification = notify_notification_new (summary, n->message, NULL, NULL);
Should now be:
notification = notify_notification_new (summary, n->message, NULL;
As in, one argument less for notify_notification_new.
But we can't just remove it or it'll break compability with libnotify
0.4.x and 0.5.x.
This piece of code sets dummy NOTIFY_CHECK_VERSION for libnotify-0.4.x,
because NOTIFY_CHECK_VERSION was added only in 0.5.x:
#ifndef NOTIFY_CHECK_VERSION
#define NOTIFY_CHECK_VERSION(x,y,z) 0
#endif
Then we can freely use NOTIFY_CHECK_VERSION, and it will work with all
of 0.4, 0.5 and 0.7 series:
#if NOTIFY_CHECK_VERSION (0, 7, 0)
do something cool
#endif
I'm attaching the working patch. It's been tested with all of the
mentioned versions, as well as it's in active use at Gentoo Linux.
Thanks, Samuli
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Bump version to 4.10.3; Update ChangeLog.
Merge branch 'collectd-4.9' into collectd-4.10
Conflicts:
ChangeLog
version-gen.sh
Conflicts:
ChangeLog
version-gen.sh
Bump version to 4.9.5; Update ChangeLog.
libvirt plugin: Correctly check the status code of virDomainGetVcpus().
The status code is less than zero on failure and the number of vCPUs
otherwise. Thanks to "JLPC" for pointing this problem out.
The status code is less than zero on failure and the number of vCPUs
otherwise. Thanks to "JLPC" for pointing this problem out.
Fix compilation error with plugin_register_shutdown
Compiling collectd-4.10.2 on an OpenSuSE 11.3 system causes the
following error:
snmp.c: In function ‘module_register’:
snmp.c:1620:3: error: passing argument 1 of ‘plugin_register_shutdown’ discards qualifiers from pointer target type
plugin.h:275:5: note: expected ‘char *’ but argument is of type ‘const char *’
Convert plugin_register_shutdown's name argument from 'char *' to
'const char *' in order to match the other plugin_register_*
functions.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Compiling collectd-4.10.2 on an OpenSuSE 11.3 system causes the
following error:
snmp.c: In function ‘module_register’:
snmp.c:1620:3: error: passing argument 1 of ‘plugin_register_shutdown’ discards qualifiers from pointer target type
plugin.h:275:5: note: expected ‘char *’ but argument is of type ‘const char *’
Convert plugin_register_shutdown's name argument from 'char *' to
'const char *' in order to match the other plugin_register_*
functions.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'collectd-4.9' into collectd-4.10
dispatch proper values in Python write plugin
Fixes the Python write callback so the appropriate value is dispatched to
Python. Previously, the code only looked at the first element of a data set
to determine which value type (GAUGE, COUNTER, etc) to dispatch. If your data
set consisted of multiple values of different types, then the Python write
plugin was receiving bad values for the elements at position n > 0 whose type
was not the same as that at position 0.
Fixes the Python write callback so the appropriate value is dispatched to
Python. Previously, the code only looked at the first element of a data set
to determine which value type (GAUGE, COUNTER, etc) to dispatch. If your data
set consisted of multiple values of different types, then the Python write
plugin was receiving bad values for the elements at position n > 0 whose type
was not the same as that at position 0.
processes plugin: Call kvm_close() after kvm_geterr().
collectd.conf(5): Mention MySQL privileges required for repl stats.
collectd.conf(5): Be more verbose about how to access a notification daemon.
filter_chain: Use a complaint to report plugin_write()'s ENOENT error.
In most cases this is a permanent error, so using the complain mechanism
avoids spamming the logs.
In most cases this is a permanent error, so using the complain mechanism
avoids spamming the logs.
src/plugin.c: Print a more verbose error message if lt_dlopen() fails.
Since the Debian package doesn't depend on the libraries used by the
collectd plugins, some plugins may fail to load. ltdl reports this with
the very confusing error message "file not found". Since the plugin is
in fact available, many users don't realize a dependency is missing and
assume collectd is looking in the wrong directory -- and they are hardly
to blame for this.
This commit introduces a lengthy error message which hopefully points
users into the right direction.
Since the Debian package doesn't depend on the libraries used by the
collectd plugins, some plugins may fail to load. ltdl reports this with
the very confusing error message "file not found". Since the plugin is
in fact available, many users don't realize a dependency is missing and
assume collectd is looking in the wrong directory -- and they are hardly
to blame for this.
This commit introduces a lengthy error message which hopefully points
users into the right direction.
Merge branch 'collectd-4.9' into collectd-4.10
exec plugin: Remove useless preprocessor stuff.
ntpd plugin: Report failures of "ntpd_do_query" as *errors*, not debug messages.
src/utils_threshold.c: Fix creation of percentage notifications.
Joey Hess has reported a problem when creating notifications from
percentage thresholds. Because the (percentage) minimum value is
compared to the (raw) DS value, the following message is possible:
Message: Host XXX, plugin df type df (instance root): Data source
"free" is currently 1773072384.000000. That is above the warning
threshold of nan%.
A new section will handle this case correctly. In the inverted case, the
problem should not exist.
Joey Hess has reported a problem when creating notifications from
percentage thresholds. Because the (percentage) minimum value is
compared to the (raw) DS value, the following message is possible:
Message: Host XXX, plugin df type df (instance root): Data source
"free" is currently 1773072384.000000. That is above the warning
threshold of nan%.
A new section will handle this case correctly. In the inverted case, the
problem should not exist.
Merge branch 'collectd-4.9' into collectd-4.10
dns plugin: Include <pcap-bpf.h> if available.
java plugin: Improve an error message.
README: Document the version of libmodbus used and update URL.
modbus plugin: Restore compatibility to libmodbus 2.0.3.
This is the current "stable" version.
This is the current "stable" version.
curl_json plugin: Fix handling of arrays.
Merge branch 'collectd-4.9' into collectd-4.10
src/common.c: parse_value: Fix assignment of derive and absolute values.
configure.in: Fix a typo in an AC_ARG_WITH description.
ChangeLog: Add missing line (copynpaste error).
Bump version to 4.10.2; Update ChangeLog.
Merge branch 'collectd-4.9' into collectd-4.10
Conflicts:
ChangeLog
src/collectd.conf.pod
version-gen.sh
Conflicts:
ChangeLog
src/collectd.conf.pod
version-gen.sh
Bump version to 4.9.4; Update ChangeLog.
Merge remote branch 'trenkel/collectd-4.9' into collectd-4.9
netapp: Fixed incompatible changes between NetApp Release 7.2 and 7.3 that prevented collecting SIS data
swap plugin: Fix a bug collecting swap I/O.
Merge remote branch 'trenkel/collectd-4.9' into collectd-4.9
Fixed RedHat init script to shut down collectd on reboot/halt.
collectd.conf(5): Document the dangers of messing with the interval setting.
processes plugin: Don't complain about a failed open(/proc/$PID/cmdline)
... if the error is ENOENT. This merely means we were too slow and that
we can safely ignore the process.
... if the error is ENOENT. This merely means we were too slow and that
we can safely ignore the process.
src/utils_rrdcreate.c: Remove a too strict assertion.
We don't actually check anywhere that vl->time is greater than 10, so we
cannot assure this.
We don't actually check anywhere that vl->time is greater than 10, so we
cannot assure this.
Merge branch 'collectd-4.9' into collectd-4.10
Conflicts:
src/collectd.conf.in
src/python.c
Conflicts:
src/collectd.conf.in
src/python.c
README: Add libperfstat as an optional dependency.
netapp plugin: Fixed a bug that prevented the configured interval to be passed on to the dispatch function.
Merge remote branch 'trenkel/collectd-4.10' into collectd-4.10
Fixed epic documentation fail. Python3 and meta-data support was added with 4.10 but is still listed as missing.
Add sys.argv. Not too many programs consider the possibility that it might not exist resulting in unhandled exceptions.
Fixed possible memory leak in case of broken match_value configs.
src/types.db: Remove unused type "pinba_view".
src/utils_cache.c: Replace a left-over hard-coded default of "2" with "timeout_g".
curl_json plugin: Restore struct when handling error.
src/collectd.h: Do not include <sensors/sensors.h> here.
Fix errno thread-safety under AIX
Unlike Linux or Solaris, errno under AIX is not thread-safe by
default.
This patch sets _THREAD_SAFE_ERRNO when AIX is detected in order to
force the thread-safe implementation of errno. Without this, calls
like stat() in the rrdtool plugin fail with errno incorrectly set,
leading to the inability to create previously absent rrd files.
Maybe _THREAD_SAFE should be set instead, to prevent other possible
threads-related problems, but this is enough to scratch my current
itch...
Here is the relevant part of /usr/include/errno.h on AIX:
#if defined(_THREAD_SAFE) || defined(_THREAD_SAFE_ERRNO)
/*
* Per thread errno is provided by the threads provider. Both the extern
* int
* and the per thread value must be maintained by the threads library.
*/
extern int *_Errno( void );
#define errno (*_Errno())
#else
extern int errno;
#endif /* _THREAD_SAFE || _THREAD_SAFE_ERRNO */
Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Unlike Linux or Solaris, errno under AIX is not thread-safe by
default.
This patch sets _THREAD_SAFE_ERRNO when AIX is detected in order to
force the thread-safe implementation of errno. Without this, calls
like stat() in the rrdtool plugin fail with errno incorrectly set,
leading to the inability to create previously absent rrd files.
Maybe _THREAD_SAFE should be set instead, to prevent other possible
threads-related problems, but this is enough to scratch my current
itch...
Here is the relevant part of /usr/include/errno.h on AIX:
#if defined(_THREAD_SAFE) || defined(_THREAD_SAFE_ERRNO)
/*
* Per thread errno is provided by the threads provider. Both the extern
* int
* and the per thread value must be maintained by the threads library.
*/
extern int *_Errno( void );
#define errno (*_Errno())
#else
extern int errno;
#endif /* _THREAD_SAFE || _THREAD_SAFE_ERRNO */
Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
collection3: Add graph for "ps_disk_octets".
notify_email plugin: Check for "session == NULL" and return gracefully.
I don't know how libesmtp handles NULL pointers and I don't want to take
my chances.
I don't know how libesmtp handles NULL pointers and I don't want to take
my chances.
notify_email plugin: Serialize all accesses to libesmtp using a mutex.
collection3: fix multiple hosts selection issue
When selecting multiple hosts in collection3's hosts list, and with some
plugins only (the ones that use a specific resource name such as memory
or tcpconns), the resulting graph list will be limited to one single
graph (instead of one per host).
This patch addresses this issue by modifying the name of the hash key
in the group_files_by_plugin_instance function, making it less prone
to name collisions by prefixing it by the host name.
Comments and enhancements will be welcome.
Signed-off-by: Jerome Oufella <jerome.oufella@savoirfairelinux.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
When selecting multiple hosts in collection3's hosts list, and with some
plugins only (the ones that use a specific resource name such as memory
or tcpconns), the resulting graph list will be limited to one single
graph (instead of one per host).
This patch addresses this issue by modifying the name of the hash key
in the group_files_by_plugin_instance function, making it less prone
to name collisions by prefixing it by the host name.
Comments and enhancements will be welcome.
Signed-off-by: Jerome Oufella <jerome.oufella@savoirfairelinux.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
network plugin: Use the complain mechanism to inform the user about ignored signatures.
src/utils_tail: Remove newline characters at the end of a line.
The tool is supposed to work line-based, so a) the newline character is
implicit and b) imho, does not belong to the string which is then further
processed.
Also, this allows '$' to match the end of a line when applying a regex to the
line, no matter if the REG_NEWLINE flag has been used when compiling the regex
or not.
The tool is supposed to work line-based, so a) the newline character is
implicit and b) imho, does not belong to the string which is then further
processed.
Also, this allows '$' to match the end of a line when applying a regex to the
line, no matter if the REG_NEWLINE flag has been used when compiling the regex
or not.
utils_match: Let '^' and '$' affect lines rather than the full string.
The regcomp() flag REG_NEWLINE is required for that, even though regex(7)
might make people think otherwise.
The regcomp() flag REG_NEWLINE is required for that, even though regex(7)
might make people think otherwise.
src/collectd.conf.in: Move "TimeToLive" before the "Server" and "Listen" statements.
Thanks to Renaud Chaput for pointing this out!
Thanks to Renaud Chaput for pointing this out!
Merge branch 'collectd-4.9' into collectd-4.10
src/utils_heap.c: Fix calculation of the parent's index.
This resulted in the "upwards" reheap function to return prematurely,
leaving the heap condition violated.
This resulted in the "upwards" reheap function to return prematurely,
leaving the heap condition violated.
Merge branch 'collectd-4.9' into collectd-4.10
src/plugin.c: Improve an info message.
Based on a patch by Sebastian, which didn't use the handy "FORMAT_VL"
macro.
Based on a patch by Sebastian, which didn't use the handy "FORMAT_VL"
macro.
collectd.conf(5): Document he "Derive*" and "AbsoluteSet" DSTypes of the tail plugin.
src/utils_match.c: Use strtoull(3) for counter and absolute data sources.
src/utils_match.h: Fix a bug preventing derive values from being handled correctly.
Due to the bit-wise check, the value for derive (0x30) matches the check
for gauge (0x10), too. This commit fixes the behavior by assigning other
numeric values to the defines.
Due to the bit-wise check, the value for derive (0x30) matches the check
for gauge (0x10), too. This commit fixes the behavior by assigning other
numeric values to the defines.
src/configfile.c: Continue parsing config files if stat'ing one file fails.
curl json: Fix checking the response code.