src/plugin.c: Make plugin_load() idempotent, i.e. don't load plugins twice.
Previously, multiple 'LoadPlugin "foo"' lines would dlopen the same .so file
twice and call its module_register function twice. This would eventually result
in complaints about callbacks with the same name being registered. With this
patch each plugin is only loaded only once, allowing people to write "self
contained" configuration segments.
Thanks to Tim Bunce for suggesting this!
Github: #333
Previously, multiple 'LoadPlugin "foo"' lines would dlopen the same .so file
twice and call its module_register function twice. This would eventually result
in complaints about callbacks with the same name being registered. With this
patch each plugin is only loaded only once, allowing people to write "self
contained" configuration segments.
Thanks to Tim Bunce for suggesting this!
Github: #333
Merge branch 'ef/mic'
README: Document power consumption being collected by the mic plugin.
mic plugin: Fix indentation issue.
mic plugin: Change the name of the power settings …
… to reflec the names documented in the manpage.
… to reflec the names documented in the manpage.
Drop suffixes, now that we are putting them in correct types
Do proper storage of power numbers, do conversion to base units.
Add Documentaion for Power collection in the mic plugin
mic plugin: Code for power readings.
curl_xml plugin: Allow arbitrarily long callback names.
Fixes issue #286.
Fixes issue #286.
src/common.[ch]: Add the ssnprintf_alloc() function.
src/plugin.c: Allocate read-callback names on the heap.
This allows to use arbitrarily long callback names.
Prerequisite for fixing #286.
This allows to use arbitrarily long callback names.
Prerequisite for fixing #286.
collectd.conf(5): Add documentation for the MIC plugin.
configure.in: Remove the unused "plugin_mic" variable.
mic plugin: Use the "core number" as plugin instance.
Previously, per-core CPU statistics would be dispatched as (e.g.):
<host>/mic-0/cpu-1-user
This makes graping hard, because it required to parse the type instance to
seperate out different graphs. The core number has therefore been moved to the
plugin instance, so the "mic" plugin behaves more like the "cpu" plugin, e.g.:
<host>/mic-0-cpu-1/cpu-user
Previously, per-core CPU statistics would be dispatched as (e.g.):
<host>/mic-0/cpu-1-user
This makes graping hard, because it required to parse the type instance to
seperate out different graphs. The core number has therefore been moved to the
plugin instance, so the "mic" plugin behaves more like the "cpu" plugin, e.g.:
<host>/mic-0-cpu-1/cpu-user
mic plugin: Some more coding style changes. Mostly breaking long lines.
mic plugin: Remove the NUM_THERMS define.
Also some coding style changes: Limit line length, move temporary variables
to an innter scope, print the temperature name in an error message (rather
than its ID).
Also some coding style changes: Limit line length, move temporary variables
to an innter scope, print the temperature name in an error message (rather
than its ID).
AUTHORS, README: Add Evan and the mic plugin.
cleanup mic number initializing. Prefix Debug and error messages
Use proper values out of memory utilization
Fix input parameter
Cleanup errors from upstream review, cleanup typeographical errors.
here's some bits to fix CFLAGS to CPPFLAGS
rework dependencies for mic plugin
fix copy framework error
AUTHORS, README: Add the "cgroups" plugin.
cgroups plugin: Rename the "cgroups_cpuacct" plugin.
The new name is sufficient and much easier to type / remember.
The new name is sufficient and much easier to type / remember.
collectd.conf(5): Fixed a typo (comma vs. dot) and markup fixes.
src/types.db: Remove the unused "cpuacct" type.
cgroups_cpuacct plugin: Read file line-by-line.
Use the field name from the file as type instance when dispatching values.
Use the field name from the file as type instance when dispatching values.
Add config options
add cpu stat gathering
Add Thermal gathering, and the config properly
Initial implementation of build addition, and memory gathering for the mic card
cgroups_cpuacct plugin: Re-indent read_cpuacct_root().
The rest of the file is indented using tabs.
The rest of the file is indented using tabs.
cgroups_cpuacct plugin: Use type "cpu" to submit value lists.
cgroups_cpuacct plugin: Minor style fixes.
* Avoid mixed declarations.
* Use parse_value() rather than atoll().
* Comment static arguments to walk_directory().
* Return an error if the read() function can't locate the cgroup
mount point.
* Avoid mixed declarations.
* Use parse_value() rather than atoll().
* Comment static arguments to walk_directory().
* Return an error if the read() function can't locate the cgroup
mount point.
src/common.[ch]: read_file_contents: Use {s,}size_t rather than int.
Add cgroups_cpuacct plugin to collect CPU user/system time per cgroup
This is handy for computers using systemd, as systemd puts each service
into a separate cgroup.
Signed-off-by: Florian Forster <octo@collectd.org>
This is handy for computers using systemd, as systemd puts each service
into a separate cgroup.
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'cm/lvm'
Github: #291
Signed-off-by: Florian Forster <octo@collectd.org>
Github: #291
Signed-off-by: Florian Forster <octo@collectd.org>
AUTHORS, README: Add Chad and the LVM plugin.
Changed plugin from volume to lvm
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Removed un-needed files
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
amqp: add Graphite{SeparateInstances,AlwaysAppendDS} options
volume plugin: Fix a couple of issues from the code review.
* Use df_complex as data type.
* Submit LV sizes and "free", but not "total" and "used".
* Fix error handling; don't use variable if it is NULL, remove calls to
exit().
* Use df_complex as data type.
* Submit LV sizes and "free", but not "total" and "used".
* Fix error handling; don't use variable if it is NULL, remove calls to
exit().
snmp plugin: Removed "mixed delaration".
This should fix this warning Fabien Wernli reported:
snmp.c:1381: warning: ISO C90 forbids mixed declarations and code
This should fix this warning Fabien Wernli reported:
snmp.c:1381: warning: ISO C90 forbids mixed declarations and code
Changed data type from vg to vol_group and lv to logical_vol to be more descriptive
changed symbol check for lvm2app
added missing comma to AC_CHECK_LIB for lvm2app
Added logical volume size metrics
src/Makefile.am: Really don't distribute *.pb-c.[ch].
src/Makefile.am: Add *.proto to EXTRA_DIST. D'oh!
Build system: Don't ship the generated *.pb-c.[ch] files.
They depend on specific versions of the protobuf-c.h header file, so
shipping this will cause problems for people having a different version
of protoc-c installed. This reverts some of the work done in #269, but
distcheck should still work. Meh.
They depend on specific versions of the protobuf-c.h header file, so
shipping this will cause problems for people having a different version
of protoc-c installed. This reverts some of the work done in #269, but
distcheck should still work. Meh.
RedHat RPM spec: updated for 5.3.0
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
configure.in: Fix libgcrypt flags on FreeBSD.
On FreeBSD, AM_PATH_LIBGCRYPT sets LIBGCRYPT_CFLAGS but not
LIBGCRYPT_CPPFLAGS. Use both variables to be on the save side.
On FreeBSD, AM_PATH_LIBGCRYPT sets LIBGCRYPT_CFLAGS but not
LIBGCRYPT_CPPFLAGS. Use both variables to be on the save side.
Bump version to 5.3.0; Update ChangeLog.
Merge branch 'collectd-5.2'
Bump version to 5.2.2; Update ChangeLog.
Merge branch 'collectd-5.1' into collectd-5.2
Conflicts:
ChangeLog
version-gen.sh
Conflicts:
ChangeLog
version-gen.sh
Bump version to 5.1.3; Update ChangeLog.
Merge remote-tracking branch 'origin/collectd-4.10' into collectd-5.1
Conflicts:
ChangeLog
version-gen.sh
Conflicts:
ChangeLog
version-gen.sh
Bump version to 4.10.9; Update ChangeLog.
netapp plugin: Fix the interval used by the SnapVault and quota metrics.
Additional fix for Github issue #288.
Additional fix for Github issue #288.
Merge branch 'collectd-5.2'
Merge branch 'collectd-5.1' into collectd-5.2
Merge branch 'jk/snmp' into collectd-5.1
write_riemann plugin: Reorder the functions to get rid or prototypes.
write_riemann plugin: Use the "Attributes" of an Event rather than abuse the "Tags".
Riemann 0.2.0 provides "Attributes", which are key-value pairs. Since
the plugin previously basically abused the tag system for adding this
kind of data, switch to the new and shiny thing :)
Riemann 0.2.0 provides "Attributes", which are key-value pairs. Since
the plugin previously basically abused the tag system for adding this
kind of data, switch to the new and shiny thing :)
src/riemann.proto: Import the protocol buffer for Riemann 0.2.0.
Merge remote-tracking branch 'github-octo/ff/netapp' into collectd-5.1
Merge branch 'collectd-5.2'
Merge branch 'collectd-5.1' into collectd-5.2
Conflicts:
configure.in
Conflicts:
configure.in
Merge branch 'collectd-4.10' into collectd-5.1
Conflicts:
configure.in
src/mysql.c
src/network.c
src/thermal.c
Conflicts:
configure.in
src/mysql.c
src/network.c
src/thermal.c
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.
.gitignore: Add src/*.pb-c.[ch]
configure.in: Fix dependency of the pinba and write_riemann plugins.
Since the generated *.pb-c.[ch] files are now included in the
distribution, they only depend on the <google/protobuf-c/protobuf-c.h>
header file, not the protobuf compiler.
Since the generated *.pb-c.[ch] files are now included in the
distribution, they only depend on the <google/protobuf-c/protobuf-c.h>
header file, not the protobuf compiler.
src/Makefile.am: Move *.pb-c.[ch] to MAINTAINERCLEANFILES.
Only generate build rules for these files if protoc-c is available and
use the provided files from the distribution if it is not.
Only generate build rules for these files if protoc-c is available and
use the provided files from the distribution if it is not.
11 years agosrc/Makefile.am: Include .c and .h files generated from Protocol Buffers in the distr...
src/Makefile.am: Include .c and .h files generated from Protocol Buffers in the distribution.
Fixes Github issue #269.
Signed-off-by: Florian Forster <octo@collectd.org>
Fixes Github issue #269.
Signed-off-by: Florian Forster <octo@collectd.org>
bindings/Makefile: Hint the user at --with-perl-bindings.
… in case 'perl Makefile.PL' fails.
Fixes Github issue #290.
Signed-off-by: Florian Forster <octo@collectd.org>
… in case 'perl Makefile.PL' fails.
Fixes Github issue #290.
Signed-off-by: Florian Forster <octo@collectd.org>
build system (Perl bindings): Make Makefile.PL's PREFIX/INSTALL_BASE optional.
Both options may cause problems:
- PREFIX might clash with INSTALL_BASE being set in $PERL_MM_OPT.
- INSTALL_BASE without any further options set will install into non-standard
directories in many cases.
Rather, use PREFIX=${prefix} as default but overwrite that if
--with-perl-bindings=... has been used.
Thanks to faxm0dem for reporting the INSTALL_BASE problems on IRC and
bvarner and nirik for reporting this in GH #177 and #196.
This is a follow-up / fix for 97e8f346a88eccf4d1608c21d5cc6ee9620c1c41.
Fixes Github issue #290.
Signed-off-by: Florian Forster <octo@collectd.org>
Both options may cause problems:
- PREFIX might clash with INSTALL_BASE being set in $PERL_MM_OPT.
- INSTALL_BASE without any further options set will install into non-standard
directories in many cases.
Rather, use PREFIX=${prefix} as default but overwrite that if
--with-perl-bindings=... has been used.
Thanks to faxm0dem for reporting the INSTALL_BASE problems on IRC and
bvarner and nirik for reporting this in GH #177 and #196.
This is a follow-up / fix for 97e8f346a88eccf4d1608c21d5cc6ee9620c1c41.
Fixes Github issue #290.
Signed-off-by: Florian Forster <octo@collectd.org>
removed unused var plugin_volume
network plugin: Make sure gcrypt is initialized before using any of its functions.
@marekbecka found that sockent_open() is called during the configuration
phase, but gcrypt is initialized later, during the initialization phase.
This patch will initialize gcrypt in sockent_open() if any sockets with
security are configured.
Fixes Github issue #273.
@marekbecka found that sockent_open() is called during the configuration
phase, but gcrypt is initialized later, during the initialization phase.
This patch will initialize gcrypt in sockent_open() if any sockets with
security are configured.
Fixes Github issue #273.
Added configuration for autotools
initial commit of volume.c
Don't clobber TMPDIR during Java detection
- Java detection used TMPDIR as var to parse command output
- TMPDIR is used in libltdl later on in ./configure
- alternative fix is local var or subshell
- fixes issue introduced via #33163ee
Conflicts:
configure.in
Signed-off-by: Florian Forster <octo@collectd.org>
- Java detection used TMPDIR as var to parse command output
- TMPDIR is used in libltdl later on in ./configure
- alternative fix is local var or subshell
- fixes issue introduced via #33163ee
Conflicts:
configure.in
Signed-off-by: Florian Forster <octo@collectd.org>
notify_email: Add charset in Content-Type header (seems required by some picky spam filters)
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
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.
netapp plugin: Fix intervals used when dispatching values.
It used to use the interval of the <Host /> block when in fact it should
have used the interval of the data blocks.
Fixes Github issue #288.
It used to use the interval of the <Host /> block when in fact it should
have used the interval of the data blocks.
Fixes Github issue #288.
snmp plugin: Fix compilation issue.
Thanks to Magnus for pointing this out.
Thanks to Magnus for pointing this out.
nfs plugin: Copy the name before calling the non-const lookup function.
Fixes Github issue #70. Thanks to Jeff for reporting this issue.
Fixes Github issue #70. Thanks to Jeff for reporting this issue.
rrdcached plugin: Connect to the daemon in the read() callback.
Fixes Github issue #275. Thanks to Yves Mettier for reporting this bug!
Fixes Github issue #275. Thanks to Yves Mettier for reporting this bug!
Merge branch 'collectd-5.1' into collectd-5.2
src/libcollectdclient/network_buffer.c check for htonll exitence
before defining it. I have to to this to get it compiled on AIX6
Signed-off-by: Florian Forster <octo@collectd.org>
before defining it. I have to to this to get it compiled on AIX6
Signed-off-by: Florian Forster <octo@collectd.org>
snmp plugin: Allocate "oid_list" on the stack.
snmp plugin: Some coding style fixes.
* Rename "oid_todo_list" to "oid_list_todo".
* Rename "j" to "oid_list_todo_num".
* Fix indentation.
* Declare variables at beginning of block.
* Rename "oid_todo_list" to "oid_list_todo".
* Rename "j" to "oid_list_todo_num".
* Fix indentation.
* Declare variables at beginning of block.
csnmp_read_table: Change GETNEXT request behaviour (+ bugfix 235)
This patch changes the snmp GETNEXT request behaviour implemented in snmp.c.
The old implementation requested all OIDs using GETNEXT requests until all OIDs
left their own subtree. In cases were trees in a Data template are much longer
than other trees the shorter subtrees were re-requested over and over again.
The new implementation will only request OIDs that did not already leave their
subtrees (see the oid_todo_list implementation for details). This renders the
function csnmp_check_res_left_subtree useless as the oid_todo_list keeps track
if all OIDs have finished.
During tests against Cat6500 (CatOS/IOS) as well as Nexus5k (NX-OS) it looks as
though GETNEXT requests (when requesting multiple OIDs like all 14 dot3Stats
errors from Etherlike-MIB) can take about 5-10ms (CatOS 30ms) longer if they wrap
to the next OID.
This does not sound much but when collecting data for the Etherlike-MIB (that only
has entries for physical interfaces) with a collectd "Instance" variable in IF-MIB
(that has entries for all physical as well as pseudo [SVIs, VLANs, ...] interfaces)
this can make a notable difference (e.g. for core routers that have all SVIs and
VLANs but only some switches attached):
IOS-Core-Router ifName 550 entries
dot3StatsFCSErrors 70 entries
------------
480 entries * 10ms = 4.8s overhead
CatOS-Access-Sw. ifName 840 entries
dot3StatsFCSErrors 490 entries
------------
350 entries * 30ms = 10.5s overhead
After refactoring csnmp_read_table "Instance" and "Value" OIDs are now handled
consistently (so no pointer-forward foo needed). It doesn't change any logic
and data structures, though - so there should not be any impact to other
functions.
The refactored code also fixes GitHub bugs #235 and #258. This bug is due to
reusing the status variable in following code section which might lead to errors
if the subtrees are of different length:
1436 /* Calculate the current suffix. This is later used to check that the
1437 * suffix is increasing. This also checks if we left the subtree */
1438 status = csnmp_oid_suffix (&suffix, &vb_name, data->values + i);
Signed-off-by: Florian Forster <octo@collectd.org>
This patch changes the snmp GETNEXT request behaviour implemented in snmp.c.
The old implementation requested all OIDs using GETNEXT requests until all OIDs
left their own subtree. In cases were trees in a Data template are much longer
than other trees the shorter subtrees were re-requested over and over again.
The new implementation will only request OIDs that did not already leave their
subtrees (see the oid_todo_list implementation for details). This renders the
function csnmp_check_res_left_subtree useless as the oid_todo_list keeps track
if all OIDs have finished.
During tests against Cat6500 (CatOS/IOS) as well as Nexus5k (NX-OS) it looks as
though GETNEXT requests (when requesting multiple OIDs like all 14 dot3Stats
errors from Etherlike-MIB) can take about 5-10ms (CatOS 30ms) longer if they wrap
to the next OID.
This does not sound much but when collecting data for the Etherlike-MIB (that only
has entries for physical interfaces) with a collectd "Instance" variable in IF-MIB
(that has entries for all physical as well as pseudo [SVIs, VLANs, ...] interfaces)
this can make a notable difference (e.g. for core routers that have all SVIs and
VLANs but only some switches attached):
IOS-Core-Router ifName 550 entries
dot3StatsFCSErrors 70 entries
------------
480 entries * 10ms = 4.8s overhead
CatOS-Access-Sw. ifName 840 entries
dot3StatsFCSErrors 490 entries
------------
350 entries * 30ms = 10.5s overhead
After refactoring csnmp_read_table "Instance" and "Value" OIDs are now handled
consistently (so no pointer-forward foo needed). It doesn't change any logic
and data structures, though - so there should not be any impact to other
functions.
The refactored code also fixes GitHub bugs #235 and #258. This bug is due to
reusing the status variable in following code section which might lead to errors
if the subtrees are of different length:
1436 /* Calculate the current suffix. This is later used to check that the
1437 * suffix is increasing. This also checks if we left the subtree */
1438 status = csnmp_oid_suffix (&suffix, &vb_name, data->values + i);
Signed-off-by: Florian Forster <octo@collectd.org>