Added logical volume size metrics
Corrected typo
Returning lvm_errno on error
added the use of df_complex and changed fprintf to ERROR for error
messages. Also changed variable names to follow recommended standard
from the website.
messages. Also changed variable names to follow recommended standard
from the website.
changed LIBADD to reference variable BUILD_WTH_LIBLVM2APP_LIBS
Set default size from GB to bytes.
removed unused var plugin_volume
Added configuration for autotools
initial commit of volume.c
configure.in: Check for protobuf-c.h.
Thanks to Yves Mettier pointing this out in #269 and for providing an
initial patch.
Thanks to Yves Mettier pointing this out in #269 and for providing an
initial patch.
rrdtool plugin: Use cdrand_range() for the random variation.
src/utils_random.[ch]: Provide thread-safe random numbers.
write_mongodb plugin: Add authentication options.
Fixes Github issue #282.
Fixes Github issue #282.
Increase MAX_NUMDISKS
On large systems (particularly ZFS systems using large JBODs), it's
quite possible to have more than 256 disks.
Signed-off-by: Florian Forster <octo@collectd.org>
On large systems (particularly ZFS systems using large JBODs), it's
quite possible to have more than 256 disks.
Signed-off-by: Florian Forster <octo@collectd.org>
respect riemann's terminology
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Get rid of a compiler warning with gcc 4.6.3
...a futile warning that nevertheless kills the build thanks
to -Werror: "variable 'status' set but not used"
Signed-off-by: Florian Forster <octo@collectd.org>
...a futile warning that nevertheless kills the build thanks
to -Werror: "variable 'status' set but not used"
Signed-off-by: Florian Forster <octo@collectd.org>
curl_xml plugin: Fixed typo in documentation
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-5.2'
Conflicts:
configure.in
Conflicts:
configure.in
Merge branch 'collectd-5.1' into collectd-5.2
Merge branch 'kn/snort'
src/plugin.c: Assert that "data_sets" is non-NULL.
Otherwise we might run into an assertion in the AVL tree. This can be
triggered e.g. when calling plugin_get_ds() from within a config
callback.
Otherwise we might run into an assertion in the AVL tree. This can be
triggered e.g. when calling plugin_get_ds() from within a config
callback.
tail_csv plugin: Implement the "TimeFrom" option.
tail_csv plugin: Rename the "Index" option to "ValueFrom".
tail_csv plugin: Some bug fixes.
* Query types in the init-phase rather than the config-phase. The
types.db is not guaranteed to be available at that time.
* Make sure the "Instance" option in the <File /> blocks is optional.
* Query types in the init-phase rather than the config-phase. The
types.db is not guaranteed to be available at that time.
* Make sure the "Instance" option in the <File /> blocks is optional.
Merge branch 'jw/libvirt'
tail_csv plugin: Rename "Instance" blocks to "File".
This way the syntax of tail_csv's configuration is closer to that of the
csv plugin.
This way the syntax of tail_csv's configuration is closer to that of the
csv plugin.
tail_csv plugin: Rename the "snort" plugin to "tail_csv".
It's actually much more generic than just Snort, so give it an
appropriately generic name.
It's actually much more generic than just Snort, so give it an
appropriately generic name.
configure.in: Quote AC_LANG_PROGRAM and remove AC_INCLUDES_DEFAULT.
The latter isn't expanded anymore when quoted. There's no easy way
around this :\
The latter isn't expanded anymore when quoted. There's no easy way
around this :\
Added instance type "total"
Reports memory allocation in bytes, not kilobytes.
Applied the suggested changes.
uuid plugin: Improve parsing of the dmidecode output.
The entire business of dividing by sizeof(char) only made the code
unreadable, because by specification sizeof(char) evaluates to 1. The
defines were expanded and the parsing is now less sensitive to
formatting changes in the dmidecode output. Module global variables have
been moved to the top.
Fixes Github issue #267 in the process.
The entire business of dividing by sizeof(char) only made the code
unreadable, because by specification sizeof(char) evaluates to 1. The
defines were expanded and the parsing is now less sensitive to
formatting changes in the dmidecode output. Module global variables have
been moved to the top.
Fixes Github issue #267 in the process.
Merge remote branch 'origin/master'
curl_xml plugin: Change the "Namespace" config option …
… to expect two strings: prefix and URL separately. This way the parsing
is done in the config parser and we don't have to interpret special
characters in a string.
… to expect two strings: prefix and URL separately. This way the parsing
is done in the config parser and we don't have to interpret special
characters in a string.
Fix automatic link flags with libgcrypt 1.5.0
AM_PATH_LIBGCRYPT from libgcrypt 1.5.0 sets the variables
LIBGCRYPT_CPPFLAGS and LIBGCRYPT_LIBS with their proper
values, not GCRYPT_CPPFLAGS and GCRYPT_LIBS.
Signed-off-by: Florian Forster <octo@collectd.org>
AM_PATH_LIBGCRYPT from libgcrypt 1.5.0 sets the variables
LIBGCRYPT_CPPFLAGS and LIBGCRYPT_LIBS with their proper
values, not GCRYPT_CPPFLAGS and GCRYPT_LIBS.
Signed-off-by: Florian Forster <octo@collectd.org>
curl_xml plugin: Added support for XML namespaces
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
curl_xml plugin: Allow XML element nodes to be selected for text
This is a pretty basic use case, namely to select text within an XML
element, instead of just attribute values.
Signed-off-by: Florian Forster <octo@collectd.org>
This is a pretty basic use case, namely to select text within an XML
element, instead of just attribute values.
Signed-off-by: Florian Forster <octo@collectd.org>
curl* plugins: Added support for POST and arbitrary headers
These plugins can now be used for things like SOAP or XML-RPC calls.
Signed-off-by: Florian Forster <octo@collectd.org>
These plugins can now be used for things like SOAP or XML-RPC calls.
Signed-off-by: Florian Forster <octo@collectd.org>
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>
snort plugin: Replace the mmap() code with the tail-code from collectd.
This makes following along a file more I/O friendly, I hope. Also, we
don't need to do quite as much buffer processing because lines are
already split for us. Also, in the unlikely case that Snort is writing
the stats file more often than collectd reads it, this will pick up all
intermediate values.
This makes following along a file more I/O friendly, I hope. Also, we
don't need to do quite as much buffer processing because lines are
already split for us. Also, in the unlikely case that Snort is writing
the stats file more often than collectd reads it, this will pick up all
intermediate values.
configure.in: Update for autoconf 2.68.
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>
AUTHORS, README: Add Kris and the snort plugin.
collectd.conf(5): Add information about the snort plugin.
snort plugin: Free md->instance in snort_metric_definition_destroy().
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.
libvirt: Added support for memory allocation
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.
snort plugin: Implement the "Instance" config option.
snort plugin: Assert that the configured "type" has only one data source.
Also uses the utility function from configfile.h to read the metric
definition's name.
Also uses the utility function from configfile.h to read the metric
definition's name.
snort plugin: Split the snort_read() function.
snort_read() handles the file opening / mmap part of the process.
snort_read_buffer() parses the buffer, splits the last line and calls
the submit function. This way cleaning up the FD and memory mapping is
easier in case of an error when parsing the file.
snort_read() handles the file opening / mmap part of the process.
snort_read_buffer() parses the buffer, splits the last line and calls
the submit function. This way cleaning up the FD and memory mapping is
easier in case of an error when parsing the file.
snort plugin: Improve error handling.
This prevents file descriptors and memory from leaking if something goes
wrong, e.g. the last line in the file is a comment.
This prevents file descriptors and memory from leaking if something goes
wrong, e.g. the last line in the file is a comment.
snort plugin: Replace strsep() (a BSD extension).
snort plugin: Add a bounady check when reading from the metrics array.
Also renamed "count" to "metrics_num" to make it clear that the two
relate to one another.
Also renamed "count" to "metrics_num" to make it clear that the two
relate to one another.
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.
Updated configuration directives.
--
--
Requested changes committed.
Requested changes applied.
--
--
snort plugin added
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