configfile.c: Fixed Include'ing empty files.
When including empty files, a typo prevented that the "Include" child (of the
config parse tree) was removed correctly, leaving behind garbage which in turn
led to a segfault if the Include option was not the last element of the config
file.
Also, another Include option following the inclusion of an empty file used to
be ignored. This has been fixed as well.
When including empty files, a typo prevented that the "Include" child (of the
config parse tree) was removed correctly, leaving behind garbage which in turn
led to a segfault if the Include option was not the last element of the config
file.
Also, another Include option following the inclusion of an empty file used to
be ignored. This has been fixed as well.
collectd.conf(5): Fixed alphabetic sorting of plugins.
collectd.conf(5): Mark {Min,Max}PGVersion as deprecated.
Instead, document the {Min,Max}Version options.
Instead, document the {Min,Max}Version options.
collectd.conf: Added a sample ipmi config block.
rrdtool plugin: If `flush' cannot find the requested file, issue an `INFO'.
... and not a `WARNING' - this may happen under perfectly fine conditions.
(I. e. file exists but isn't updated anymore.)
... and not a `WARNING' - this may happen under perfectly fine conditions.
(I. e. file exists but isn't updated anymore.)
src/utils_cache.c: Fix incorrect checking of persistent thresholds.
I attached a patch to solve a problem related with notifications. When a value
is missing for a while (2 intervals), a FAILURE notification is raised, and if
Persist is false, the notification is repeated each interval, but man page
says:
If set to false (the default) then a notification is only generated if a
value is out of range but the previous value was okay.
So, I think that is a bug, if not I'm sorry for the noise :)
Regards,
Andres
P.S.: The problem is only a mixing in if conditions into uc_check_timeout
function.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
I attached a patch to solve a problem related with notifications. When a value
is missing for a while (2 intervals), a FAILURE notification is raised, and if
Persist is false, the notification is repeated each interval, but man page
says:
If set to false (the default) then a notification is only generated if a
value is out of range but the previous value was okay.
So, I think that is a bug, if not I'm sorry for the noise :)
Regards,
Andres
P.S.: The problem is only a mixing in if conditions into uc_check_timeout
function.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Disable LFS flags to avoid 32-bit solaris sys/swap.h error
build system: (Hopefully) added support for libtool 1.5 _and_ 2.2.
The macro LT_PACKAGE_VERSION (which appeared in libtool 2.2) is used to check
weather we're using libtool 2.2.
The macro LT_PACKAGE_VERSION (which appeared in libtool 2.2) is used to check
weather we're using libtool 2.2.
rrdtool plugin: Make sure the initialization is run only once.
Thanks to Amit Gupta for reporting this bug!
Thanks to Amit Gupta for reporting this bug!
src/plugin.c: Initiate the threshold checking again.
Hi,
I have the same problem in my instalation, exactly the same scenario, I found a
possible explanation in the plugin.c module. While in the 4.5 branch exists a
callback to function ut_check_threshold (defined in utils_threshold.c), in the
4.6.2 (and also in 4.6.1, I think), the callback is missing, so threshold
checking never runs.
In fact, a grep -r ut_check_threshold over src dir, only show the definition of
the function in ut_check_threshold module.
I'm not sure if it's really a bug, but when I patched my code, it works fine
for me :) I'm using the 4.6.2 version from tar.gz.
Best regards,
Andrés
The regression was introduced in 65954d9b.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Hi,
I have the same problem in my instalation, exactly the same scenario, I found a
possible explanation in the plugin.c module. While in the 4.5 branch exists a
callback to function ut_check_threshold (defined in utils_threshold.c), in the
4.6.2 (and also in 4.6.1, I think), the callback is missing, so threshold
checking never runs.
In fact, a grep -r ut_check_threshold over src dir, only show the definition of
the function in ut_check_threshold module.
I'm not sure if it's really a bug, but when I patched my code, it works fine
for me :) I'm using the 4.6.2 version from tar.gz.
Best regards,
Andrés
The regression was introduced in 65954d9b.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
configure.in: Be more verbose if libperl exists but doesn't support ithreads.
Merge branch 'collectd-4.5' into collectd-4.6
Conflicts:
ChangeLog
version-gen.sh
Conflicts:
ChangeLog
version-gen.sh
Bumped version to 4.5.4; Updated ChangeLog.
Merge branch 'collectd-4.5' into collectd-4.6
configure.in: Hint towards the CFLAGS instead of using $CC.
configure.in: Add hint for building solaris 64-bit binary.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
swap module: Include <vm/anon.h> on Solaris.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
configure.in: Check for `mysql_get_server_version' in libmyql.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
configure.in: Use AC_HEADER_STDBOOL
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'collectd-4.5' into collectd-4.6
Conflicts:
src/Makefile.am
Conflicts:
src/Makefile.am
Build system: Straighten up building of the DF plugin.
In rare cases, e. g. Solaris, getmntent is available but neither the one nor
the two argument version could be recognized. This lead to `cu_mount_getlist'
returning NULL without an error, leading to the df plugin fail without notice.
While at it I re-implemented the dependency checking of the DF plugin to match
the proprocessor logic in utils_mount.c.
In rare cases, e. g. Solaris, getmntent is available but neither the one nor
the two argument version could be recognized. This lead to `cu_mount_getlist'
returning NULL without an error, leading to the df plugin fail without notice.
While at it I re-implemented the dependency checking of the DF plugin to match
the proprocessor logic in utils_mount.c.
Merge branch 'collectd-4.5' into collectd-4.6
uuid plugin: Pass `int' to `isxdigit'.
Fixes compilation on NetBSD and possibly other systems.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Fixes compilation on NetBSD and possibly other systems.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
tcpconns plugin: Compilation fixes for NetBSD.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
libcollectdclient: Copy `sstrerror' from src/common.c.
I don't want to simply include common.h, since that pulls in a lot of
other daemon-related headers..
I don't want to simply include common.h, since that pulls in a lot of
other daemon-related headers..
Set process vmem_size and stack_size on FreeBSD
Fixes:
processes.c: In function 'ps_read':
processes.c:328: warning: 'pse.vmem_size' is used uninitialized in this function
processes.c:1300: note: 'pse.vmem_size' was declared here
processes.c:330: warning: 'pse.stack_size' is used uninitialized in this function
processes.c:1300: note: 'pse.stack_size' was declared here
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Cherry-picked *again* because the initial commit to the collectd-4.5
branch was incorrect. collectd-4.6 is the branch this should be in.
Conflicts:
src/processes.c
Fixes:
processes.c: In function 'ps_read':
processes.c:328: warning: 'pse.vmem_size' is used uninitialized in this function
processes.c:1300: note: 'pse.vmem_size' was declared here
processes.c:330: warning: 'pse.stack_size' is used uninitialized in this function
processes.c:1300: note: 'pse.stack_size' was declared here
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Cherry-picked *again* because the initial commit to the collectd-4.5
branch was incorrect. collectd-4.6 is the branch this should be in.
Conflicts:
src/processes.c
Merge branch 'collectd-4.5' into collectd-4.6
processes plugin: Fix compilation issues under OpenBSD.
Unfortunately OpenBSD support is non-trivial to add, so we'll keep that for
later.
Unfortunately OpenBSD support is non-trivial to add, so we'll keep that for
later.
Merge branch 'collectd-4.5' into collectd-4.6
rrdtool plugin: Make absolutely sure two local variables are initialized.
To make the compiler happy.
To make the compiler happy.
bind plugin: Fixes for FreeBSD 7.1
X/Open is needed for strptime,
sys/select.h is needed for some libcurl versions, and
mktime is the POSIX variant of timegm (+ localization).
X/Open is needed for strptime,
sys/select.h is needed for some libcurl versions, and
mktime is the POSIX variant of timegm (+ localization).
Various: Remove strict standards compliance defines.
ntpd plugin: Fix dereference of type-punned pointer.
Merge branch 'collectd-4.5' into collectd-4.6
processes plugin: Comment out nonexistent struct members.
We should reintroduce those values eventually.
We should reintroduce those values eventually.
memory plugin: Fix a formatstring error.
email plugin: Don't assume `pthread_t' is a `unsigned long'.
Merge branch 'collectd-4.5' into collectd-4.6
irq plugin: Force 32bit wrap-around.
battery plugin: Fix a typo.
src/libcollectdclient/: Specify _XOPEN_SOURCE=600.
irq plugin: Parse interrupt counters as unsigned long long.
Hello,
attached patch fixes accounting of most frequent interrupts (like NICs
on routers). E.g. in my case:
213: 76266 76357 76250 76397 2408617852 2411844062 2411642538 2411814531 PCI-MSI-edge eth1
214: 2621368360 2621463385 2621343444 2621386931 2349184 28 35 32 PCI-MSI-edge eth0
Here LONG_MAX (2147483647L) overflows in 10 days uptime and strtol()
returns the same value.
As all the values (including counter_t) are unsigned long long int, the
fix is trivial (for now there's no need to check for irq_value overflow;>).
--
Tomasz Pala <gotar@pld-linux.org>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Hello,
attached patch fixes accounting of most frequent interrupts (like NICs
on routers). E.g. in my case:
213: 76266 76357 76250 76397 2408617852 2411844062 2411642538 2411814531 PCI-MSI-edge eth1
214: 2621368360 2621463385 2621343444 2621386931 2349184 28 35 32 PCI-MSI-edge eth0
Here LONG_MAX (2147483647L) overflows in 10 days uptime and strtol()
returns the same value.
As all the values (including counter_t) are unsigned long long int, the
fix is trivial (for now there's no need to check for irq_value overflow;>).
--
Tomasz Pala <gotar@pld-linux.org>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
csv plugin: Update copyright information.
Various plugins: Update copyright information.
Merge branch 'collectd-4.5' into collectd-4.6
Conflicts:
src/cpu.c
Conflicts:
src/cpu.c
src/libcollectdclient/: Check if EILSEQ is defined.
And fall back to EPROTO or EINVAL if it is not, e. g. under FreeBSD.
And fall back to EPROTO or EINVAL if it is not, e. g. under FreeBSD.
interface, memory, ping plugins: Update copyright information.
openvpn plugin: Correct copyright information.
cpu plugin: Updated copyright information.
mysql plugin: Fix a typo in my previous patch.
D'oh!
D'oh!
mysql plugin: Updated copyright information.
Set process vmem_size and stack_size on FreeBSD
Fixes:
processes.c: In function 'ps_read':
processes.c:328: warning: 'pse.vmem_size' is used uninitialized in this function
processes.c:1300: note: 'pse.vmem_size' was declared here
processes.c:330: warning: 'pse.stack_size' is used uninitialized in this function
processes.c:1300: note: 'pse.stack_size' was declared here
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Fixes:
processes.c: In function 'ps_read':
processes.c:328: warning: 'pse.vmem_size' is used uninitialized in this function
processes.c:1300: note: 'pse.vmem_size' was declared here
processes.c:330: warning: 'pse.stack_size' is used uninitialized in this function
processes.c:1300: note: 'pse.stack_size' was declared here
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
battery plugin: Don't complain about missing /proc/acpi/battery each interval.
Instead, complain once when the read callback is called for the first time.
Instead, complain once when the read callback is called for the first time.
Merge branch 'collectd-4.5' into collectd-4.6
Restore BYTE_ORDER on DARWIN The files matching grep "define _POSIX_C_SOURCE" src/*.c on MacOSX do not compile: In file included from target_notification.c:60: collectd.h:172:3: error: #error "Cannot determine byte order"
See /usr/include/i386/endian.h:
#if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
#define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
#define BIG_ENDIAN __DARWIN_BIG_ENDIAN
#define BYTE_ORDER __DARWIN_BYTE_ORDER
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
See /usr/include/i386/endian.h:
#if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
#define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
#define BIG_ENDIAN __DARWIN_BIG_ENDIAN
#define BYTE_ORDER __DARWIN_BYTE_ORDER
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Disable disable multi -arch flags to perl.c on OSX Compilation of perl.c fails with:
gcc ... -Wall -Werror -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN ... -MT perl_la-perl.lo -MD -MP -MF ...
...
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
See Config_heavy.pl:
$archflags = exists($ENV{ARCHFLAGS}) ? $ENV{ARCHFLAGS} : '-arch i386 -arch ppc';
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
gcc ... -Wall -Werror -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN ... -MT perl_la-perl.lo -MD -MP -MF ...
...
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
See Config_heavy.pl:
$archflags = exists($ENV{ARCHFLAGS}) ? $ENV{ARCHFLAGS} : '-arch i386 -arch ppc';
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/plugin.c: Emit warning in load_plugin if !S_ISREG
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
dbi plugin: Be more specific about unknown field types.
Especially print the name of the field.
Especially print the name of the field.
contrib/collectd-network.py: Add pure-Python implementation of collectd's network protocol.
Announcement can be found here:
<http://blogs.igalia.com/aperez/?p=38>
Announcement can be found here:
<http://blogs.igalia.com/aperez/?p=38>
collectd-unixsock(5): Fix two typos.
exec plugin: Allow executed programs to close STDERR.
When an executed program is closing STDERR but continues running, the
daemon will wait for the child to exit and the child will eventually
block because the pipe is filled up, resulting in no statistics being
collected.
Thanks to Thorsten von Eicken for finding this problem :)
When an executed program is closing STDERR but continues running, the
daemon will wait for the child to exit and the child will eventually
block because the pipe is filled up, resulting in no statistics being
collected.
Thanks to Thorsten von Eicken for finding this problem :)
network plugin: Improve a debugging message.
configure: Prefixed cache-ids in AC_CACHE_CHECK with "c_cv_".
autoconf requires the string "_cv_" to be present in cache-ids.
This patch adds/changes `have_broken_perl_load_module' which was added
after 4.5.
autoconf requires the string "_cv_" to be present in cache-ids.
This patch adds/changes `have_broken_perl_load_module' which was added
after 4.5.
Bumped version to 4.6.2; Updated ChangeLog.
Merge branch 'collectd-4.5' into collectd-4.6
configure: Prefixed cache-ids in AC_CACHE_CHECK with "c_cv_".
autoconf requires the string "_cv_" to be present in cache-ids.
autoconf requires the string "_cv_" to be present in cache-ids.
configfile, types_list: Improved error messages when handling "TypesDB".
Merge branch 'collectd-4.6' of /var/lib/git/collectd into collectd-4.6
src/liboping/liboping.c: Fix a problem with strict aliasing.
Just remove the code since it's dead anyway.
Thanks to Alan Pevec <apevec at gmail.com> for pointing this out :)
Just remove the code since it's dead anyway.
Thanks to Alan Pevec <apevec at gmail.com> for pointing this out :)
src/filter_chain.c: Allow chains without a default target.
This is how it's documented.
This is how it's documented.
timediff match: Register the correct match name.
src/utils_cache.c: Fix an error message.
src/collectd.conf.in: Add `match_timediff'.
Merge branch 'collectd-4.5' into collectd-4.6
15 years agoMerge branch 'collectd-4.5' of octo@verplant.org:/var/lib/git/collectd into collectd-4.5
Merge branch 'collectd-4.5' of octo@verplant.org:/var/lib/git/collectd into collectd-4.5
bind plugin: Actually handle RR cache numbers as `gauge'..
Hi Florian,
Well a working patch was even less trivial as the quick one from
yesterday evening.
Just using a gauge type is not sufficient (only 0 is written to RRD
files), it's also necessary to adjust the bind_xml_stats_handle_view()
as has been done for the memory statistics
Attached is a patch to bind.c (I skipped types.db) which fixes the
cache data collection.
In addition I attached a graph of the cache evolution and memory (for
memory it might be worth giving it an own type as it's not cumulative
at all)
Bruno
Hi Florian,
Well a working patch was even less trivial as the quick one from
yesterday evening.
Just using a gauge type is not sufficient (only 0 is written to RRD
files), it's also necessary to adjust the bind_xml_stats_handle_view()
as has been done for the memory statistics
Attached is a patch to bind.c (I skipped types.db) which fixes the
cache data collection.
In addition I attached a graph of the cache evolution and memory (for
memory it might be worth giving it an own type as it's not cumulative
at all)
Bruno
bind plugin: "Trivial patch" to make `rr cache' stats work.
bind plugin: "Trivial patch" to make `rr cache' stats work.
contrib/collection3: Use {interface} in `if_octets' graphs.
contrib/collection3: Add graph for `ps_cputime'.
contrib/collection3: Add the "height" parameter.
src/common.c, memory plugin: Fix a potential problem under Solaris.
When the kstat chain has been updated (and init is called again),
get_kstat should overwrite the existing kstat pointer thingy.
When the kstat chain has been updated (and init is called again),
get_kstat should overwrite the existing kstat pointer thingy.
contrib/collection3: Fix two minor issues.
contrib/collection3: Add "Wirkleistung" graph.
contrib/collection3: Minor HTML work-around for some browsers.
contrib/collection3: Update bin/json.cgi to use the JSON module.
contrib/collection3: Add graph for "Table space" graphs.
contrib/collecion3: Add graphs for `dns_opcode' and `io_octets'.
contrib/collection3: Add the `index' to the parameters.
src/liboping/test_liboping.c: Remove legacy file.
Merge branch 'sh/collectd-4.5' into sh/collectd-4.6
Conflicts:
contrib/collection3/lib/Collectd/Graph/Common.pm
src/postgresql_default.conf
Conflicts:
contrib/collection3/lib/Collectd/Graph/Common.pm
src/postgresql_default.conf
postgresql_default.conf: Make sure the "disk_io" query does not return NULLs.
Starting with some version between 8.3.3 and 8.3.6, pg_statio_*_tables returns
NULL instead of 0 for statistics if no instance of the appropriate relation
exists. PQgetvalue() returns an empty string in that case which would then
result in error messages when udb_result_submit() tries to convert that to a
number.
Now, the "disk_io" query uses PostgreSQL's coalesce() function to make sure 0
is returned instead of NULL.
Starting with some version between 8.3.3 and 8.3.6, pg_statio_*_tables returns
NULL instead of 0 for statistics if no instance of the appropriate relation
exists. PQgetvalue() returns an empty string in that case which would then
result in error messages when udb_result_submit() tries to convert that to a
number.
Now, the "disk_io" query uses PostgreSQL's coalesce() function to make sure 0
is returned instead of NULL.
contrib/exec-nagios.px: Make it possible to run the same script multiple times.
rrdtool plugin: Fix a possible race condition at startup.
On a very busy system, if the network plugin was initialized before the
rrdtool plugin, `rrd_cache_insert' may be called before the RRDtool
plugin is initialized. It would then pass `cache == NULL' to
`c_avl_get', resulting in a segmentation fault.
On a very busy system, if the network plugin was initialized before the
rrdtool plugin, `rrd_cache_insert' may be called before the RRDtool
plugin is initialized. It would then pass `cache == NULL' to
`c_avl_get', resulting in a segmentation fault.
collectd.conf(5): Don't mix spaces and tabs in configuration examples.
contrib/collection3: Fix stacking with NAN values.
Stacked values above NAN values were not drawn previously..
Stacked values above NAN values were not drawn previously..
contrib/collection3: Minor cleanups.
contrib/collection3: Add the "IgnoreUnknown" config option.
Used by the "GenericStacked" graphs.
Used by the "GenericStacked" graphs.
contrib/collection3: Add "Total" to "GenericIO" graphs.
Using the RRDtool 1.2 VDEF syntax.
Using the RRDtool 1.2 VDEF syntax.
contrib/collection3: Add the "DataDir" config option.