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>
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.
rrdtool plugin: Make absolutely sure two local variables are initialized.
To make the compiler happy.
To make the compiler happy.
ntpd plugin: Fix dereference of type-punned pointer.
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'.
irq plugin: Force 32bit wrap-around.
battery plugin: Fix a typo.
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>
Various plugins: Update copyright information.
interface, memory, ping plugins: Update copyright information.
cpu 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.
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>
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.
autoconf requires the string "_cv_" to be present in cache-ids.
configfile, types_list: Improved error messages when handling "TypesDB".
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/utils_cache.c: Fix an error message.
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
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.
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.
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.
contrib/collection3/bin/.htaccess: s/SetHandler/AddHandler/
SetHandler doesn't accept a file extension.
SetHandler doesn't accept a file extension.
contrib/collection3/bin/.htaccess: Add file.
This has been missing. Wonder why nobody complained..?
This has been missing. Wonder why nobody complained..?
snmp plugin: Added a note about a potential bug that needs fixing.
Negative absolute (gauge) values may be casted to an unsigned integer
variable on their way throught he daemon, producing VERY HIGH tempera-
tures in winter..
Negative absolute (gauge) values may be casted to an unsigned integer
variable on their way throught he daemon, producing VERY HIGH tempera-
tures in winter..
Merge branch 'bp/php-collection' into collectd-4.5
php-collection: Add support for named graph lists as favorites
php-collection: Add support for named graph lists as favorites
php-collection allowed saving and loading a list of graphs from a
cookie.
This patch changes loading/saving to provide support for naming
of favorite graph lists.
When saving a name has to be provided (up to 30 alphanumerical
characters includeing underscore and hyphen.
For loading a named list can be selected from a dropdown list (this list
is refreshed when it gets focus) of available favorites.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
php-collection: Add support for named graph lists as favorites
php-collection allowed saving and loading a list of graphs from a
cookie.
This patch changes loading/saving to provide support for naming
of favorite graph lists.
When saving a name has to be provided (up to 30 alphanumerical
characters includeing underscore and hyphen.
For loading a named list can be selected from a dropdown list (this list
is refreshed when it gets focus) of available favorites.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
php-collection/functions.php: Escape/avoid problematic characters in RRD commandline
php-collection/functions.php: Escape/avoid problematic characters in RRD commandline
rrdtool does not like '!' in variable names so replace them with '_'.
(bind plugin has them in a few type-instances and type-instance is used
as variable name by MetaGraphs)
Also escape rrdtool field seperators that might appear in file names.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
php-collection/functions.php: Escape/avoid problematic characters in RRD commandline
rrdtool does not like '!' in variable names so replace them with '_'.
(bind plugin has them in a few type-instances and type-instance is used
as variable name by MetaGraphs)
Also escape rrdtool field seperators that might appear in file names.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
php-collection/definitions.php: Add MetaGraph definitions for bind plugin
php-collection/definitions.php: Add MetaGraph definitions for bind plugin
Add metagraph definition and matching function for the various
types used by bind plugin.
Adjust the memory MetaGraph function to support bind memory statistics.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
php-collection/definitions.php: Add MetaGraph definitions for bind plugin
Add metagraph definition and matching function for the various
types used by bind plugin.
Adjust the memory MetaGraph function to support bind memory statistics.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
php-collection/graph.php: Add missing error500() function
php-collection/graph.php: Add missing error500() function
When a call to rrdtool fails or some other internal error occurs
a HTTP error with code 500 and matching error image should be
returned, added the missing error500() function which does this
the same way as error404() and error400() functions.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
php-collection/graph.php: Add missing error500() function
When a call to rrdtool fails or some other internal error occurs
a HTTP error with code 500 and matching error image should be
returned, added the missing error500() function which does this
the same way as error404() and error400() functions.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
php-collection: Fixes and multiple saved graph lists
php-collection/functions.php: Fix collectd_flush()
Some obsolete code in collectd_flush() caused PHP Notice errors
and prevented caused the function to return before attempting
to ask collectd to flush cache.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
php-collection/functions.php: Fix collectd_flush()
Some obsolete code in collectd_flush() caused PHP Notice errors
and prevented caused the function to return before attempting
to ask collectd to flush cache.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
php-collection/definitions.php: Add missing MetaGraph for tcp_connections
php-collection/definitions.php: Add missing MetaGraph for tcp_connections
Add missing MetaGraph reference for tcp_connections and fix DS name
for the MetaGraph
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
php-collection/definitions.php: Add missing MetaGraph for tcp_connections
Add missing MetaGraph reference for tcp_connections and fix DS name
for the MetaGraph
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
contrib/php-collection: A few more bug-fixes to the graphing scripts.
This removes some obsolete code which prevents flush from working and adds
missing wrapper error500().
This removes some obsolete code which prevents flush from working and adds
missing wrapper error500().
README: Documented the `--with-fp-layout' configure option.
dns plugin: Don't pass a NULL pointer to `pcap_open_live'.
Although the documentation states clearly, that passing a NULL pointer
as device is okay and handled like "any", doing so will crash the daemon
on some systems, most notably *BSDs but Linux users have reported this
behavior, too.
This patch passes "any" when the pointer it NULL, which reportedly
resulted in a different behavior, but still crashing the daemon. We'll
keep trying ;)
Although the documentation states clearly, that passing a NULL pointer
as device is okay and handled like "any", doing so will crash the daemon
on some systems, most notably *BSDs but Linux users have reported this
behavior, too.
This patch passes "any" when the pointer it NULL, which reportedly
resulted in a different behavior, but still crashing the daemon. We'll
keep trying ;)
src/common.c: Fixed a race condition in check_create_dir().
Between checking for the existence of a directory using stat() and creating
the directory using mkdir(), another thread might have already created the
directory thus causing mkdir() to fail with errno == EEXIST. This case is now
handled sanely, no longer causing the function (and thus some write callback)
to fail in this case.
Most likely, this only happens during startup when creating the data
directories - later, no two threads should try to create the same directory.
Interestingly enough, I frequently encountered this issue on a single core
machine.
Between checking for the existence of a directory using stat() and creating
the directory using mkdir(), another thread might have already created the
directory thus causing mkdir() to fail with errno == EEXIST. This case is now
handled sanely, no longer causing the function (and thus some write callback)
to fail in this case.
Most likely, this only happens during startup when creating the data
directories - later, no two threads should try to create the same directory.
Interestingly enough, I frequently encountered this issue on a single core
machine.
collectd-unixsock(5): Slightly improved the description.
15 years agoRevert "libiptc/Makefile.am: Added xtables.h, libxtc.h to libiptc_la_SOURCES." collectd-4.5.3
Revert "libiptc/Makefile.am: Added xtables.h, libxtc.h to libiptc_la_SOURCES."
This reverts commit b6612126d862d182d9219e0512fa9ca833272b62.
This commit should have gone in the master branch, not in the
collectd-4.5 branch.
This reverts commit b6612126d862d182d9219e0512fa9ca833272b62.
This commit should have gone in the master branch, not in the
collectd-4.5 branch.
Bumped version to 4.5.3; Updated ChangeLog.
contrib/cussh.pl: Fixed and improved command parsing.
The input line is now split into separate tokens which are either quoted or
unquoted strings. This simplifies e.g. the parsing of identifiers as the whole
token may be interpreted as just the id string. This allows for specifying a
somewhat greedy regex which before led to the whole remainder of the input
line ending up in the type or type instance.
The input line is now split into separate tokens which are either quoted or
unquoted strings. This simplifies e.g. the parsing of identifiers as the whole
token may be interpreted as just the id string. This allows for specifying a
somewhat greedy regex which before led to the whole remainder of the input
line ending up in the type or type instance.
contrib/cussh.pl: Improved error reporting.
Collectd::Unixsock: Improved error handling in putval().
ipmi plugin: Use a less error-prone approach to build the sensor name.
ipmi plugin: Fix an off-by-one error.
Hi,
One of my ipmi sensors has a name longer than DATA_MAX_NAME_LEN and this
results in a SEGV.
cu Peter
Hi,
One of my ipmi sensors has a name longer than DATA_MAX_NAME_LEN and this
results in a SEGV.
cu Peter
Merge branch 'collectd-4.4' into collectd-4.5
Conflicts:
configure.in
Conflicts:
configure.in
collectd.conf(5): Add documentation for the `notify_email' plugin.
contrib/php-collection: Save/load graph list and fix HTTPS handling.
Hi,
An update to the graphing interface. (incremental patch attached)
This fixes security complaint by a few browsers when page is accessed
via HTTPS and also makes sure the graphs and lists will load if HTTP
and HTTPS paths differ.
Thanks to Mullet- for spotting this issue.
In addition to the fix above this patch adds support for saving
current graph list to a cookie and appending graph list read from
cookie to the currently displayed list.
A future extension would be to allow saving/loading named graph lists
so multiple list can coexist (pretty useful when monitoring multiple
servers/services)
Bruno
Hi,
An update to the graphing interface. (incremental patch attached)
This fixes security complaint by a few browsers when page is accessed
via HTTPS and also makes sure the graphs and lists will load if HTTP
and HTTPS paths differ.
Thanks to Mullet- for spotting this issue.
In addition to the fix above this patch adds support for saving
current graph list to a cookie and appending graph list read from
cookie to the currently displayed list.
A future extension would be to allow saving/loading named graph lists
so multiple list can coexist (pretty useful when monitoring multiple
servers/services)
Bruno
contrib/php-collection: Add a PHP frontend for graph generation.
Hi,
Attached is a patch with a set of PHP files for a complete graphing
environment for collectd-generated RRDs.
Before generating a graph with rrdtool it can tell collectd to flush
the RRDs that are about to be used.
The interface is built with dynamic HTML.
It provides following options:
- host selection
-> plugin selection
--> plugin instance selection
---> type selection
----> type instance selection (or meta graph)
- linear / logarithmic Y-scale
- verbose / minimal legend
- [Add Graph] [Remove all Graphs] [Refresh Graphs]
For each displayed graph:
- Move above previous graph
- Refresh graph
- Remove graph
- Move below following graph
I tested on following browsers:
- Firefox-3.0
- Safari-3.2 (Win32)
- Konqueror (KDE-4.1.3)
- Webkit (webkit-gtk-0_p40220)
- Internet Explorer (6, 7, 8rc - CSS layout issues with <8)
Dependencies:
- PHP-5 (might run with PHP-4)
> GD suport for error images
> Ability to execute rrdtool binary
> Unix socket for FLUSH support
- RRDTool (rrdtool graph, rrdtool info)
TODO: complete/improve graph definitions in definitions.php
though there is code to generate basic graph for any RRD of
unknown type, so definitions are rather a matter of color,
DS combination and stacking.
Bruno
File listing with short description:
- config.php
(configuration)
- functions.php
(common functions)
- definitions.php
(graph definitions for most? types from types.db
- based on collection.cgi)
- definitions.local.php
(place for site-local graph definitions, e.g. for
unixsock, tail, snmp generated RRDs)
- index.php
(main page)
- graph.php
(page returning the graph's PNG image)
- browser.js
(whole bunch of Javascript logic to show/hide/update graphs)
Not included are a few images:
- collectd-logo.png
(16x16, e.g. use collectd.org's favicon)
- favicon.png
(e.g. use the one in share/collection*)
- refresh.png
- move-up.png
- move-down.png
- delete.png
(16x16 take matching ones from your system's action-icons)
Hi,
Attached is a patch with a set of PHP files for a complete graphing
environment for collectd-generated RRDs.
Before generating a graph with rrdtool it can tell collectd to flush
the RRDs that are about to be used.
The interface is built with dynamic HTML.
It provides following options:
- host selection
-> plugin selection
--> plugin instance selection
---> type selection
----> type instance selection (or meta graph)
- linear / logarithmic Y-scale
- verbose / minimal legend
- [Add Graph] [Remove all Graphs] [Refresh Graphs]
For each displayed graph:
- Move above previous graph
- Refresh graph
- Remove graph
- Move below following graph
I tested on following browsers:
- Firefox-3.0
- Safari-3.2 (Win32)
- Konqueror (KDE-4.1.3)
- Webkit (webkit-gtk-0_p40220)
- Internet Explorer (6, 7, 8rc - CSS layout issues with <8)
Dependencies:
- PHP-5 (might run with PHP-4)
> GD suport for error images
> Ability to execute rrdtool binary
> Unix socket for FLUSH support
- RRDTool (rrdtool graph, rrdtool info)
TODO: complete/improve graph definitions in definitions.php
though there is code to generate basic graph for any RRD of
unknown type, so definitions are rather a matter of color,
DS combination and stacking.
Bruno
File listing with short description:
- config.php
(configuration)
- functions.php
(common functions)
- definitions.php
(graph definitions for most? types from types.db
- based on collection.cgi)
- definitions.local.php
(place for site-local graph definitions, e.g. for
unixsock, tail, snmp generated RRDs)
- index.php
(main page)
- graph.php
(page returning the graph's PNG image)
- browser.js
(whole bunch of Javascript logic to show/hide/update graphs)
Not included are a few images:
- collectd-logo.png
(16x16, e.g. use collectd.org's favicon)
- favicon.png
(e.g. use the one in share/collection*)
- refresh.png
- move-up.png
- move-down.png
- delete.png
(16x16 take matching ones from your system's action-icons)
contrib/collection.cgi: Add graph definition for libvirt/virt_cpu_total
Merge branch 'collectd-4.4' of /var/lib/git/collectd into collectd-4.4
build system: Check for the libupsclient library using pkg-config *and* a custom script.
References: #24
References: #24
Merge branch 'collectd-4.4' into collectd-4.5
tcpconns plugin: Fix an endianness problem under *BSD.
The port numbers were assumed to be in the host's byte order, when in
fact they are in network byte order (big endian). The patch adds `ntohs'
where necessary to fix this problem.
Resolves: #35
The port numbers were assumed to be in the host's byte order, when in
fact they are in network byte order (big endian). The patch adds `ntohs'
where necessary to fix this problem.
Resolves: #35
utils_cache: Free then unused memory before returning in an error condition.
utils_cache: Unlock the cache mutex before returning in an error condition.
contrib/cussh.pl: Add the PUTNOTIF command.
I was using this to test notifications for jcollectd like so:
echo "PUTNOTIF host=foo severity=warning message=my perl is rusty" |
perl -Mblib=bindings/perl contrib/cussh.pl
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
I was using this to test notifications for jcollectd like so:
echo "PUTNOTIF host=foo severity=warning message=my perl is rusty" |
perl -Mblib=bindings/perl contrib/cussh.pl
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
ascent plugin: Fix a memory leak.
According to libxml2 API doc, the string returned by
xmlNodeListGetString()
must be freed by the user with
xmlFree()
The attached patch adds the missing calls to xmlFree() for the ascent plugin.
According to libxml2 API doc, the string returned by
xmlNodeListGetString()
must be freed by the user with
xmlFree()
The attached patch adds the missing calls to xmlFree() for the ascent plugin.
Bumped version to 4.5.2; Updated ChangeLog.
Merge branch 'collectd-4.4' into collectd-4.5
Conflicts:
ChangeLog
version-gen.sh
Conflicts:
ChangeLog
version-gen.sh
Bumped version to 4.4.5; Updated ChangeLog.
Merge branch 'collectd-4.4' into collectd-4.5
Conflicts:
src/network.c
Conflicts:
src/network.c
network plugin: Fix an invalid size of buffer being used.
When specifying the amount of data to copy, we used `sizeof (buffer)' where
`buffer' is a pointer, giving 4 or 8 bytes, depending on the architecture (and
not depending on the actual buffer size). This results in the `type' being sent
much more often than necessary and sometimes not sending a new type when is was
actually necessary. The only prominent case in the default configuration(s) was
`cpufreq' being used instead of `cpu', though.
While in the process, the global `type' buffer was replaced, because an
appropriate buffer is in `value_list_t' now.
Much thanks to Bruno Prémont for reporting and debugging this issue :)
References: #37
When specifying the amount of data to copy, we used `sizeof (buffer)' where
`buffer' is a pointer, giving 4 or 8 bytes, depending on the architecture (and
not depending on the actual buffer size). This results in the `type' being sent
much more often than necessary and sometimes not sending a new type when is was
actually necessary. The only prominent case in the default configuration(s) was
`cpufreq' being used instead of `cpu', though.
While in the process, the global `type' buffer was replaced, because an
appropriate buffer is in `value_list_t' now.
Much thanks to Bruno Prémont for reporting and debugging this issue :)
References: #37
network plugin: A fix for the buffer problem for version 4.4.
This patch fixes the same problem as 6605ff1a, the insufficient copying of
values to the `type' buffer.
Thanks again to Bruno Prémont for reporting and debugging this :)
Resolves: #37
This patch fixes the same problem as 6605ff1a, the insufficient copying of
values to the `type' buffer.
Thanks again to Bruno Prémont for reporting and debugging this :)
Resolves: #37
types.db(5): Fix a typo.
types.db(5): Explain in more detail how custom types should be added.
Apparently there was quite some confusion over this.
Apparently there was quite some confusion over this.
Merge branch 'collectd-4.4' into collectd-4.5
Conflicts:
src/utils_dns.c
Conflicts:
src/utils_dns.c
Do not use *printf() to report errors / debugging messages.
The only exception to that is during configuration (which is done before
daemonization) to let the user know about problems immediately.
The only exception to that is during configuration (which is done before
daemonization) to let the user know about problems immediately.
src/Makefile: Do not print the command when checking for POD ERRORS.
Else, the build output would include the word "error" in a cryptically looking
paragraph which might confuse users.
Else, the build output would include the word "error" in a cryptically looking
paragraph which might confuse users.
collectd.conf(5): Updated the section about the "mysql" plugin.
* Do not talk about what RRD files things end up in - there is more than
"rrdtool" by now.
* Updated the section number of the "Server Status Variables" in the MySQL
reference manual.
* Mention that the MySQL user does not need any special privileges.
* Do not talk about what RRD files things end up in - there is more than
"rrdtool" by now.
* Updated the section number of the "Server Status Variables" in the MySQL
reference manual.
* Mention that the MySQL user does not need any special privileges.
collectd: Abort with an appropriate status in exit_usage().
In case of an error, the exit status code now equals 1.
In case of an error, the exit status code now equals 1.
collectd: Abort if any non-options are left over after command-line parsing.
This happens if any arguments not starting with a dash are passed to collectd.
Any of those are invalid, so let the user know about that.
Thanks to Kris (gruntruk) for (unknowingly) pointing that out ;-)
This happens if any arguments not starting with a dash are passed to collectd.
Any of those are invalid, so let the user know about that.
Thanks to Kris (gruntruk) for (unknowingly) pointing that out ;-)
perl plugin, utils_complain: Fixed errors identified by -Wformat-security.
A few "format not a string literal and no format arguments" errors have been
fixed by using "%s" as the format argument.
Thanks to Kevin (onebinary) for reporting this.
A few "format not a string literal and no format arguments" errors have been
fixed by using "%s" as the format argument.
Thanks to Kevin (onebinary) for reporting this.
collectd.conf.in: Fixed a wrong type used in the "tail" example.
collectd.conf.pod: Consistently use spaces instead of tabs in examples.
configfile.c: Ignore registered undefined config keys.
If a registered config key equals NULL, it is now ignored. Before, this would
cause a segfault. As this has happened a few times in the past, we not handle
it sanely.
If a registered config key equals NULL, it is now ignored. Before, this would
cause a segfault. As this has happened a few times in the past, we not handle
it sanely.