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.
src/configfile.[ch]: Implement the cf_get_default_interval() function.
This should be able to replace "interval_g" in a global (i.e. non-plugin)
context, such as the interval in which timeouts are being checked.
The default value (10 seconds) is also configurable at compile time using
a define.
This should be able to replace "interval_g" in a global (i.e. non-plugin)
context, such as the interval in which timeouts are being checked.
The default value (10 seconds) is also configurable at compile time using
a define.
postgresql plugin: Simplified transaction handling a bit.
Don't set any next commit time after committing a transaction but only when
starting a new transaction. This way, db->next_commit == 0 always means that
we're outside of a transaction. Also, this removes the need to restart a
transaction right away. Rather, the write callback will take care of that the
next time it gets any data.
Don't set any next commit time after committing a transaction but only when
starting a new transaction. This way, db->next_commit == 0 always means that
we're outside of a transaction. Also, this removes the need to restart a
transaction right away. Rather, the write callback will take care of that the
next time it gets any data.
collectd.conf(5): Documented the postgresql FLUSH support.
postgresql plugin: Added support for "flushing" data.
This may be used to commit a PostgreSQL writer's transaction. Two different
types of flush callbacks are registered:
- postgresql: Flush *all* databases.
- postgresql-<database>: Flush the database named '<database>' only.
This may be used to commit a PostgreSQL writer's transaction. Two different
types of flush callbacks are registered:
- postgresql: Flush *all* databases.
- postgresql-<database>: Flush the database named '<database>' only.
postgresql plugin: Fixed unregistering of write callbacks.
Rather than unregistering some callback for each writer for each database,
unregister the single callback for each database only.
Rather than unregistering some callback for each writer for each database,
unregister the single callback for each database only.
postgresql plugin: Unregister all writers on shutdown.
This will make sure that all pending transactions will be committed. Else, the
open transactions would be rolled back by the PostgreSQL backend when closing
the connection.
In order to do so, all database connections are now stored in a plugin-global
array (this will also make further changes possible). Also, a ref-count has
been added to the database object in order to support "deleting" an object
twice when having it in use by a connection doing queries and writes.
This will make sure that all pending transactions will be committed. Else, the
open transactions would be rolled back by the PostgreSQL backend when closing
the connection.
In order to do so, all database connections are now stored in a plugin-global
array (this will also make further changes possible). Also, a ref-count has
been added to the database object in order to support "deleting" an object
twice when having it in use by a connection doing queries and writes.
postgresql plugin: Commit a transaction before shutting down a connection.
Also, make sure to acquire the database lock before that in order to wait for,
for example, outstanding writers.
Also, make sure to acquire the database lock before that in order to wait for,
for example, outstanding writers.
postgresql plugin: Don't try to restart a failed transaction when there's none.
postgresql plugin: Restart a writer transaction if the writer's query failed.
The failed query inside the transaction causes the transaction to be aborted
and all subsequent queries to fail as well.
The failed query inside the transaction causes the transaction to be aborted
and all subsequent queries to fail as well.
collectd.conf(5): Documented the postgresql <Database> 'Writer' option.
collectd.conf(5): Documented the "CommitInterval" option of 'postgresql'.
collectd_insert.sql: Let values_update_childs() return table names.
The function will now return a set of the names of child tables that have been
created.
The function will now return a set of the names of child tables that have been
created.