bind plugin: "Trivial patch" to make `rr cache' stats work.
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.
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..?
postgresql_default.conf: Added a short usage and copyright header.
postgresql plugin: Made variable names more self-explanatory.
Also, while I was at it, improved some error messages.
Also, while I was at it, improved some error messages.
postgresql_default.conf: Don't use the deprecated {Min,Max}PgVersion options.
collectd.conf(5): Mention that `Oracle' doesn't like semicolons..
.. at the end of the SQL statement.
.. at the end of the SQL statement.
libcollectdclient: Check if the file handle is valid before writing to it.
And free allocated memory when connecting fails. Only assign anything to
the user-provided pointer if `lcc_connect' succeeds. This should make
error-handling much more straight-forward.
And free allocated memory when connecting fails. Only assign anything to
the user-provided pointer if `lcc_connect' succeeds. This should make
error-handling much more straight-forward.
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.
Merge branch 'collectd-4.5' into collectd-4.6
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 ;)
oracle plugin: Fix type size issue under 64bit systems.
Under 64bit systems, `ub4' is of a different size than `size_t', so that a
`(size_t *)' cannot be casted to a `(ub4 *)' automatically.
Under 64bit systems, `ub4' is of a different size than `size_t', so that a
`(size_t *)' cannot be casted to a `(ub4 *)' automatically.
contrib/oracle/create_schema.ddl: Add GPLv2 license information.
In accordance with Roman Klesel,
<C937BDA691901BFAD72AFEF3@ganga.office.noris.de>
In accordance with Roman Klesel,
<C937BDA691901BFAD72AFEF3@ganga.office.noris.de>
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.
src/plugin.c: Assure that targets get dynamically allocated memory.
If targets want to replace the values, they will have to use dynamically
allocated memory. If they can't free the values, because the pointer
might point to statically allocated memory, memory will be lost.
Unfortunately stack allocation will not do, since we will then not be able
to detect multiple replacements.
To impose as little a performance issue as possible, the dynamic allo-
cation is only done when either chain is present. If the filter mecha-
nism is not used, the values will not be copied.
If targets want to replace the values, they will have to use dynamically
allocated memory. If they can't free the values, because the pointer
might point to statically allocated memory, memory will be lost.
Unfortunately stack allocation will not do, since we will then not be able
to detect multiple replacements.
To impose as little a performance issue as possible, the dynamic allo-
cation is only done when either chain is present. If the filter mecha-
nism is not used, the values will not be copied.
Updated various copyright information.
collectd-unixsock(5): Slightly improved the description.
Bumped version to 4.6.1; Updated ChangeLog.
Merge branch 'collectd-4.5' into collectd-4.6
Conflicts:
ChangeLog
version-gen.sh
The changes made in b6612126 and reverted in 5fa56b89 are retained in
collectd-4.6.
Conflicts:
ChangeLog
version-gen.sh
The changes made in b6612126 and reverted in 5fa56b89 are retained in
collectd-4.6.
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.
bind plugin: Fix a typo.
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
bind plugin: Fix a counter vs. gauge problem with memory statistics.
Thanks to Bruno for the heads-up :)
Thanks to Bruno for the heads-up :)
bind plugin: Fix various bugs.
On Mon, 16 February 2009 Florian Forster wrote:
> The new plugins are:
>
> * BIND: Name-server and zone statistics
A few bugs are hidden there, attached is a patch that fixes most
of those I've discovered untils now.
- Url parameter never considered
- missing type definition for dns_reject
- MemoryStats is linked to the wrong variable
(TODO: memory stats seem not to work, probably dispatch_counter()
for gauge value ...)
- SOAOutv6 should be translated to SOA-IPv6 instead of SOA-IPv4
in order to be saved correctly and not cause timestamp collisions
Bruno
On Mon, 16 February 2009 Florian Forster wrote:
> The new plugins are:
>
> * BIND: Name-server and zone statistics
A few bugs are hidden there, attached is a patch that fixes most
of those I've discovered untils now.
- Url parameter never considered
- missing type definition for dns_reject
- MemoryStats is linked to the wrong variable
(TODO: memory stats seem not to work, probably dispatch_counter()
for gauge value ...)
- SOAOutv6 should be translated to SOA-IPv6 instead of SOA-IPv4
in order to be saved correctly and not cause timestamp collisions
Bruno
collectd.conf(5): Removed the section about filter_pcre.
This plugin no longer exists ...
This plugin no longer exists ...
Don't unnecessarily link match_regex against libpcre.
Since no plugin currently uses libpcre, configure no longer checks for it and
it has been removed from README.
Since no plugin currently uses libpcre, configure no longer checks for it and
it has been removed from README.
README: Replaced filter plugins with matches and targets.
README: Added the oracle plugin and libclntsh.
README: Added curl plugin.
Merge branch 'sh/next'
postgresql: Fixed calculation of a database's max_params_num.
This parameter is used to store the size of a frequently used temporary list
and allows that it may be efficiently stored on the stack. It was accidentally
lost in commit 4d380d9, triggering an assertion in c_psql_exec_query_params().
This parameter is used to store the size of a frequently used temporary list
and allows that it may be efficiently stored on the stack. It was accidentally
lost in commit 4d380d9, triggering an assertion in c_psql_exec_query_params().
collectd.conf(5): Fixed some typos.
libcollectdclient: Use `EILSEQ' rather than `EPROTO'.
EPROTO is an XSR (XSI streams) extension and not supported on some
platforms (OpenBSD, apparently).
EPROTO is an XSR (XSI streams) extension and not supported on some
platforms (OpenBSD, apparently).
src/utils_db_query.c: Make `InstancePrefix' and `InstancesFrom' optional.
This is required by the default PostgreSQL queries.
This is required by the default PostgreSQL queries.
Merge branch 'sh/next'
Conflicts:
ChangeLog
Conflicts:
ChangeLog
collectd.conf(5): Fixed and improved the section about the filter mechanism.
src/Makefile.am: Link utils_db_query into the postgresql plugin.
collectd-perl(5): Documented the filter chain support.
ChangeLog: Updated date and fixed a typo.
collectd.conf(5): Fix a minor formatting error.
ChangeLog: Added changes to the perl plugin.
src/filter_chain.c: Made match_proc_t.create optional.
In most cases it does not make sense to not provide a create callback.
However, we never know what the future might bring, so let's chose the more
flexible approach.
In most cases it does not make sense to not provide a create callback.
However, we never know what the future might bring, so let's chose the more
flexible approach.
src/filter_chain.c: Fixed typos in warning / error messages.
perl plugin, Collectd.pm: Added support for filter chains.
fc_register() may now be used to register matches and targets with collectd.
The function takes three arguments: type, name, proc. 'type' has to be any of
FC_MATCH or FC_TARGET, 'name' specifies the name of the target / match and
'proc' is a hash of callbacks (specified by name just like any other
callbacks). There are three types of callbacks: create, destroy and match /
invoke - the former two being optional.
The match / invoke callback has to return any of the following statuses:
FC_MATCH_NO_MATCH, FC_MATCH_MATCHES, FC_TARGET_CONTINUE, FC_TARGET_STOP or
FC_TARGET_RETURN. If none of those constants are used, the behavior is
undefined.
fc_register() may now be used to register matches and targets with collectd.
The function takes three arguments: type, name, proc. 'type' has to be any of
FC_MATCH or FC_TARGET, 'name' specifies the name of the target / match and
'proc' is a hash of callbacks (specified by name just like any other
callbacks). There are three types of callbacks: create, destroy and match /
invoke - the former two being optional.
The match / invoke callback has to return any of the following statuses:
FC_MATCH_NO_MATCH, FC_MATCH_MATCHES, FC_TARGET_CONTINUE, FC_TARGET_STOP or
FC_TARGET_RETURN. If none of those constants are used, the behavior is
undefined.
perl plugin: Do not pass NULL to newRV().
newRV() does not handle that correctly and causes a segfault instead. Now, we
use PL_sv_undef instead.
newRV() does not handle that correctly and causes a segfault instead. Now, we
use PL_sv_undef instead.
Changed plugin_notification_meta_free()'s argument to a notification_meta_t.
This is more flexible and allows the function to be used when using the meta
data without an embedding notification object, e.g. when using the filter
chains.
This is more flexible and allows the function to be used when using the meta
data without an embedding notification object, e.g. when using the filter
chains.
perl plugin: Fixed a memory leak in pplugin_dispatch_notification().
Free the notification meta information that have possibly been allocated in
notification2hv().
Free the notification meta information that have possibly been allocated in
notification2hv().
perl plugin: Convert notification meta data as well.
The notification meta data are represented as an array of hash references:
[
{
name => <name>,
value => <value>
},
...
]
The notification meta data are represented as an array of hash references:
[
{
name => <name>,
value => <value>
},
...
]
perl plugin: Don't ignore the 'interval' member when converting value lists.
swap plugin: Be more sensitive about integer sizes in the *BSD code.
src/filter_chain.c: Document the `meta' argument passed to matches and targets inline.
configure.in: Improve checking for libstatgrab using pkg-config.
swap plugin: Fix another typo in the *BSD code.
Merge branch 'collectd-4.5'
Conflicts:
configure.in
Conflicts:
configure.in
Merge branch 'collectd-4.4' into collectd-4.5
Conflicts:
configure.in
Conflicts:
configure.in
collectd.conf(5): Removed references to the `main' chain.
The chains are now called `PreCache' and `PostCache'.
The chains are now called `PreCache' and `PostCache'.
collectd.conf(5): Add documentation for the `notify_email' plugin.
swap plugin: Fix two typos in the *BSD code.
swap plugin: Added support for OpenBSD and possibly other *BSDs.
ChangeLog: Document Simon's changes.
configure.in: Activate the cpu and swap plugins if sysctl is available.
cpu plugin: Check if all required sysctl defines are present.
Rather than checking for OpenBSD, since this interface may work with
other *BSDs, too. The order of the initialization code has been fixed,
too, and some other minor fixes..
Rather than checking for OpenBSD, since this interface may work with
other *BSDs, too. The order of the initialization code has been fixed,
too, and some other minor fixes..
cpu plugin: Fix indentation for the libstatgrab code.
cpu plugin: Use C99-like stack allocation.
As suggested by octo.
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
As suggested by octo.
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
cpu plugin: Add support for OpenBSD.
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Bumped version to 4.6.0; Updated ChangeLog.
bind plugin: Implement per-zone statistics.
Also, the configuration schema has been improved - hopefully.
Also, the configuration schema has been improved - hopefully.
timediff match: Add a match for values with an invalid time.
The time is compared to the server's local time and values which differ
too much (configurable, of course) are matched.
The time is compared to the server's local time and values which differ
too much (configurable, of course) are matched.
src/utils_db_query.h: Fix a small typo.
15 years agosrc/utils_db_query.c: udb_query_pick_from_list* should add *all* queries of the desir...
src/utils_db_query.c: udb_query_pick_from_list* should add *all* queries of the desired name.
postgresql plugin: Use the DB query module.
The old (legacy) features should still be supported.
The old (legacy) features should still be supported.
src/utils_db_query.[ch]: Add the possibility to `pick' queries by name.
src/utils_db_query.c: Add support for the `Column' configuration option.
The support has been implemented as unobtrusively as possible:
- The `udb_result_t' type now has two new members:
`legacy_mode' and `legacy_position'. The `legacy_mode' member is used
to switch to a new set of functions for handling these special
results.
- Those ``legacy results'' use only a small subset of the members in
`udb_result_t'. The different behavior has been put in the following
functions:
udb_legacy_result_finish_result
udb_legacy_result_handle_result
udb_legacy_result_prepare_result
udb_legacy_result_create
- The non-legacy counterparts to finish, handle, and prepare
automatically call the legacy version if the `legacy_mode' member is
set to `1'.
WARNING: Untested code, the PostgreSQL plugin still needs to be ported.
The support has been implemented as unobtrusively as possible:
- The `udb_result_t' type now has two new members:
`legacy_mode' and `legacy_position'. The `legacy_mode' member is used
to switch to a new set of functions for handling these special
results.
- Those ``legacy results'' use only a small subset of the members in
`udb_result_t'. The different behavior has been put in the following
functions:
udb_legacy_result_finish_result
udb_legacy_result_handle_result
udb_legacy_result_prepare_result
udb_legacy_result_create
- The non-legacy counterparts to finish, handle, and prepare
automatically call the legacy version if the `legacy_mode' member is
set to `1'.
WARNING: Untested code, the PostgreSQL plugin still needs to be ported.
src/utils_db_query.[ch]: Introduces a ``legacy mode''.
When passing `1' as `legacy mode' to `udb_query_create', compatibility
with the postgresql plugin in version 4.5 is enabled. This means that
the options `Query', `MinPGVersion' and `MaxPGVersion' are understood in
the <Query> blocks.
Yet to do is support for the `Column' options. The `Param' option should
probably be implemented using the already existing callback function.
When passing `1' as `legacy mode' to `udb_query_create', compatibility
with the postgresql plugin in version 4.5 is enabled. This means that
the options `Query', `MinPGVersion' and `MaxPGVersion' are understood in
the <Query> blocks.
Yet to do is support for the `Column' options. The `Param' option should
probably be implemented using the already existing callback function.
Fixed various signedness issues identified by -Wextra.
The following two issues have been addressed:
* comparison between signed and unsigned - this was found in several places
throughout the code and has been fixed by switching to more appropriate
types or adding appropriate explicit casts.
* comparison of unsigned expression < 0 is always false - this was found in
the processes and vserver plugins where a size_t had wrongly been used
instead of a ssize_t and an int respectively.
The following two issues have been addressed:
* comparison between signed and unsigned - this was found in several places
throughout the code and has been fixed by switching to more appropriate
types or adding appropriate explicit casts.
* comparison of unsigned expression < 0 is always false - this was found in
the processes and vserver plugins where a size_t had wrongly been used
instead of a ssize_t and an int respectively.