Merge branch 'collectd-5.2'
Conflicts:
src/plugin.c
Conflicts:
src/plugin.c
Merge branch 'collectd-5.1' into collectd-5.2
Merge branch 'collectd-4.10' into collectd-5.1
Conflicts:
src/curl_json.c
Conflicts:
src/curl_json.c
curl_xml plugin: Check for a curl_easy_perform() error first
The value of CURLINFO_RESPONSE_CODE isn't valid otherwise.
Also, use the symbolic name CURLE_OK in all plugins where
appropriate.
Change-Id: I17ae9c7eea393ee4641296b5484c93809a662dd9
Signed-off-by: Florian Forster <octo@collectd.org>
The value of CURLINFO_RESPONSE_CODE isn't valid otherwise.
Also, use the symbolic name CURLE_OK in all plugins where
appropriate.
Change-Id: I17ae9c7eea393ee4641296b5484c93809a662dd9
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'ff/rrd-async'
collectd.conf(5): Improve documentation of CreateFilesAsync.
Fix memory leaks when plugin gets no results
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
rrdtool and rrdcached plugins: Don't update the file if ...
... it is being created asynchronously.
... it is being created asynchronously.
src/plugin.c: Assure rf->rf_next_read is initialized.
Otherwise read callbacks will be called twice on startup, causing all
sorts of trouble.
Otherwise read callbacks will be called twice on startup, causing all
sorts of trouble.
src/utils_rrdcreate.c: Lock files to be created.
This works around an issue where RRDtool crashes due to two threads
trying to create the same file at the same time. This shouldn't happen
in normal operation, but an attacker could cause this, e.g. with
specially crafted network packets.
This works around an issue where RRDtool crashes due to two threads
trying to create the same file at the same time. This shouldn't happen
in normal operation, but an attacker could cause this, e.g. with
specially crafted network packets.
src/utils_rrdcreate.c: Add folding markers.
src/utils_rrdcreate.c: Free allocated memory in all error handling cases.
rrdtool, rrdcached plugin: Whitespace fix.
src/utils_rrdcreate.[ch]: Implement the srrd_create_async() function.
This new functionality, which is also exported by the rrdtool and
rrdcached plguins, allows to create new RRD files in the background.
This avoid blocking write threads on the RRD creation, when hundreds of
files need to be created.
See also Github issues #243 and #244.
This new functionality, which is also exported by the rrdtool and
rrdcached plguins, allows to create new RRD files in the background.
This avoid blocking write threads on the RRD creation, when hundreds of
files need to be created.
See also Github issues #243 and #244.
exec plugin: Fix a copy'n'paste mistake in a comment.
Thanks to Robert Riches Jr for the hint.
Thanks to Robert Riches Jr for the hint.
Add upstart configuration file for Ubuntu, Debian and RedHat distros
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'mf/redhat' into collectd-5.2
Fixes Github issue #220.
Fixes Github issue #220.
curl_json plugin: Call yajl_complete_parse() / yajl_parse_complete() only once.
The cURL callback may be called several times, so we need to call the
complete() function after perform() returns.
The cURL callback may be called several times, so we need to call the
complete() function after perform() returns.
src/plugin.c: Use cdtime_t to calculate the sleep intervals.
Since it's easier to do calculations with cdtime_t than struct timespec,
the code becomes easier to read and maintain.
Since it's easier to do calculations with cdtime_t than struct timespec,
the code becomes easier to read and maintain.
Add protection from infinite redirect loops to curl-using plugins
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Fix a NULL pointer dereference during shutdown
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
curl_xml plugin: Fix potential dereference of NULL pointer.
I managed to get collectd to segfault in a couple of places while
playing with it a bit. The first is in the curl_xml module when the
XPATH expression doesn't quite match the input. The crash occurs on line
407 when instance_node->nodeTab[0] is dereferenced. At this point, all
members of instance_node are 0, so dereferencing the array isn't a good
idea. This patch fixes the problem, although I'm not sure if this
particular case actually deserves its own error message.
Signed-off-by: Florian Forster <octo@collectd.org>
I managed to get collectd to segfault in a couple of places while
playing with it a bit. The first is in the curl_xml module when the
XPATH expression doesn't quite match the input. The crash occurs on line
407 when instance_node->nodeTab[0] is dereferenced. At this point, all
members of instance_node are 0, so dereferencing the array isn't a good
idea. This patch fixes the problem, although I'm not sure if this
particular case actually deserves its own error message.
Signed-off-by: Florian Forster <octo@collectd.org>
src/plugin.c: Initialize "next_read" field of read callbacks.
Fixes Github issue #230.
Fixes Github issue #230.
11 years agosrc/Makefile.am: Only add path to lcc_features.h to binaries linked against libcollec...
src/Makefile.am: Only add path to lcc_features.h to binaries linked against libcollectdclient.
Allow out-of-tree builds
The generated header file lcc_features.h and collectd.h cause problems
otherwise.
Signed-off-by: Florian Forster <octo@collectd.org>
The generated header file lcc_features.h and collectd.h cause problems
otherwise.
Signed-off-by: Florian Forster <octo@collectd.org>
src/Makefile.am: Fix compilation of the riemann.proto file.
Merge branch 'collectd-5.2'
Merge branch 'collectd-5.1' into collectd-5.2
Merge branch 'collectd-4.10' into collectd-5.1
Conflicts:
src/curl_json.c
Conflicts:
src/curl_json.c
curl's numeric options are always at minimum long, never int
This can affect portability to some architectures.
Signed-off-by: Florian Forster <octo@collectd.org>
This can affect portability to some architectures.
Signed-off-by: Florian Forster <octo@collectd.org>
postgresql plugin: Fix cast (was breaking aliasing rules).
postgresql.c: In function 'c_psql_flush':
postgresql.c:974: warning: dereferencing type-punned pointer will break strict-aliasing rules
postgresql.c: In function 'c_psql_flush':
postgresql.c:974: warning: dereferencing type-punned pointer will break strict-aliasing rules
pf plugin: Fix checking for <net/pfvar.h>.
The header is not self-contained, so we need to include appropriate
headers in the configure check as well.
The header is not self-contained, so we need to include appropriate
headers in the configure check as well.
pf plugin: Define {F,S}CNT_NAMES.
Apparently they are only defined in the pfctl sources, not in the
system's header files for some reason.
Apparently they are only defined in the pfctl sources, not in the
system's header files for some reason.
pf plugin: Fix a typo.
s/status/state/g
s/status/state/g
cpu plugin: Remove broken debug message.
The message was uninformative and did cast a pointer to an int,
resulting in a compile error.
The message was uninformative and did cast a pointer to an int,
resulting in a compile error.
Merge remote-tracking branch 'github/collectd-5.2' into collectd-5.2
ChangeLog: Fix typo.
ChangeLog: Fixed version number for 5.2.1 ;-)
src/utils_tail.c: Remove multiple newlines at EOL.
Merge remote-tracking branch 'github-tokkee/sh/netapp'
Merge remote-tracking branch 'github-tokkee/sh/postgresql'
write_graphite plugin: Change <Carbon> blocks to <Node> blocks.
Many other write plugins, e.g. write_{mongodb,redis,riemann} use the
<Node "name"> syntax. This adds code to handle this syntax as well.
While the documentation doesn't mention it, the old <Carbon> syntax
(without a name) is still supported for backwards compatibility.
Many other write plugins, e.g. write_{mongodb,redis,riemann} use the
<Node "name"> syntax. This adds code to handle this syntax as well.
While the documentation doesn't mention it, the old <Carbon> syntax
(without a name) is still supported for backwards compatibility.
postgresql plugin: If a query fails, try to reconnect immediately.
Else, we would unnecessarily skip one iteration even when being able to
reconnect right away.
Else, we would unnecessarily skip one iteration even when being able to
reconnect right away.
postgresql plugin: Don't do any SQL query when checking the connection.
First of all, this is not needed -- PQstatus() will correctly determine a
failed connection without that. Secondly, the "SELECT 42" that was used before
does not work, e.g. when querying PgBouncer (thanks to renchap for reporting
this on IRC!).
First of all, this is not needed -- PQstatus() will correctly determine a
failed connection without that. Secondly, the "SELECT 42" that was used before
does not work, e.g. when querying PgBouncer (thanks to renchap for reporting
this on IRC!).
Updated ChangeLog.
Merge remote-tracking branch 'origin/collectd-5.2' into collectd-5.2
Bumped version to 5.2.1; Updated ChangeLog.
Merge branch 'collectd-5.1' into collectd-5.2
Conflicts:
ChangeLog
src/write_graphite.c
version-gen.sh
Conflicts:
ChangeLog
src/write_graphite.c
version-gen.sh
Bumped version to 5.1.2; Updated ChangeLog.
Added "tar-pax" (bugfix for long filenames with make distcheck)
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
netapp plugin: Updated copyright information.
netapp plugin: Added support for quota statistics.
If enabled, the plugin collects the used space and the number of used files
based on qtree quotas. The interval at which those information is collected
may be configured.
If enabled, the plugin collects the used space and the number of used files
based on qtree quotas. The interval at which those information is collected
may be configured.
src/Makefile.am: Fix "make distcheck".
protoc-c has a weird handling of files not in the CWD: They have to be
specified with the "-I" option _and_ you need to specify the full path
to the file.
protoc-c has a weird handling of files not in the CWD: They have to be
specified with the "-I" option _and_ you need to specify the full path
to the file.
netapp plugin: Added support for collecting dedup/compressed saved info.
This information is available from the SIS subsystem starting with OnTap 8.1.
This information is available from the SIS subsystem starting with OnTap 8.1.
bugfix ("cannot find collectd.h") for branch master (and 5.2)
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
make distcheck : perllocal.pod was missing. Fixed
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Fix make distcheck (against release 5.1.1)
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
netapp plugin: Added VFiler® support.
The plugin now accepts the <VFiler> config block (inside <Host> blocks). This
is treated similar to <Host> blocks (it accepts all the same config options)
and it inherits all connection related settings from the surrounding <Host>
block (which may, however, be overwritten inside the <VFiler> block). However,
all data collecting operations are done in the context of the specified
VFiler®.
The plugin now accepts the <VFiler> config block (inside <Host> blocks). This
is treated similar to <Host> blocks (it accepts all the same config options)
and it inherits all connection related settings from the surrounding <Host>
block (which may, however, be overwritten inside the <VFiler> block). However,
all data collecting operations are done in the context of the specified
VFiler®.
netapp plugin: Added support for SnapVault® statistics.
If enabled, the plugin collects lag time, transfer duration and transferred
bytes for each relationship. The interval at which those information is
collected may be configured.
If enabled, the plugin collects lag time, transfer duration and transferred
bytes for each relationship. The interval at which those information is
collected may be configured.
write_riemann plugin: Implement communication over TCP.
logfile plugin: Make "do_close" a boolean.
If the file isn't closed such as when logging to stdout or stderr the file must be flushed for it to get out of the IO buffers right away.
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
postgresql plugin: Don't access realloc'ed memory.
D'oh! This is the most stupidest bug: all database connection objects are
stored in a plugin-global array and a pointer to each object was passed around
to the worker functions. This array used to be an array of objects (rather
than pointers) and was realloc'ed every time a new connection was added. Now,
the realloc caused the old pointer to not be valid any more, thus, any but the
last database connection were later accessing memory out of range. This caused
the plugin to segfault if more than one database connection was used.
Thanks to Greg Swift for reporting this!
Fixes Github issue #238.
D'oh! This is the most stupidest bug: all database connection objects are
stored in a plugin-global array and a pointer to each object was passed around
to the worker functions. This array used to be an array of objects (rather
than pointers) and was realloc'ed every time a new connection was added. Now,
the realloc caused the old pointer to not be valid any more, thus, any but the
last database connection were later accessing memory out of range. This caused
the plugin to segfault if more than one database connection was used.
Thanks to Greg Swift for reporting this!
Fixes Github issue #238.
write_riemann plugin: Implement the "AlwaysAppendDS" option.
write_riemann plugin: Use format_name() to generate the service name.
This uses the default "plugin-instance/type-instance" format, optionally
adding the ds name if the type has more than one data source.
This uses the default "plugin-instance/type-instance" format, optionally
adding the ds name if the type has more than one data source.
write_riemann plugin: Update copyright information.
write_riemann plugin: Fix two bugs in the example configuration.
Remove a trailing ">" from the example config and use the correct config
item to configure the "StoreRates" option.
Remove a trailing ">" from the example config and use the correct config
item to configure the "StoreRates" option.
src/plugin.c: Make the context cloning a bit more implicit.
The plugin_set_ctx() call has been moved into the plugin_write_dequeue()
function. Comments describing the unavailability of the context have
been updated.
The plugin_set_ctx() call has been moved into the plugin_write_dequeue()
function. Comments describing the unavailability of the context have
been updated.
plugin: Pass on read-plugins' contexts to the write threads.
Else, the write plugins will have wrong or missing interval information when
actually writing a data-set.
Signed-off-by: Florian Forster <octo@collectd.org>
Else, the write plugins will have wrong or missing interval information when
actually writing a data-set.
Signed-off-by: Florian Forster <octo@collectd.org>
src/plugin.c: Fill in the time and interval before queueing the value list.
This feels a bit hackish, but it should do the job.
This feels a bit hackish, but it should do the job.
src/plugin.c: Improve error messages in plugin_load().
Fixes Github issue #237.
Fixes Github issue #237.
README, AUTHORS: Update for the write_riemann plugin.
Merge branch 'pyr/riemann'
Resolves Github issue #221.
Resolves Github issue #221.
src/plugin.[ch]: Remove the plugin_dispatch_values_secure() function.
Since values are now *always* copied, we don't need the secure version
anymore.
Since values are now *always* copied, we don't need the secure version
anymore.
src/plugin.[ch]: Use a pool of write threads to dispatch values to write plugins.
This fixes Github issue #75.
This fixes Github issue #75.
dbi plugin, collectd.conf(5): Document the "Host" option.
Previously called "Hostname".
Previously called "Hostname".
src/utils_dns.c: Improve ordering of includes.
sys, followed by net, followed by netinet, followed by arpa
that should be the most logical order
Signed-off-by: Florian Forster <octo@collectd.org>
sys, followed by net, followed by netinet, followed by arpa
that should be the most logical order
Signed-off-by: Florian Forster <octo@collectd.org>
write_riemann plugin: Remove the "Delay" option.
dbi plugin: Replace cdbi_config_set_string() with cf_util_get_string().
11 years agoAdd Hostname option to dbi plugin. Use cdbi_config_set_string and fix udb_query_prepa...
Add Hostname option to dbi plugin. Use cdbi_config_set_string and fix udb_query_prepare_result argument
Add Hostname option to Database block of dbi plugin
write_riemann plugin: Remove unused defines.
collectd.conf(5): Add documentation for the write_riemann plugin.
write_riemann plugin: Unify the plugin's configuration semantic.
The "write_mongodb" and "write_redis" plugins follow the same general
config schema, i.e. <Node /> blocks with "Host" and "Port" options.
Adapt the same style for "write_riemann".
The "write_mongodb" and "write_redis" plugins follow the same general
config schema, i.e. <Node /> blocks with "Host" and "Port" options.
Adapt the same style for "write_riemann".
write_graphite plugin: Remove two more redundant error messages.
The failing functions already print an error message; don't spam the logs
by duplicating this.
Further fixes Github issue #236.
The failing functions already print an error message; don't spam the logs
by duplicating this.
Further fixes Github issue #236.
src/utils_complain.[ch]: Fix the complaint mechanism after the sub-second change.
write_graphite: Use the complain mechanism to report connection errors.
Fixes Github issue #236. Thanks to @pyr for reporting it!
Fixes Github issue #236. Thanks to @pyr for reporting it!
src/collectd.conf.in: Rename "riemann" to "write_riemann".
write_riemann plugin: Ensure a unified logging prefix.
write_riemann plugin: Rename the "riemann" plugin.
riemann plugin: Clean up the riemann_connect() function.
Don't warn when connecting to some address fails. The system could, for
example, not have any IPv6 connectivity but the address record also
includes an IPv6 address. In this case a connect(2) call will fail but
this is not a problem.
Due to the new locking one of the concurrency checks was made redundant.
Don't warn when connecting to some address fails. The system could, for
example, not have any IPv6 connectivity but the address record also
includes an IPv6 address. In this case a connect(2) call will fail but
this is not a problem.
Due to the new locking one of the concurrency checks was made redundant.
Merge remote-tracking branch 'origin/collectd-5.2' into collectd-5.2
write_graphite: Decrease a buffer size.
If the buffer is too large, it is possible that the message cannot be
send using the send buffer, leading to a failed assertion in
wg_send_message().
Fixes Github issue #226. Thanks to @bwhaley for reporting this.
If the buffer is too large, it is possible that the message cannot be
send using the send buffer, leading to a failed assertion in
wg_send_message().
Fixes Github issue #226. Thanks to @bwhaley for reporting this.
Look for IOPowerSources.h on Darwin only
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
dbi plugin: Implement support for numeric options.
Fixes Github issue #233.
Fixes Github issue #233.
Merge branch 'collectd-5.2'
Merge branch 'collectd-5.1' into collectd-5.2
Merge branch 'collectd-4.10' into collectd-5.1
dbi plugin: Replace cdbi_config_set_string() with cf_util_get_string().
Fixed a small typo in the ethstat plugin
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>