ethstat plugin: Initialize realloc'ated memory.
The last element in "interfaces" is not guaranteed to be zeroed, resulting in a
segfault when cf_util_get_string() tries to free the "pointer".
Thanks to Mark T. Voelker for reporting and analyzing this bug!
This should fix Github issue #133.
The last element in "interfaces" is not guaranteed to be zeroed, resulting in a
segfault when cf_util_get_string() tries to free the "pointer".
Thanks to Mark T. Voelker for reporting and analyzing this bug!
This should fix Github issue #133.
ethstat plugin: Fix off-by-one error.
This hopefully fixes Github issue #135.
This hopefully fixes Github issue #135.
Merge branch 'collectd-5.0' into collectd-5.1
Conflicts:
src/swap.c
Conflicts:
src/swap.c
Merge branch 'collectd-4.10' into collectd-5.0
corrected high-resolution time conversions after code review
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Updated Adrian Perez' 2009 Python network proto classes
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
snmp plugin: Fix error message printed by the "Shift" option.
I noticed a small error in snmp.c in collectd-5.1.0 (might be
elsewhere). The warning message in csnmp_config_add_data_shift says
"Scale config option" instead of "Shift" config option:
[…]
Signed-off-by: Florian Forster <octo@collectd.org>
I noticed a small error in snmp.c in collectd-5.1.0 (might be
elsewhere). The warning message in csnmp_config_add_data_shift says
"Scale config option" instead of "Shift" config option:
[…]
Signed-off-by: Florian Forster <octo@collectd.org>
df plugin: when checking / do it just once
Newer system symlink /etc/mtab to /proc/mounts which makes root
filesystem seem mounted twice, once as type rootfs and once for the
real device.
When / is selected for df plugin, skip the rootfs mount-point as
real root is usually mounted right on top of it.
Not skipping it causes rrdtool to complain about two updates for the
same timestamp, the first entry for rootfs passes but rrdtool complains
when stats for the second occurrence for real filesystem is being
considered.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Newer system symlink /etc/mtab to /proc/mounts which makes root
filesystem seem mounted twice, once as type rootfs and once for the
real device.
When / is selected for df plugin, skip the rootfs mount-point as
real root is usually mounted right on top of it.
Not skipping it causes rrdtool to complain about two updates for the
same timestamp, the first entry for rootfs passes but rrdtool complains
when stats for the second occurrence for real filesystem is being
considered.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Florian Forster <octo@collectd.org>
snmp plugin: Check for SNMP_ENDOFMIBVIEW.
Some implementations of SNMP will send a special "variable" when you're
leaving the requested subtree with type "endOfMibView" aka.
"SNMP_ENDOFMIBVIEW". Examples of such implementations are Citrix
Netscalers and IBM's General Parallel File System (GPFS). Reading past
this special variable will result in weird values being returned.
This adds an appropriate check to csnmp_check_res_left_subtree().
Thanks to "Mark" for reporting this issue and clarifying.
Some implementations of SNMP will send a special "variable" when you're
leaving the requested subtree with type "endOfMibView" aka.
"SNMP_ENDOFMIBVIEW". Examples of such implementations are Citrix
Netscalers and IBM's General Parallel File System (GPFS). Reading past
this special variable will result in weird values being returned.
This adds an appropriate check to csnmp_check_res_left_subtree().
Thanks to "Mark" for reporting this issue and clarifying.
src/Makefile.am: Unconditionally link collectd with libm.
Under FreeBSD, running src/utils_format_json.c fails because isfinite()
cannot be resolved. The GNU manpages for isnan() and isfinite() also
advise users to link with libm and AIX has had the library being linked
in for a while. Since it's such a basic library it seems easier to just
link with it unconditionally.
Fixes Github issue #122.
Under FreeBSD, running src/utils_format_json.c fails because isfinite()
cannot be resolved. The GNU manpages for isnan() and isfinite() also
advise users to link with libm and AIX has had the library being linked
in for a while. Since it's such a basic library it seems easier to just
link with it unconditionally.
Fixes Github issue #122.
Merge pull request #124 from tokkee/bj/build
Fix some build issues on AIX using automake <= 1.9 and gcc 4.7.1.
Fix some build issues on AIX using automake <= 1.9 and gcc 4.7.1.
Add missing return statements
Fix gcc warn/error: no return statement in function returning non-void [-Werror=return-type]
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Fix gcc warn/error: no return statement in function returning non-void [-Werror=return-type]
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Automake 1.9 compatibility: don't use $(builddir)
Automake <= 1.9 don't define $(builddir) which is always defined to
'.' anyway.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Automake <= 1.9 don't define $(builddir) which is always defined to
'.' anyway.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Merge branch 'sh/collectd-5.1' into collectd-5.1
Added the instance name to varnish API
Fixed issue collectd#110
Signed-off-by: Florian Forster <octo@collectd.org>
Fixed issue collectd#110
Signed-off-by: Florian Forster <octo@collectd.org>
Merge pull request #109 from tokkee/sh/collectd-5.0
configure: Define _REENTRANT when compiling on Solaris.
LGTM
configure: Define _REENTRANT when compiling on Solaris.
LGTM
Fix to make write_mongodb work with any version of mongo-c-driver
configure: Define _REENTRANT when compiling on Solaris.
On Wed, Mar 16, 2011 at 10:35:07AM +0100, Mathijs Möhlmann wrote:
> I'm using collectd 4.10.2 on Solaris 10 (gcc 3.4.6). Sometimes when I
> start with a clean rrd directory or add a host the .rrd file (rrdtools
> plugin) don't get created and I get the following message:
>
> collectd[2996]: [ID 702911 daemon.error] stat(/usr/local/var/lib/collectd/rrd/asterix/load/load.rrd) failed: Bad file number
This patch fixes this.
Signed-off-by: Sebastian Harl <sh@teamix.net>
On Wed, Mar 16, 2011 at 10:35:07AM +0100, Mathijs Möhlmann wrote:
> I'm using collectd 4.10.2 on Solaris 10 (gcc 3.4.6). Sometimes when I
> start with a clean rrd directory or add a host the .rrd file (rrdtools
> plugin) don't get created and I get the following message:
>
> collectd[2996]: [ID 702911 daemon.error] stat(/usr/local/var/lib/collectd/rrd/asterix/load/load.rrd) failed: Bad file number
This patch fixes this.
Signed-off-by: Sebastian Harl <sh@teamix.net>
configure, utils_dns: Check for and use netinet/ip_compat.h.
This is required on Solaris in order to get the ip6_ext struct.
This is required on Solaris in order to get the ip6_ext struct.
mysql plugin: Use the database instance name for identifying read callbacks.
The database instance is specified as argument to the <Database> block.
Without this fix, we cannot specify two database blocks without the
(optional!) 'Database' option as this would result in registering two read
callbacks with the name 'mysql'.
Thanks to Johan Bergström for reporting this on IRC!
The database instance is specified as argument to the <Database> block.
Without this fix, we cannot specify two database blocks without the
(optional!) 'Database' option as this would result in registering two read
callbacks with the name 'mysql'.
Thanks to Johan Bergström for reporting this on IRC!
contrib/migrate-4-5.px: Added missing end quotes in a call to rrd_filter.px.
Fix bad definition of UDP src port in DNS plugin.
Correct compilation on FreeBSD, set HOST_NAME_MAX to _POSIX_HOST_NAME_MAX if isn't defined
contrib/migrate-4-5.px: Break up "df" RRD files into multiple files.
collectd.conf(5): Improve description of the configuration syntax.
Merge pull request #97 from tokkee/sh/swap
swap plugin: Don't report an error if there is no swap space on Linux.
swap plugin: Don't report an error if there is no swap space on Linux.
swap plugin: Don't report an error if there is no swap space on Linux.
… rather, simply record zeros in that case. Swap may be switched on and off at
arbitrary times and/or might be added at "later" times. Thus, storing zero in
case the swap plugin is enabled sounds like the best approach to me.
… rather, simply record zeros in that case. Swap may be switched on and off at
arbitrary times and/or might be added at "later" times. Thus, storing zero in
case the swap plugin is enabled sounds like the best approach to me.
Fix for config file parsing ("memcachec plugin: Option `Server' not allowed here.")
Fix out-of-bound index in rrdtool.c
Fix a reference to argv[1] that is (always?)
outside the bounds of the argv array. It happens
during a log statement that seems to want
to actually refer to the rrd filename.
Fix a reference to argv[1] that is (always?)
outside the bounds of the argv array. It happens
during a log statement that seems to want
to actually refer to the rrd filename.
oracle plugin: Add database name and query name (if applicable) to error messages.
oracle plugin: Report the "connect id" when OCILogon() fails.
collection3: Use {instance} in Df's grpah title.
{type_instance} didn't work when used with other plugins than "df", e.g.
the example configuration of the Oracle plugin uses this.
{type_instance} didn't work when used with other plugins than "df", e.g.
the example configuration of the Oracle plugin uses this.
src/utils_dns.c: Remove duplicate line.
src/utils_dns.c: Rename the "s_addr" and "d_addr" variables.
On Solaris, there is a macro called "s_addr" resulting in syntax errors
when this is used as a variable name. The variables have been renamed to
circumvent this problem. Thanks to Maciej Bliziński for reporting this
problem and helping to debug it!
On Solaris, there is a macro called "s_addr" resulting in syntax errors
when this is used as a variable name. The variables have been renamed to
circumvent this problem. Thanks to Maciej Bliziński for reporting this
problem and helping to debug it!
collection3: Filter out identifiers with control characters.
Otherwise XML errors will prevent the page from rendering.
Otherwise XML errors will prevent the page from rendering.
src/utils_avltree.c: Add sanity check to c_avl_destroy().
src/utils_rrdcreate.c: Handle "last update" in a saner way.
netapp plugin: Close connection on communication errors.
collectd.conf(5): Fix typo.
collectdctl: Fix PUTVAL for data sets with multiple data sources.
Thanks to Cyril Feraudet for pointing out this problem!
Thanks to Cyril Feraudet for pointing out this problem!
contrib/collection3: Ignore control characters.
While they are correctly encoded, e.g. as "", browsers will
complain about invalid XML and not render the page. Ignore all control
characters other than whitespace.
While they are correctly encoded, e.g. as "", browsers will
complain about invalid XML and not render the page. Ignore all control
characters other than whitespace.
Create directories with permission 0777.
Let umask work its magic. Thanks to "Poil" for reporting this problem.
Fixes GitHub issue #63.
Let umask work its magic. Thanks to "Poil" for reporting this problem.
Fixes GitHub issue #63.
varnish plugin: Make argument "stats" const.
ethstat plugin: Fix a typo.
Bump version to 5.1.0; Update ChangeLog.
Merge branch 'collectd-5.0'
Merge branch 'collectd-4.10' into collectd-5.0
Conflicts:
ChangeLog
Conflicts:
ChangeLog
ChangeLog: Correct date.
Bump version to 5.0.4; Update ChangeLog.
Merge branch 'collectd-4.10' into collectd-5.0
Conflicts:
ChangeLog
src/collectd.conf.pod
src/common.c
src/network.c
src/processes.c
version-gen.sh
Conflicts:
ChangeLog
src/collectd.conf.pod
src/common.c
src/network.c
src/processes.c
version-gen.sh
Bump version to 4.10.7; Update ChangeLog.
Revert "Proposal fix for large "MaxPacketSize" use."
This reverts commit 12213f8dfeee3feb3846aa658def0bb79c1211d0.
This reverts commit 12213f8dfeee3feb3846aa658def0bb79c1211d0.
network plugin: Do not forward received notifications.
The network plugin would send out all notifications it got through its
callback, even the ones it received itself and even when forwarding was
disabled.
With this patch the network plugin will only transmit notifications created
locally -- forwarding of notifications is not implemented due to missing
loop-detection. For loop-detection we would have to keep track of the last
timestamp of each notifications, and since each host/plugin/type/-instance
field may be empty, this is not as straight forward as with value lists. If
someone needs this, they will need to invest some work I'm afraid.
The network plugin would send out all notifications it got through its
callback, even the ones it received itself and even when forwarding was
disabled.
With this patch the network plugin will only transmit notifications created
locally -- forwarding of notifications is not implemented due to missing
loop-detection. For loop-detection we would have to keep track of the last
timestamp of each notifications, and since each host/plugin/type/-instance
field may be empty, this is not as straight forward as with value lists. If
someone needs this, they will need to invest some work I'm afraid.
Merge pull request #56 from octo/ci/nfs
NFS plugin: Add Solaris support.
NFS plugin: Add Solaris support.
Merge branch 'ff/zfs'
zfs_arc plugin: Move reading of kstat values into separate functions.
This way error handling can be done in a central place and we can do this more
carefully overall.
This way error handling can be done in a central place and we can do this more
carefully overall.
Merge pull request #60 from octo/ar/zfs
more zfs kstat values
more zfs kstat values
zfs_arc plugin: Add copyright header for Aurelien Rougemont.
Proposal fix for large "MaxPacketSize" use.
When we use a "MaxPacketSize" over two thousand of octets (to pass huge
message in notification for example), buffer may not be flushed for a
while.
By flushing buffer when there is about 1400 octets, we're sure there is
no data too longer in.
When we use a "MaxPacketSize" over two thousand of octets (to pass huge
message in notification for example), buffer may not be flushed for a
while.
By flushing buffer when there is about 1400 octets, we're sure there is
no data too longer in.
zfs_arc plugin: Fix the "hash collision" and "mutex miss" metrics.
zfs_arc plugin: Fix typo in variable name.
zfs_arc plugin: Introduce the single-valued "mutex_operation" type.
zfs_arc plugin: Introduce the single-valued "cache_eviction" type.
zfs_arc plugin: Convert to use DERIVE.
add types for deleted, evict, hash, mutex
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
add hash_collisions, deleted, mutex_miss, evict_*
Fixed Solaris compilation errors
The value returned by get_kstat_value is of type long long whereas values is a union. Fixed the code so that the value gets assigned to one of the union members, in this case counter.
The value returned by get_kstat_value is of type long long whereas values is a union. Fixed the code so that the value gets assigned to one of the union members, in this case counter.
Fixed solaris configure script generation errors
The brackets in configure.in and the changes in version-gen.sh are needed in order for the build.sh script to generate the configure script correctly. Else the generated script won't work.
The brackets in configure.in and the changes in version-gen.sh are needed in order for the build.sh script to generate the configure script correctly. Else the generated script won't work.
src/common.h: Add comment about return value of read_file_contents().
nfs plugin: Minor coding style fixes.
nfs plugin: Remove duplicated code.
Changes include:
* Calculate nfs[234]_procedures_names_num at compile time.
* Made nfs_procedures_submit() more versatile, so it can be used from the Linux
and the Solaris code.
* Switched to plugin_dispatch_values_secure(), since the code is using the same
value_list_t for multiple values.
* Broke out nfs_submit_fields() from the Linux code. This removed quite a bit
of code duplication between the v2/v3 code.
* Broke out nfs_read_kstat() which does the get_kstat_value() call in a loop
rather than duplicating all the NFS procedure names.
Changes include:
* Calculate nfs[234]_procedures_names_num at compile time.
* Made nfs_procedures_submit() more versatile, so it can be used from the Linux
and the Solaris code.
* Switched to plugin_dispatch_values_secure(), since the code is using the same
value_list_t for multiple values.
* Broke out nfs_submit_fields() from the Linux code. This removed quite a bit
of code duplication between the v2/v3 code.
* Broke out nfs_read_kstat() which does the get_kstat_value() call in a loop
rather than duplicating all the NFS procedure names.
Enable modules for Solaris
Enabling nfs,processes and protocols modules for Solaris when running the
configure script.
Enabling nfs,processes and protocols modules for Solaris when running the
configure script.
Fix Linux compilation errors
Fixed compilation errors for the linux platform
Fixed compilation errors for the linux platform
Added safe-guard for kstat libraries
Added Solaris support for nfs3 and nfs4 (client/server)
tcpconns plugin: Include <bsd/nlist.h> rather than <nlist.h>.
It appears that <nlist.h> is being deprecated / moved.
This hopefully fixes Debian bug #664429.
It appears that <nlist.h> is being deprecated / moved.
This hopefully fixes Debian bug #664429.
Merge branch 'jr/varnish'
Merge pull request #48 from octo/pk/processes
Fix processes plugin under FreeBSD.
Fix processes plugin under FreeBSD.
processes plugin: Minimize whitespace-only changes.
processes plugin: Some more minor coding style fixes.
Merge pull request #52 from octo/cf/ethstat
ethstat support
ethstat support
ethstat plugin: Implement the "MappedOnly" option.
ethstat plugin: Fix indentation. It was a mess, sorry.
src/common.c: parse_value: Strip trailing whitespace before parsing.
This hopefully avoids the annoying "trailing garbage" message when the buffer
only contains a newline or space at the end.
This hopefully avoids the annoying "trailing garbage" message when the buffer
only contains a newline or space at the end.
collectd.conf(5): Document the "Hits" and "Hysteresis" threshold options.
Fixes GitHub issue #53.
Fixes GitHub issue #53.
Makefile adds dependency on $(LIBLTDL), which is valued "-lltdl"
When building on OS X, the collectd build failed, because the collectd target
has a dependency on "-lltdl", which is the value the variable $(LIBLTDL) has.
Obviously, this should be the file name instead. I am however not sure how to
specify the correct filename in this case.
Fixes GitHub issue #54.
Signed-off-by: Florian Forster <octo@collectd.org>
When building on OS X, the collectd build failed, because the collectd target
has a dependency on "-lltdl", which is the value the variable $(LIBLTDL) has.
Obviously, this should be the file name instead. I am however not sure how to
specify the correct filename in this case.
Fixes GitHub issue #54.
Signed-off-by: Florian Forster <octo@collectd.org>
ethstat plugin: Implement the "Map" option.
ethstat plugin: Add documentation.
ethstat plugin: Use the system header files if available.
And disable the plugin when they are not.
And disable the plugin when they are not.
ethstat module: Fix allocation of "ifacelist".
And remove uses of strcpy(3).
And remove uses of strcpy(3).
ethstat plugin: Fix includes.
ethstat plugin: Collect performance statistics from NICs.
Hi all,
For my needs at work I wrote a plugin for collectd and I wish to share it with
you.
This plugins, temporary called ethstat and wrote in C, collect lot of
performance counter about network interface as "ethtool -S ethX" do by asking
NIC driver module.
At the moment this plugin work only under Linux. Any help would be great for
make it working under Solaris, AIX and co ...
If you think this plugin may be included to collectd sources, what is the
procedure to do it ?
Regards,
Cyril Feraudet
To be added to configuration file to make it work :
LoadPlugin ethstat
<Plugin ethstat>
Iface "eth0"
#Iface "eth1"
#Iface "eth2"
#Iface "eth3"
</Plugin>
Signed-off-by: Florian Forster <octo@collectd.org>
Hi all,
For my needs at work I wrote a plugin for collectd and I wish to share it with
you.
This plugins, temporary called ethstat and wrote in C, collect lot of
performance counter about network interface as "ethtool -S ethX" do by asking
NIC driver module.
At the moment this plugin work only under Linux. Any help would be great for
make it working under Solaris, AIX and co ...
If you think this plugin may be included to collectd sources, what is the
procedure to do it ?
Regards,
Cyril Feraudet
To be added to configuration file to make it work :
LoadPlugin ethstat
<Plugin ethstat>
Iface "eth0"
#Iface "eth1"
#Iface "eth2"
#Iface "eth3"
</Plugin>
Signed-off-by: Florian Forster <octo@collectd.org>
varnish plugin: Simplify the v2/v3 define structs.
This somewhat duplicates the code in the read callback, but it's easier to read
than having four or so defines in one function.
Addresses GitHub issue #14.
This somewhat duplicates the code in the read callback, but it's easier to read
than having four or so defines in one function.
Addresses GitHub issue #14.
varnish plugin: Closed VSM
varnish plugin: Switched to AC_CHECK_HEADERS
varnish plugin: Fixed wrong function name
varnish plugin: Added basic Varnish 3.0 support
varnish plugin: Added Varnish version detection flag
amqp plugin: Fix compabitility with current librabbitmq.
In particular, add compatibility to the 0.9.1 and current development version.
Unfortunately, no version macro exists, so we need to do some autoconf trickery
:(
Fixes GitHub issue #6.
In particular, add compatibility to the 0.9.1 and current development version.
Unfortunately, no version macro exists, so we need to do some autoconf trickery
:(
Fixes GitHub issue #6.
Merge pull request #44 from octo/ff/perl
Fix race condition in the Perl plugin.
Fix race condition in the Perl plugin.