Modbus plugin: Started working on a "Modbus-TCP" plugin for collectd.
src/configfile.c: Fix a minor typo.
src/configfile.[ch]: Add "cf_util_get_int".
Helper function to parse an "int".
Helper function to parse an "int".
src/configfile.[ch]: Implement "cf_util_get_string_buffer".
A function to parse a config node into a char buffer of limited size.
A function to parse a config node into a char buffer of limited size.
write_http plugin: Replace tabs with spaces.
So the entire file is indented the same way.
So the entire file is indented the same way.
write_http plugin: Fixed a memory leak in the "StoreRates" code.
write_http plugin: Add a StoreRates option.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Merge branch 'collectd-4.9'
Merge branch 'collectd-4.8' into collectd-4.9
Conflicts:
src/ping.c
Conflicts:
src/ping.c
contrib/redhat/collectd.spec: Updated for version 4.9.
I've attached a patch for the RPM specfile to allow it to build collectd 4.9.0,
including Java support.
I've attached a patch for the RPM specfile to allow it to build collectd 4.9.0,
including Java support.
debian/: Removed ancient Debian package files.
You might want to look at git://git.tokkee.org/pkg-collectd.git instead.
You might want to look at git://git.tokkee.org/pkg-collectd.git instead.
configure.in: Fix three small typos.
Build system: Put Java class files into a .jar file.
Hi,
I was wondering why the java plugin api class files are published under
share/collectd/java. Ideally, a java-plugin.jar file containing all the class
files should get published rather than the individual class files.
Additionally, the jar files IMO should get published to the lib directory where
the so files are sitting rather than the share directory.
Same holds true for jmx class files as well (probably jmx.jar?).
I could work on this if everyone is okay with it.
Regards
Amit
Hi,
I was wondering why the java plugin api class files are published under
share/collectd/java. Ideally, a java-plugin.jar file containing all the class
files should get published rather than the individual class files.
Additionally, the jar files IMO should get published to the lib directory where
the so files are sitting rather than the share directory.
Same holds true for jmx class files as well (probably jmx.jar?).
I could work on this if everyone is okay with it.
Regards
Amit
src/utils_cmd_listval.c: Fix a memory leak.
Thanks to Peter Warasin for figuring this out. His "garbage collector" patch
may replace this solution in future versions of collectd.
Thanks to Peter Warasin for figuring this out. His "garbage collector" patch
may replace this solution in future versions of collectd.
Bugfix: correctly handle spurious wakeups in pthread_cond_timedwait
This fixes problems storing data in rrd files on NetBSD 5.0 with more
than one CPU.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
This fixes problems storing data in rrd files on NetBSD 5.0 with more
than one CPU.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/utils_format_json.c: Use "isfinite" rather than "isinf".
Makes it a bit easier to read.
Makes it a bit easier to read.
src/collectd.h: Add fallback implementations of "isfinite" and "isinf".
utils_format_json: serialize nan and inf as null, as per JSON spec
I'm deserializing JSON output from the write_http plugin using ruby-yajl.
yajl was puking on the literal value nan encoded in the output.
[
{
"plugin": "memcached",
"interval": 10,
"host": "myhost",
"values": [
nan,
5
],
"time": 1265239180,
"plugin_instance": "",
"type_instance": "",
"type": "ps_count"
}
]
After some research, ECMA-262 15.12.3 says nan and infinite numbers
aren't representable in JSON and should be serialized as the string
null. I figure any strictly-compliant JSON parser will fail on parsing
JSON data containing nans as emitted by collectd's utils_format_json
routines.
This patch makes collectd's JSON output compliant in the case of
infinite or nan gauge values.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
I'm deserializing JSON output from the write_http plugin using ruby-yajl.
yajl was puking on the literal value nan encoded in the output.
[
{
"plugin": "memcached",
"interval": 10,
"host": "myhost",
"values": [
nan,
5
],
"time": 1265239180,
"plugin_instance": "",
"type_instance": "",
"type": "ps_count"
}
]
After some research, ECMA-262 15.12.3 says nan and infinite numbers
aren't representable in JSON and should be serialized as the string
null. I figure any strictly-compliant JSON parser will fail on parsing
JSON data containing nans as emitted by collectd's utils_format_json
routines.
This patch makes collectd's JSON output compliant in the case of
infinite or nan gauge values.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
ping plugin: Improved some error messages.
contextswitch plugin: Handle large counter/derive values correctly.
Using "strtoul" for derive_t values fails for large counter values.
Thanks to Martin Merkel for reporting this :)
Using "strtoul" for derive_t values fails for large counter values.
Thanks to Martin Merkel for reporting this :)
collectd{-python,.conf}(5): Fixed some typos.
Thanks to lintian(1) for catching those!
Thanks to lintian(1) for catching those!
collectd{-perl,.conf}(5), {my,postgre}sql plugins: Fixed some typos.
Thanks to lintian(1) for catching (some of) those! :-)
Thanks to lintian(1) for catching (some of) those! :-)
curl_xml plugin: Cast _Bool to long when calling curl_easy_setopt.
apache plugin: Fix collection of the "apache_connections" value with Apache 2.*.
Thanks to Gary (bug tracker) for pointing this out :)
Thanks to Gary (bug tracker) for pointing this out :)
contrib/collection.cgi: Add graphs for "apache_connections" and "apache_idle_workers".
Thanks to Gary (via the bug tracker).
Thanks to Gary (via the bug tracker).
apache plugin: Added support for the "IdleWorkers" field.
Thanks to Gary from the bug tracker for the suggestion and code :)
Thanks to Gary from the bug tracker for the suggestion and code :)
contrib/collection.cgi: Added ability to hide specified types.
It is useful when you don't want to see many graphs. How to use the patch:
apply it to collection.cgi and add lines with keyword ,,dontshowtype'' to
/etc/collectd/collection.conf:
dontshowtype: "if_errors"
dontshowtype: "if_packets"
Then you will see only if_octets types in "interface" plugin page.
Via Debian bug #566199.
It is useful when you don't want to see many graphs. How to use the patch:
apply it to collection.cgi and add lines with keyword ,,dontshowtype'' to
/etc/collectd/collection.conf:
dontshowtype: "if_errors"
dontshowtype: "if_packets"
Then you will see only if_octets types in "interface" plugin page.
Via Debian bug #566199.
src/filter_chain.c: Make info-message more verbose.
swap plugin: Put parsing of Linux 2.6 and <2.6 files into one loop.
src/common.[ch]: Implement “strtoderive”.
Simplifies error handling.
Simplifies error handling.
swap plugin: Remove trailing whitespace.
swap plugin - swap in/out does not work for kernels <2.6
It works on RedHat9 and 6 (don't ask). A more gracefull solution is
having a configuration option for choosing /proc/<foo> format I
suppose...
Hope it helps some sysadmins like me that are forced to maintained
anqituities in production.
Cheers
From 1da38c6d515f7fa4599b7b08e1284fb2ac9a504a Mon Sep 17 00:00:00 2001
From: Lorin Scraba <lorin@si-bemol.ro>
Date: Tue, 19 Jan 2010 15:16:29 -0800
Subject: [PATCH] swap plugin - swapin/out fix for older kernels - <2.6
Signed-off-by: Lorin Scraba <lorin@si-bemol.ro>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
It works on RedHat9 and 6 (don't ask). A more gracefull solution is
having a configuration option for choosing /proc/<foo> format I
suppose...
Hope it helps some sysadmins like me that are forced to maintained
anqituities in production.
Cheers
From 1da38c6d515f7fa4599b7b08e1284fb2ac9a504a Mon Sep 17 00:00:00 2001
From: Lorin Scraba <lorin@si-bemol.ro>
Date: Tue, 19 Jan 2010 15:16:29 -0800
Subject: [PATCH] swap plugin - swapin/out fix for older kernels - <2.6
Signed-off-by: Lorin Scraba <lorin@si-bemol.ro>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Use Curl AnyAuth (digest+basic) instead of just digest
Merge commit 'tokkee/sh/collectd-4.8' into collectd-4.8
src/collectd.c: Include the plugin directory in the usage output.
collectd.conf.in: Add the cURL-XML plugin.
exec plugin: Improved some error messages.
contrib/exec-munin.px: Add GPLv2 header.
Merge branch 'collectd-4.8' into collectd-4.9
Conflicts:
ChangeLog
Conflicts:
ChangeLog
ChangeLog: Added fix in the processes plugin.
processes plugin: Fix handling of the ps_disk_{octets,ops} types.
There values were stored in a `long', then `counter_t', then interpreted as
`derive_t'. Changed that to `derive_t' only. Hopefully this fixes a bug
reported by Mark Moseley.
There values were stored in a `long', then `counter_t', then interpreted as
`derive_t'. Changed that to `derive_t' only. Hopefully this fixes a bug
reported by Mark Moseley.
ChangeLog: Updated for version 4.9.1.
ChangeLog: Updated for version 4.8.3.
Merge branch 'ag/curl_xml'
Merge commit 'tokkee/sh/collectd-4.8' into collectd-4.8
collectd.conf(5): Rephrase a weird sentence in the cURL-JSON documentation.
collectd.conf(5): Remove trailing whitespace.
collectd.conf(5): Document the cURL-XML plugin.
README: Add the curl_xml plugin.
curl_xml plugin: Replace the AVL-tree with a linked list.
This makes iterating over all elements more efficient. The CX_KEY_MAGIC hack is
also removed. Last but not least, “plugin_get_ds” is now called only once.
This makes iterating over all elements more efficient. The CX_KEY_MAGIC hack is
also removed. Last but not least, “plugin_get_ds” is now called only once.
types.db(5): Mention the types "ABSOLUTE" and "DERIVE" as well.
curl_xml plugin: Rename "Instance" and "Values" to "*From" for consistency.
Merge commit 'origin/ff/routeros'
Merge branch 'collectd-4.9'
Merge branch 'collectd-4.8' into collectd-4.9
Merge branch 'collectd-4.7' into collectd-4.8
bindings/perl/lib/Collectd.pm: Add forgotten "config" callback type.
Thanks to "ntenev" for reporting the issue.
Thanks to "ntenev" for reporting the issue.
curl_xml plugin: Don't use a hyphen to separate instance prefix and value.
This way the plugin behaves more like the SNMP plugin.
This way the plugin behaves more like the SNMP plugin.
curl_xml plugin: Documented the type-instance behavior a bit better.
curl_xml plugin: Break up “cx_submit_xpath_values” into smaller functions.
curl_xml plugin: Move the setting of type_instance to a separate function.
curl_xml plugin: Make absolutely certain “instance_node_obj” is freed.
curl_xml plugin: Check the return value of “cx_evaluate_xpath”.
curl_xml plugin: Change C++-style comments into C-style comments.
curl_xml plugin: Clear type_instance if it is not set.
curl_xml plugin: Adapted copyright for 2010.
AUTHORS: Added curl_xml plugin to Amit.
curl_xml plugin: Replace cx_config_add_string and cx_config_set_boolean by their global versions.
curl_xml plugin: Reorder functions and remove forward declarations.
curl_xml plugin: New plugin to fetch and parse XML files.
Do find the curl_xml.c source file attached. The implementation is done as I
suggested in my previous mail.
The supported configuration is as follows:
<xpath "/path/to/node(s)">
InstancePrefix "test" # optional
Instance "path/to/textnode" # optional if base xpath expression returns
single result i.e one matching node
Values "path/to/textnode1" "path/to/textnode2"
Type "magic_level"
</xpath>
I have done some level of testing to make sure plugin is working. If someone
is interested in testing/trying the plugin, do the following:
- apply the attached patch on the 4.9.0 branch
- copy the attached curl_xml.c to the collectd-4.9.0/src
- run autconf to generate new configure script containing changes to build
curl_xml plugin
- build and install collectd (make && make install)
Do let me know if anyone has problem building/running the plugin.
Any comments/suggestions are welcome.
Regards
Amit
Do find the curl_xml.c source file attached. The implementation is done as I
suggested in my previous mail.
The supported configuration is as follows:
<xpath "/path/to/node(s)">
InstancePrefix "test" # optional
Instance "path/to/textnode" # optional if base xpath expression returns
single result i.e one matching node
Values "path/to/textnode1" "path/to/textnode2"
Type "magic_level"
</xpath>
I have done some level of testing to make sure plugin is working. If someone
is interested in testing/trying the plugin, do the following:
- apply the attached patch on the 4.9.0 branch
- copy the attached curl_xml.c to the collectd-4.9.0/src
- run autconf to generate new configure script containing changes to build
curl_xml plugin
- build and install collectd (make && make install)
Do let me know if anyone has problem building/running the plugin.
Any comments/suggestions are welcome.
Regards
Amit
python: Fixed configure script for python3.
src/collectd.conf.in: Add the new options of the routeros plugin.
collectd.conf(5): Document the new config options of the routeros plugin.
Merge branch 'master' into ff/routeros
Merge commit 'trenkel/st/python'
Conflicts:
src/python.c
Conflicts:
src/python.c
Merge branch 'collectd-4.9'
Merge commit 'tokkee/sh/collectd-4.9' into collectd-4.9
Merge branch 'collectd-4.9'
Merge branch 'collectd-4.8' into collectd-4.9
python: Documenting python3 changes.
python: Restored python2 compatibility.
python: Added notification repr. Python3 support completed.
python: Fixed more unicode related problems.
python: repr works for Values again.
python: Made the plugin unicode save.
Better and unicode compatible repr for PluginData.
Fixed string repr for config nodes.
Added macro CPY_SUBSTITUTE.
Config object repr string is back.
14 years agoSomewhat workable python3 support. This breaks python2 support and the __repr__ funct...
Somewhat workable python3 support. This breaks python2 support and the __repr__ functions.
rrdtool plugin: Correctly initialize the ->random_variation member.
This lead to huge negative values in that member, causing values to be only
written to upon exit. D'oh!
This lead to huge negative values in that member, causing values to be only
written to upon exit. D'oh!
14 years agoapache plugin: Fix a segmentation fault in the config handling of VerifyPeer / Verify...
apache plugin: Fix a segmentation fault in the config handling of VerifyPeer / VerifyHost.
Hello,
Today I upgraded a machine from 4.5.2 to 4.9.0. Everything went fine, but
the new version segfaults immediately at startup. With some help from gdb
I tracked down the problem to the apache module. It will occur if one
tries to use the VerifyPeer/VerifyHost options (I guess few people use
these as I don't see complaints?)
When the plugin attempts to read the value of a boolean option, instead of
using the pre-parsed int value, it misdetects the type of the option
(seems a mechanical mistake) and tries to use the string pointer, which is
actually NULL.
I'm sending a patch, it's actually shorter than the description ;)
Thanks to all developers and maintainers of collectd for working on it.
Have a nice holidays.
Hello,
Today I upgraded a machine from 4.5.2 to 4.9.0. Everything went fine, but
the new version segfaults immediately at startup. With some help from gdb
I tracked down the problem to the apache module. It will occur if one
tries to use the VerifyPeer/VerifyHost options (I guess few people use
these as I don't see complaints?)
When the plugin attempts to read the value of a boolean option, instead of
using the pre-parsed int value, it misdetects the type of the option
(seems a mechanical mistake) and tries to use the string pointer, which is
actually NULL.
I'm sending a patch, it's actually shorter than the description ;)
Thanks to all developers and maintainers of collectd for working on it.
Have a nice holidays.
Monitorus.pm: Put the plugin into the "Collectd::Plugins" namespace.
… rather than "Collectd::Plugin".
… rather than "Collectd::Plugin".
bindings/Makefile: Added Monitorus.pm to EXTRA_DIST.
src/collectd.conf: Added missing plugins and config options.
collectd.conf: Added "LoadPlugin Monitorus/OpenVZ" in the "perl" config.
README: Added missing plugins.
src/collectd.conf.in: Added an example config for the python plugin.
src/collectd.conf.in: Added an example config for the netapp plugin.
src/collectd.conf.in: Add example config for the routeros plugin.