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!).
write_riemann plugin: Implement communication over TCP.
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".
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".
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.
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.
riemann plugin: Make all private funcitons and module-global variables "static".
riemann plugin: Remove trailing white-space.
riemann plugin: Improve the riemann_send() function.
Make the passed in "Msg*" const, use swrite() to make sure the entire
buffer is sent and break out the disconnect logic into an own function.
Make the passed in "Msg*" const, use swrite() to make sure the entire
buffer is sent and break out the disconnect logic into an own function.
take into account PR comments from @octo
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
add support for notifications as well
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Riemann UDP write plugin
First implementation of a riemann plugin.
This is basic for now and only support
sending to a UDP target, later work will
include notification support and service
rewriting.
Signed-off-by: Florian Forster <octo@collectd.org>
First implementation of a riemann plugin.
This is basic for now and only support
sending to a UDP target, later work will
include notification support and service
rewriting.
Signed-off-by: Florian Forster <octo@collectd.org>
Remove the redundant and little used STATIC_ARRAY_LEN() macro.
apcups plugin: Implement the "ReportSeconds" option.
src/types.db: Remove the maximum value from "timeleft".
Merge remote-tracking branch 'github/collectd-5.2' into collectd-5.2
Fix when gcrypt.h is missing (libcollectdclient)
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Fix for nanosleep missing on Solaris
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
postgresql plugin: Fixed a memory leak occurring on every (successful) write.
zfs_arc plugin: Fix the type used for mutex misses.
Thanks to Yves Mettier for pointing this out!
Thanks to Yves Mettier for pointing this out!
11 years agoUpdating data source for collectd v5, see https://collectd.org/wiki/index.php/V4_to_v...
Updating data source for collectd v5, see https://collectd.org/wiki/index.php/V4_to_v5_migration_guide
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'sh/config-include'
configfile: Free a string buffer returned by cf_util_get_string().
config: Implemented include filter pattern as sub-option in a <Include> block.
This has the advantage of being more easy to read/understand and also being
more flexible. E.g. multiple filters and other options may be specified in the
future.
Thanks to octo for suggesting this!
This has the advantage of being more easy to read/understand and also being
more flexible. E.g. multiple filters and other options may be specified in the
future.
Thanks to octo for suggesting this!
Merge remote-tracking branch 'github/collectd-5.2' into collectd-5.2
varnish plugin: Make sure the argument passed to VSM_n_Arg() is not NULL.
Fixes Github issue 202.
Fixes Github issue 202.
Add missing "Graphite" to the amqp format list.
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
aggregation plugin: Make it possible to set parts of the identifier.
config: Added support for specifying include filter patterns.
An optional second argument may now be passed to the "Include" configuration
option. If specified (and if the fnmatch() function was available at build
time), only files matching this pattern will be included. For example, the
following will include all files matching "*.conf" in any subdirectory of
/etc/collectd.d/:
Include "/etc/collectd.d" "*.conf"
This is useful, e.g. for distributions in order to include a possibly empty
directory in the default configuration including all subdirectories but also
making it possible to ship further documents like README files.
An optional second argument may now be passed to the "Include" configuration
option. If specified (and if the fnmatch() function was available at build
time), only files matching this pattern will be included. For example, the
following will include all files matching "*.conf" in any subdirectory of
/etc/collectd.d/:
Include "/etc/collectd.d" "*.conf"
This is useful, e.g. for distributions in order to include a possibly empty
directory in the default configuration including all subdirectories but also
making it possible to ship further documents like README files.
collectd.conf: Added example PostgreSQL writer configuration.
collectd.conf: Added a short explanation to the 'Interval' setting.
… mentioning the per-plugin interval setting.
… mentioning the per-plugin interval setting.
README: Added 'pf' and 'aggregation' plugins.
src/utils_vl_lookup.[ch]: Support selecting values by regex.
The name generated by the Aggregation plugin currently includes the
regular expression, which is suboptimal. We need to come up with something
clever there I guess.
The name generated by the Aggregation plugin currently includes the
regular expression, which is suboptimal. We need to come up with something
clever there I guess.
fix redis default node initialization
unbreak redis plugin build
Signed-off-by: Florian Forster <octo@collectd.org>
unbreak redis plugin build
Signed-off-by: Florian Forster <octo@collectd.org>
collectd-tg(1): Add manpage.
collectd.conf(5): Add the per-plugin interval to the synopsis.
Fix java detection as unprivileged user.
If you have an inaccessible directory inside
JAVA_HOME, find returns an error and the test fails.
I found this on Fedora, where /usr/lib64/audit is only
readable by root, and my JAVA_HOME was set to /usr
Signed-off-by: Florian Forster <octo@collectd.org>
If you have an inaccessible directory inside
JAVA_HOME, find returns an error and the test fails.
I found this on Fedora, where /usr/lib64/audit is only
readable by root, and my JAVA_HOME was set to /usr
Signed-off-by: Florian Forster <octo@collectd.org>
Fix building of java binding
Caused by d327beed4d1541d883c4823485b381d1dff79039
Signed-off-by: Florian Forster <octo@collectd.org>
Caused by d327beed4d1541d883c4823485b381d1dff79039
Signed-off-by: Florian Forster <octo@collectd.org>
src/libcollectdclient/Makefile.am: Fix typo.
src/libcollectdclient/Makefile.am: Add "collectd/network.h".
Bump version to 5.2.0; Update ChangeLog.
src/libcollectdclient/network.c: Fix the build on FreeBSD.
On FreeBSD, we have to include <netinet/in.h> to get IN_MULTICAST(). We
don't need to include anything extra, as according to POSIX,
<netinet/in.h> also exposes htonl(). There is no need to include
<arpa/inet.h>.
Signed-off-by: Florian Forster <octo@collectd.org>
On FreeBSD, we have to include <netinet/in.h> to get IN_MULTICAST(). We
don't need to include anything extra, as according to POSIX,
<netinet/in.h> also exposes htonl(). There is no need to include
<arpa/inet.h>.
Signed-off-by: Florian Forster <octo@collectd.org>
src/libcollectdclient/network_buffer.c: Fix gcrypt build on FreeBSD.
As with src/network.c, we need to ensure that we define
GCRYPT_NO_DEPRECATED on FreeBSD to get rid of the compiler warnings
emitted by the header file.
Signed-off-by: Florian Forster <octo@collectd.org>
As with src/network.c, we need to ensure that we define
GCRYPT_NO_DEPRECATED on FreeBSD to get rid of the compiler warnings
emitted by the header file.
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-5.1'
Merge remote-tracking branch 'origin/master'
Merge branch 'collectd-5.0' into collectd-5.1
Merge branch 'collectd-4.10' into collectd-5.0
fixed paths in example configuration file
These paths previously got expanded to:
#BaseDir "/usr/var/lib/collectd"
instead of:
#BaseDir "/var/lib/collectd"
And on systems which put libs in /usr/lib64:
#PluginDir "/usr/lib/collectd"
instead of:
#PluginDir "/usr/lib64/collectd"
Signed-off-by: Florian Forster <octo@collectd.org>
These paths previously got expanded to:
#BaseDir "/usr/var/lib/collectd"
instead of:
#BaseDir "/var/lib/collectd"
And on systems which put libs in /usr/lib64:
#PluginDir "/usr/lib/collectd"
instead of:
#PluginDir "/usr/lib64/collectd"
Signed-off-by: Florian Forster <octo@collectd.org>
lcc_features.h: Relicense under the MIT license.
src/libcollectdclient/network_buffer.c: Copy gcrypt import magic from the network plugin.
libcollectdclient: Update to the high-resolution time format.
Merge branch 'sr/pf'
Merge branch 'sh/postgresql-writer'
Conflicts:
src/collectd.conf.pod
src/postgresql.c
Conflicts:
src/collectd.conf.pod
src/postgresql.c
Merge branch 'sh/postgres-queries'
Merge branch 'libvirt-interfacenumber'
GenericJMXConfConnection: Automatically determine the host name.
Fixes Github issue #182.
Fixes Github issue #182.
libcollectdclient: Relicense under the MIT license.
Merge branch 'ff/netlib'
Conflicts:
src/collectdctl.c
src/libcollectdclient/client.c
src/libcollectdclient/collectd/client.h
Conflicts:
src/collectdctl.c
src/libcollectdclient/client.c
src/libcollectdclient/collectd/client.h
src/network.c: Fix the build on FreeBSD.
<gcrypt.h> accepts a definition called GCRYPT_NO_DEPRECATED to disable
deprecated functionality. Unfortunately, this definition is not
sufficient to suppress all warnings. However, FreeBSD's version of
libgcrypt has been fixed to properly remove all deprecated features.
Signed-off-by: Florian Forster <octo@collectd.org>
<gcrypt.h> accepts a definition called GCRYPT_NO_DEPRECATED to disable
deprecated functionality. Unfortunately, this definition is not
sufficient to suppress all warnings. However, FreeBSD's version of
libgcrypt has been fixed to properly remove all deprecated features.
Signed-off-by: Florian Forster <octo@collectd.org>
src/plugin.c: Replace the last use of "interval_g" in this file.
Merge branch 'sh/plugin_interval'
Conflicts:
src/amqp.c
src/exec.c
src/memcached.c
src/unixsock.c
Conflicts:
src/amqp.c
src/exec.c
src/memcached.c
src/unixsock.c
collectd_insert.sql: Use timestamptz rather than timestamp.
Don't want to get messed-up values after daylight-savings changes.
Don't want to get messed-up values after daylight-savings changes.
utils_time: cdtime_to_iso8601(): Include timezone information as well.