Let plugin_dispatch_values() set value_list.time in case of 'now'.
Basically any (read) plugin was calling time(NULL) to set the time of a values
list. This is now done by plugin_dispatch_values() in case the time is zero
(which is the case when using VALUE_LIST_INIT or VALUE_LIST_STATIC).
This change slightly simplifies the code and makes future changes to the time
management (like the possibly upcoming subsecond resolution support) less
intrusive in respect to the amount of required code changes.
Basically any (read) plugin was calling time(NULL) to set the time of a values
list. This is now done by plugin_dispatch_values() in case the time is zero
(which is the case when using VALUE_LIST_INIT or VALUE_LIST_STATIC).
This change slightly simplifies the code and makes future changes to the time
management (like the possibly upcoming subsecond resolution support) less
intrusive in respect to the amount of required code changes.
Converted timeval_sub_timespec() to timeval_cmp().
The third (return) argument is now of type 'struct timeval' (instead of
'struct timespec') as well. Also, it may now be NULL, in which case the
difference is not returned. This is a more general and thus more flexible
approach that permitted to remove the custom timeval_sub*() implementations in
the multimeter and ntpd plugins.
The return value has been changed to reflect the return value used by
functions like strcmp(), i.e. it is less than, equal to, or greater than zero
if the first argument is less than, equal to, or greater than the second
argument respectively.
In the cases where a 'struct timespec' is required, the return value is now
converted by multiplying the tv_usec member with 1000.
The third (return) argument is now of type 'struct timeval' (instead of
'struct timespec') as well. Also, it may now be NULL, in which case the
difference is not returned. This is a more general and thus more flexible
approach that permitted to remove the custom timeval_sub*() implementations in
the multimeter and ntpd plugins.
The return value has been changed to reflect the return value used by
functions like strcmp(), i.e. it is less than, equal to, or greater than zero
if the first argument is less than, equal to, or greater than the second
argument respectively.
In the cases where a 'struct timespec' is required, the return value is now
converted by multiplying the tv_usec member with 1000.
configure: Do not conditionally use AM_CONDITIONAL().
Defining HAVE_BROKEN_PERL_LOAD_MODULE was done conditionally which would cause
configure to fail in case it's not defined.
Defining HAVE_BROKEN_PERL_LOAD_MODULE was done conditionally which would cause
configure to fail in case it's not defined.
collectd-exec(5): Fixed a typo.
collectd.conf(5): Explain the traffic collected by the vserver plugin.
The plugin collects the amount of traffic passing a socket instead of the
actual on-wire traffic.
Thanks to cedric for reporting this.
Resolves: #40
The plugin collects the amount of traffic passing a socket instead of the
actual on-wire traffic.
Thanks to cedric for reporting this.
Resolves: #40
collectd.conf(5): Added a note about rotating log files.
References: #39
References: #39
.gitignore: Added src/libcollectdclient/libcollectdclient.pc.
Also, removed some unnecessary entries.
Also, removed some unnecessary entries.
build system: Check for and work-around broken Perl_load_module().
Configure now checks for a broken Perl_load_module() definition as introduced
in Perl 5.10 which incorrectly uses __attribute__nonnull__(3). If that has been
detected, the perl plugin will now be built using -Wno-nonnull, thus ignoring
the warning / error produced by the nonnull attribute.
References: #41
Resolves: #42
Configure now checks for a broken Perl_load_module() definition as introduced
in Perl 5.10 which incorrectly uses __attribute__nonnull__(3). If that has been
detected, the perl plugin will now be built using -Wno-nonnull, thus ignoring
the warning / error produced by the nonnull attribute.
References: #41
Resolves: #42
filter_ignore: Remove this plugin.
The functionality is now implemented in the more general chain mechanism.
The functionality is now implemented in the more general chain mechanism.
AUTHORS: Add many people I forgot to add over the last months.
I think I got everybody covered. I definitely checked all post-4.5
commits.
I think I got everybody covered. I definitely checked all post-4.5
commits.
15 years agoipmi plugin: Improve error handling and handle a temporary error condition more grace...
ipmi plugin: Improve error handling and handle a temporary error condition more gracefully.
On a server IPMI readings suddenly failed causing the plugin to stop
collecting data.
The following entries got logged:
ipmi plugin: sensor_read_handler: Removing sensor Temp 7 processor (3.6), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 6 processor (3.5), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 5 power_supply (10.5), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 4 processor (3.4), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 3 processor (3.3), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 2 external_environment (39.1), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 1 system_internal_expansion_board (16.1), because it failed with status 0x10000d5.
This patch attempts to provide slightly better error message and just
skip current reading iteration if the error
IPMI_NOT_SUPPORTED_IN_PRESENT_STATE_CC is indicated.
This error happens e.g. when iLo firmware is upgraded (or reboots?) on
HP servers.
On a server IPMI readings suddenly failed causing the plugin to stop
collecting data.
The following entries got logged:
ipmi plugin: sensor_read_handler: Removing sensor Temp 7 processor (3.6), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 6 processor (3.5), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 5 power_supply (10.5), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 4 processor (3.4), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 3 processor (3.3), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 2 external_environment (39.1), because it failed with status 0x10000d5.
ipmi plugin: sensor_read_handler: Removing sensor Temp 1 system_internal_expansion_board (16.1), because it failed with status 0x10000d5.
This patch attempts to provide slightly better error message and just
skip current reading iteration if the error
IPMI_NOT_SUPPORTED_IN_PRESENT_STATE_CC is indicated.
This error happens e.g. when iLo firmware is upgraded (or reboots?) on
HP servers.
collectd.conf(5): Fix a typo.
collectd.conf(5): Documented the `{Pre,Post}CacheChain' options.
src/plugin.c: If the pre-cache chain returns `stop', dont update the cache.
Don't run the post-cache chain, either.
Don't run the post-cache chain, either.
src/plugin.c: Add the `{Pre,Post}CacheChain' options and appropriate chains.
The PreCacheChain is executed before the values are added to the cache, the
PostCacheChain afterwards. If no post-cache chain is given, values will be
dispatched to all write plugins by default.
The PreCacheChain is executed before the values are added to the cache, the
PostCacheChain afterwards. If no post-cache chain is given, values will be
dispatched to all write plugins by default.
collectd.conf(5): Document the `{Min,Max}Version' options of the dbi plugin.
src/utils_db_query.c: Implement the (deprecated) `{Min,Max}PGVersion' options.
This is for compatibility with old configuration of the postgresql plugin.
This is for compatibility with old configuration of the postgresql plugin.
dbi plugin: Use the server version to only use appropriate queries.
src/utils_db_query.[ch]: Add support for min-/max-version.
These settings can be used to check if a particular query is suited to the
database server version we're currently connected to.
These settings can be used to check if a particular query is suited to the
database server version we're currently connected to.
oracle plugin: Use the DB query module.
This simplifies the oracle plugin considerably.
This simplifies the oracle plugin considerably.
src/utils_db_query.c: When asked for the user data, return the user data.
Appreciate this patch, it cost me one fucking hour of my live!
Appreciate this patch, it cost me one fucking hour of my live!
dbi plugin: Put the row handling logic in an extra module.
The `utils_db_query' module now handles config parsing and row handling.
This unifies basically all of the <Query> blocks, so that the `dbi' and
`oracle' plugins behave exactly alike. Porting the `postgresql' plugin
should be possible, too, so that all three database plugins are in line.
The `utils_db_query' module now handles config parsing and row handling.
This unifies basically all of the <Query> blocks, so that the `dbi' and
`oracle' plugins behave exactly alike. Porting the `postgresql' plugin
should be possible, too, so that all three database plugins are in line.
collectd.conf: Updated the example postgresql plugin configuration.
dbi plugin: Fixed error handling in an inner loop.
The macro BAIL_OUT_CONTINUE() is used inside the loop iterating over the
result sets to clean up and continue with the next loop iteration. In two
cases this was used in a loop iterating over the instances and values lists
contained within that loop as well though. This would cause the memory that
was currently written to (the two target lists) to be freed and thus cause a
possible segfault. In any case it would leave behind inconsistent and most
probably uninitialized data. The usage of that macro has now been pulled out
of the inner loops.
The macro BAIL_OUT_CONTINUE() is used inside the loop iterating over the
result sets to clean up and continue with the next loop iteration. In two
cases this was used in a loop iterating over the instances and values lists
contained within that loop as well though. This would cause the memory that
was currently written to (the two target lists) to be freed and thus cause a
possible segfault. In any case it would leave behind inconsistent and most
probably uninitialized data. The usage of that macro has now been pulled out
of the inner loops.
postgresql plugin: Added support for the "interval" parameter.
This query parameter expands to the interval collectd is using.
This query parameter expands to the interval collectd is using.
postgresql plugin: Added support for <Result> blocks.
This is a replacement for the "Column" config option (which has been
deprecated). <Result> blocks allow for much more flexible handling of the
data. Besides being able to use data types with multiple data sources, the
plugin now supports to generate the type instance using information from the
database.
An example <Result> block might look like this (taken from the manpage):
<Result>
Type counter
InstancePrefix "rt36_tickets"
InstancesFrom "type"
ValuesFrom "count"
</Result>
This is a replacement for the "Column" config option (which has been
deprecated). <Result> blocks allow for much more flexible handling of the
data. Besides being able to use data types with multiple data sources, the
plugin now supports to generate the type instance using information from the
database.
An example <Result> block might look like this (taken from the manpage):
<Result>
Type counter
InstancePrefix "rt36_tickets"
InstancesFrom "type"
ValuesFrom "count"
</Result>
postgresql plugin: Reinitialize a database after reconnecting.
During initialization we get the right version of each query definition. After
reconnecting, the PostgreSQL server version might have changed, so we might
need to update some of the query definitions.
During initialization we get the right version of each query definition. After
reconnecting, the PostgreSQL server version might have changed, so we might
need to update some of the query definitions.
utils_complain: Added macro c_would_release().
This macro returns true if the specified complaint would be released, false
else. This is useful e.g. to do further actions when releasing a complaint.
This macro returns true if the specified complaint would be released, false
else. This is useful e.g. to do further actions when releasing a complaint.
src/collectd.conf.in: Add default stuff for the oracle and openvpn plugins.
oracle plugin: Add <Result> blocks.
With these blocks it's possible to receive more than one value (per row)
from one SQL statement.
With these blocks it's possible to receive more than one value (per row)
from one SQL statement.
csv plugin: Make the output to STDOUT compatible to the exec plugin.
Probably not that useful, but the output written to STDOUT by the csv
plugin is not in the form accepted by the exec plugin. This makes some
potentially interesting hacks possible ;)
Probably not that useful, but the output written to STDOUT by the csv
plugin is not in the form accepted by the exec plugin. This makes some
potentially interesting hacks possible ;)
dbi plugin: Add <Result> blocks.
With these blocks it's possible to receive more than one value (per row)
from one SQL statement.
With these blocks it's possible to receive more than one value (per row)
from one SQL statement.
libcollectdclient: Add a .pc file for pkg-config.
processes plugin: Fix the ARG_MAX stuff yet again.
The `sysconf' approach does not work when doing something like
char cmdline[ARG_MAX];
which is exactly what was done in the processes plugin.
Just use 4k whenever the define is not available - ought to be enough
for anybody! ;)
The `sysconf' approach does not work when doing something like
char cmdline[ARG_MAX];
which is exactly what was done in the processes plugin.
Just use 4k whenever the define is not available - ought to be enough
for anybody! ;)
processes plugin: Make sure ARG_MAX is defined.
Apparently the GNU libc 2.8 removed the macro for some unholy reason. We
either use `sysconf(3)' transparently (if available) or 4kByte (the
POSIX minimum).
Thanks to dD0T for reporting the problem :)
Apparently the GNU libc 2.8 removed the macro for some unholy reason. We
either use `sysconf(3)' transparently (if available) or 4kByte (the
POSIX minimum).
Thanks to dD0T for reporting the problem :)
libcollectdclient: Fix the SSTRCAT macro.
The size passed to `strncat' is not the total size of the buffer, so GCC
with _FORTIFY_SOURCE rightfully complained about this macro.
Thanks to dD0T for reporting this :)
The size passed to `strncat' is not the total size of the buffer, so GCC
with _FORTIFY_SOURCE rightfully complained about this macro.
Thanks to dD0T for reporting this :)
postgresql plugin: Renamed the "Query" config option to "Statement".
This makes slightly more sense and is more consistent with the dbi and oracle
plugins.
This makes slightly more sense and is more consistent with the dbi and oracle
plugins.
Collectd::Graph::Common.pm: Include Collectd::Unixsock.
This module is required to send the "FLUSH" command to collectd using the UNIX
domain socket provided by the "unixsock" plugin.
This module is required to send the "FLUSH" command to collectd using the UNIX
domain socket provided by the "unixsock" plugin.
Merge branch 'collectd-4.5'
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
src/utils_rrdcreate.c: Fix support for non-threadsafe libraries.
collectd.conf(5): Add some preliminary documentation for the bind plugin.
Merge branch 'bp/bind'
utils_cache: Free then unused memory before returning in an error condition.
utils_cache: Unlock the cache mutex before returning in an error condition.
memcached plugin: Make absolutely sure, we don't divide by zero.
It's a well-known fact only Chuck Norris can do that!
It's a well-known fact only Chuck Norris can do that!
memcached plugin: Add hitratio metric.
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/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>
bind plugin: Don't use LLONG_{MIN,MAX} to increase portability.
Sagly, there's a bug in some versions of GCC/GNU libc which leads to LLONG_*
not being defined. We'll check the return value of strtoll for `>0' and `<0',
which should do the trick, too.
Sagly, there's a bug in some versions of GCC/GNU libc which leads to LLONG_*
not being defined. We'll check the return value of strtoll for `>0' and `<0',
which should do the trick, too.
Merge branch 'master' into bp/bind
src/common.h: Add the IS_TRUE and IS_FALSE macros.
They should be used to check if a string is "true|yes|on" or
"false|no|off" from now on.
They should be used to check if a string is "true|yes|on" or
"false|no|off" from now on.
bind plugin: Reworked Bruno's patch to remove repeating code.
bind plugin: Eliminate the `goto' in `bind_xml'.
bind plugin: Put removal of special characters in separate function.
bind plugin: Be more specific about the features we need.
bind plugin: Fix a misplaced comma.
bind plugin: Add a new plugin for BIND 9.5 and 9.6 statistics.
Attached are patches for collectd-4.5.x and collectd-4.4.x series for a
plugin to collect statistics from a ISC Bind server.
ISC Bind introduces XML-based statistics which can be fetched via HTTP
starting with bind-9.5.0 and updated the XML structure with bind-9.6.0.
Both XML formats are supported by this plugin.
To enable access to these statistics, use the following configuration
block:
statistics-channels {
inet localhost port 8053 allow { localhost; };
};
Suggestions on improving the grouping of statistics values are welcome,
currently the following groups are implemented:
RRQueriesIn type=dns_qtype
Requests type=dns_request
QueryResults type=dns_rcode
Updates type=dns_update
ZoneMaintenance type=dns_zops
Resolver type=dns_resolver
Bruno
Attached are patches for collectd-4.5.x and collectd-4.4.x series for a
plugin to collect statistics from a ISC Bind server.
ISC Bind introduces XML-based statistics which can be fetched via HTTP
starting with bind-9.5.0 and updated the XML structure with bind-9.6.0.
Both XML formats are supported by this plugin.
To enable access to these statistics, use the following configuration
block:
statistics-channels {
inet localhost port 8053 allow { localhost; };
};
Suggestions on improving the grouping of statistics values are welcome,
currently the following groups are implemented:
RRQueriesIn type=dns_qtype
Requests type=dns_request
QueryResults type=dns_rcode
Updates type=dns_update
ZoneMaintenance type=dns_zops
Resolver type=dns_resolver
Bruno
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.
network plugin: Make the receive thread even faster.
On very busy systems, the thread apparently may not be scheduled often enough.
So the receive buffer fills up quickly and data may be lost.
This patch changes the `mutex_lock' to a `mutex_trylock' and data is only
appended to the global receive-queue if the lock can be obtained without
blocking.
If the lock cannot be obtained without blocking, the data is instead appended
to a private queue and that queue is appended to the global queue when the lock
can next be taken.
On very busy systems, the thread apparently may not be scheduled often enough.
So the receive buffer fills up quickly and data may be lost.
This patch changes the `mutex_lock' to a `mutex_trylock' and data is only
appended to the global receive-queue if the lock can be obtained without
blocking.
If the lock cannot be obtained without blocking, the data is instead appended
to a private queue and that queue is appended to the global queue when the lock
can next be taken.
Merge branch 'dm/t_option'
collectd: Don't *abort* on the first read-error with the `-T' option.
The `-T' option used to basically quit the daemon right away when the
first read function of a plugin failed. This patch changes the behavior,
so that:
- All read-functions are tried. If one or more fail, the daemon will
exit with a non-zero exit status, but all read-functions will be
tried.
- Don't quit if one read-function failed without calling all the
shutdown-functions first. This will clean up the UNIX socket of the
unixsock plugin and stuff like that.
The `-T' option used to basically quit the daemon right away when the
first read function of a plugin failed. This patch changes the behavior,
so that:
- All read-functions are tried. If one or more fail, the daemon will
exit with a non-zero exit status, but all read-functions will be
tried.
- Don't quit if one read-function failed without calling all the
shutdown-functions first. This will clean up the UNIX socket of the
unixsock plugin and stuff like that.
collectd: Add the -T option.
The -T switch:
- implies -f
- does not start any read threads
- invokes callback() foreach list_read and will exit 1 on failure, 0
otherwise
Makes for a nicer dryrun than -f + ^C, also makes it possible to wrap
with a test harness such as Test.pm
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
The -T switch:
- implies -f
- does not start any read threads
- invokes callback() foreach list_read and will exit 1 on failure, 0
otherwise
Makes for a nicer dryrun than -f + ^C, also makes it possible to wrap
with a test harness such as Test.pm
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
src/collectd.h: #undef macros before poisoning them.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
csv plugin: Make it possible to write values to STDOUT.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
openvpn plugin: Added support for LZO compression.
There are four counters for pre/post (de)compression. The code compares
the pre/post counters and submits the current compression ratio based on
the counter change rate.
The type `compression_ratio' (gauge) is used to store the data.
There are four counters for pre/post (de)compression. The code compares
the pre/post counters and submits the current compression ratio based on
the counter change rate.
The type `compression_ratio' (gauge) is used to store the data.
src/common.[ch]: Add `counter_diff', a function to calculate the difference of two counters.
It's not just a simple (old - new), because wrap-around is handled, too.
It's not just a simple (old - new), because wrap-around is handled, too.
processes plugin: Collect VM and stack size stats on Linux.
On other operating systems those values will currently always be zero since I
do not have appropriate test systems available.
The new types "ps_stacksize" and "ps_vm" have been added to types.db.
On other operating systems those values will currently always be zero since I
do not have appropriate test systems available.
The new types "ps_stacksize" and "ps_vm" have been added to types.db.
.gitignore: Added libcollectclient stuff.
libcollectdclient: Added LCC_{BEGIN,END}_DECLS macros.
These macros define an extern "C" block when using C++. This allows to use the
headers from C++ as well.
These macros define an extern "C" block when using C++. This allows to use the
headers from C++ as well.
libcollectdclient: Added header lcc_features.h.
This header provides various macros and functions that may be used to
determine the version of libcollectdclient (i.e. collectd). The file will be
auto-created from lcc_features.h.in by configure.
The macro LCC_VERSION (previously defined in client.h) has been moved to this
header as well and has been renamed to LCC_API_VERSION.
This allows for fine grained version checks at compile- and runtime.
This header provides various macros and functions that may be used to
determine the version of libcollectdclient (i.e. collectd). The file will be
auto-created from lcc_features.h.in by configure.
The macro LCC_VERSION (previously defined in client.h) has been moved to this
header as well and has been renamed to LCC_API_VERSION.
This allows for fine grained version checks at compile- and runtime.
openvpn plugin: Some small cleanups.
value match: Add the `DataSource' and `Satisfy' configuration options.
This adds quite some flexibility to the match. collectd.conf(5) is kept
up to date, too.
This adds quite some flexibility to the match. collectd.conf(5) is kept
up to date, too.
Merge branch 'collectd-4.5'
Conflicts:
src/types.db.pod
Conflicts:
src/types.db.pod
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.
contrib/README: Add the solaris-smf subdirectory.
contrib/solaris-smf: Add Solaris SMF information to contrib/.
See README or <http://phosowicz.jogger.pl/2008/12/21/smf-izing-collectd/> for
details.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
See README or <http://phosowicz.jogger.pl/2008/12/21/smf-izing-collectd/> for
details.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'dm/openvpn'
collectd.conf(5): Fix two typos.
collectd.conf(5): Added information about the openvpn plugin.
openvpn plugin: Add a plugin to read OpenVPN statistics.
Simple but useful module for monitoring per-client openvpn traffic..
The plugin reads a statistics file maintained by OpenVPN. The location of the
statistics file is configurable.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Simple but useful module for monitoring per-client openvpn traffic..
The plugin reads a statistics file maintained by OpenVPN. The location of the
statistics file is configurable.
Signed-off-by: Doug MacEachern <dougm@hyperic.com>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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
libcollectdclient: Don't use `PF_UNIX', it's broken on Mac OS X.
Under Mac OS X (10.4, possibly others), PF_UNIX is defined as PF_LOCAL, which
in turn is defined as AF_LOCAL. AF_LOCAL, however, is only defined if
POSIX_C_SOURCE is not.
Under Mac OS X (10.4, possibly others), PF_UNIX is defined as PF_LOCAL, which
in turn is defined as AF_LOCAL. AF_LOCAL, however, is only defined if
POSIX_C_SOURCE is not.
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
src/utils_subst.c: Print the warning of the subst_string function when appropriate.
A leftover from the previous setting, a hard-coded maximum, was forgotten.
A leftover from the previous setting, a hard-coded maximum, was forgotten.
notification target: Add a target that dispatches notifications.
Not tested very well yet, but it works essentially.
Not tested very well yet, but it works essentially.
src/common.c: Change `sstrdup' to not call `strdup' anymore.
src/utils_subst.[ch]: Implement `subst_string'.
Works like `subst', but instead of specifying start and end offsets you
specify `needle', the string that is to be replaced. If `needle' is found
in `string' (using strstr(3)), the offset is calculated and `subst' is
called with the determined parameters.
Works like `subst', but instead of specifying start and end offsets you
specify `needle', the string that is to be replaced. If `needle' is found
in `string' (using strstr(3)), the offset is calculated and `subst' is
called with the determined parameters.
types.db(5): Fix a typo.
replace target: Add a target to replace part of an identifier..
..using regular expressions.
Possible future improvements: Use submatches in the replacement string,
similar to sed's \1, \2, ... back-references.
..using regular expressions.
Possible future improvements: Use submatches in the replacement string,
similar to sed's \1, \2, ... back-references.
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.5'
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.