[perl_openvz] rework read_interface
[perl_openvz] fix update error
[perl_openvz] ignore lo interface. report like the real plugin does
[perl_openvz] use hostname over veid
[perl_openvz] allow simulated plugins to be enabled and disabled
Merge branch 'ff/rrd-async'
collectd.conf(5): Improve documentation of CreateFilesAsync.
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.
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.
Fix a NULL pointer dereference during shutdown
Signed-off-by: Florian Forster <octo@collectd.org>
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>
Merge remote-tracking branch 'github-octo/pyr/riemann' into pyr/riemann
riemann plugin: Implement the "StoreRates" option.
ethstat plugin: Fix the map lookup.
Previously, a pointer into the configuration structure was used to look
up the mappings. Because the configuration structure is freed or
otherwise modified, this does not work as intended (and may actually
lead to a segmentation fault when unlucky).
For completeness sake, a shutdown callback was added to free the used
memory on exit.
Fixes Github issue 224.
Previously, a pointer into the configuration structure was used to look
up the mappings. Because the configuration structure is freed or
otherwise modified, this does not work as intended (and may actually
lead to a segmentation fault when unlucky).
For completeness sake, a shutdown callback was added to free the used
memory on exit.
Fixes Github issue 224.
riemann plugin: Use the new strarray interface to allow indefinite number of tags.
src/common.[ch]: Implement strarray_{add,free}.
riemann plugin: Fix two minor bugs.
riemann plugin: Fix a double-free issue with the shared structure.
The reference to the riemann_host structure is shared between the write
and the notification callback. Upon exit, riemann_free() is called twice,
via the user_data_t structure passed to the register functions. Previously
this would have caused a double-free, which is unacceptable.
This patch introduces a reference counter and will only free the structure
(and close the socket) when the last reference is freed.
The locking has been moved out of the riemann_connect() function and into
the riemann_send() function. It is unlikely, but not impossible that two
threads interfere with each other when writing to the socket.
The reference to the riemann_host structure is shared between the write
and the notification callback. Upon exit, riemann_free() is called twice,
via the user_data_t structure passed to the register functions. Previously
this would have caused a double-free, which is unacceptable.
This patch introduces a reference counter and will only free the structure
(and close the socket) when the last reference is freed.
The locking has been moved out of the riemann_connect() function and into
the riemann_send() function. It is unlikely, but not impossible that two
threads interfere with each other when writing to the socket.
riemann plugin: Add support for service names.
I.e. you can not define a "riemann" service in /etc/services and then use
«Port "riemann"» in the configuration. Also add support for arbitrarily
long host names.
I.e. you can not define a "riemann" service in /etc/services and then use
«Port "riemann"» in the configuration. Also add support for arbitrarily
long host names.
riemann plugin: Move the creation of protobufs into their own function.
This also adds a couple more tags, e.g. "type:..." and so on. The "host"
field is now correctly populated from the vl->host or n->host field.
This also adds a couple more tags, e.g. "type:..." and so on. The "host"
field is now correctly populated from the vl->host or n->host field.