collectd.git
9 years agocollectd.conf example: mention new write_riemann options
Marc Fournier [Mon, 15 Dec 2014 15:22:08 +0000 (16:22 +0100)]
collectd.conf example: mention new write_riemann options

9 years agocollectd.conf example: remove erroneous quotes
Marc Fournier [Mon, 15 Dec 2014 15:10:41 +0000 (16:10 +0100)]
collectd.conf example: remove erroneous quotes

Thanks to @ymettier for pointing that out !

9 years agoMerge branch 'collectd-4.10' into collectd-5.3
Marc Fournier [Fri, 12 Dec 2014 22:13:15 +0000 (23:13 +0100)]
Merge branch 'collectd-4.10' into collectd-5.3

Conflicts:
src/libvirt.c

9 years agovirt plugin: only gather stats for running domains
Ruben Kerkhof [Tue, 9 Dec 2014 16:06:43 +0000 (17:06 +0100)]
virt plugin: only gather stats for running domains

Conflicts:
src/libvirt.c

9 years agoMerge pull request #857 from Lupul/patch-1
Marc Fournier [Fri, 12 Dec 2014 21:23:46 +0000 (22:23 +0100)]
Merge pull request #857 from Lupul/patch-1

virt plugin: Fix memory stats to use the same units

For the record, this is the same as 7bf99b36d, which got missed out from 627a050790.

9 years agovirt plugin: Fix memory stats to use the same units
Zollner Robert [Thu, 11 Dec 2014 00:18:31 +0000 (02:18 +0200)]
virt plugin: Fix memory stats to use the same units

memory_submit and memory_stats_submit should use same units "Bytes"

- Fixes: #856

9 years agoMerge pull request #1 from mfournier/ceph
daryder [Wed, 10 Dec 2014 19:13:01 +0000 (14:13 -0500)]
Merge pull request #1 from mfournier/ceph

ceph: a couple of small details

9 years agoceph: prepend all warning & error messages with plugin name
Marc Fournier [Wed, 10 Dec 2014 15:44:33 +0000 (16:44 +0100)]
ceph: prepend all warning & error messages with plugin name

9 years agoMerge pull request #853 from vincentbernat/fix/kafka-unavailable-partitions
Pierre-Yves Ritschard [Wed, 10 Dec 2014 15:20:15 +0000 (16:20 +0100)]
Merge pull request #853 from vincentbernat/fix/kafka-unavailable-partitions

write_kafka: check for partition availability before selecting one

9 years agowrite_kafka: check for partition availability before selecting one
Vincent Bernat [Wed, 10 Dec 2014 14:41:49 +0000 (15:41 +0100)]
write_kafka: check for partition availability before selecting one

When a partition is unavailable, sending to it will just lead to a lost
metric. Therefore, after selecting the partition, check if it is
available. If not, select the next one until we tried them all.

A future iteration may use consistent hashing to avoid to double the
work done on a partition when the previous one is unavailable.

9 years agoceph: replace erroneous format string in DEBUG statement
Marc Fournier [Tue, 2 Dec 2014 11:51:10 +0000 (12:51 +0100)]
ceph: replace erroneous format string in DEBUG statement

Fixes build error on 32bit systems

9 years agoceph: correct pod formatting error in manpage
Marc Fournier [Wed, 12 Nov 2014 08:30:02 +0000 (09:30 +0100)]
ceph: correct pod formatting error in manpage

9 years agomodbus: wrap long lines + indentation/alignment
Marc Fournier [Tue, 9 Dec 2014 23:37:52 +0000 (00:37 +0100)]
modbus: wrap long lines + indentation/alignment

9 years agoadded man page section for ModbusRegisterType
Jan Vitek [Thu, 6 Jun 2013 13:20:04 +0000 (15:20 +0200)]
added man page section for ModbusRegisterType

9 years agorenamed Function to ModbusRegisterType
Jan Vitek [Thu, 6 Jun 2013 13:10:10 +0000 (15:10 +0200)]
renamed Function to ModbusRegisterType

9 years agoadded possibility to choose between holding and input registers
Jan Vitek [Fri, 31 May 2013 13:34:05 +0000 (15:34 +0200)]
added possibility to choose between holding and input registers

9 years agobind-plugin: fix zones iteratation upper limit
Michal Humpula [Tue, 9 Dec 2014 12:08:36 +0000 (13:08 +0100)]
bind-plugin: fix zones iteratation upper limit

9 years agoadd missing credits to Michael Schenck
Marc Fournier [Fri, 5 Dec 2014 21:25:20 +0000 (22:25 +0100)]
add missing credits to Michael Schenck

9 years agoupstart example config: clarify expect stanza ambiguity
Marc Fournier [Fri, 5 Dec 2014 13:01:05 +0000 (14:01 +0100)]
upstart example config: clarify expect stanza ambiguity

9 years agoredhat initscript: move restart block to a function
Marc Fournier [Fri, 5 Dec 2014 12:52:09 +0000 (13:52 +0100)]
redhat initscript: move restart block to a function

This ensures the "condrestart" option will work.

9 years agoRPM specfile: indentation + other minor adjustments
Marc Fournier [Wed, 3 Dec 2014 16:48:54 +0000 (17:48 +0100)]
RPM specfile: indentation + other minor adjustments

9 years agoAdd ability to ignore bad daemon configs
daryder [Thu, 4 Dec 2014 20:09:19 +0000 (15:09 -0500)]
Add ability to ignore bad daemon configs

9 years agonetlink: ensure size_t portability in DEBUG() statement
Marc Fournier [Wed, 3 Dec 2014 15:15:28 +0000 (16:15 +0100)]
netlink: ensure size_t portability in DEBUG() statement

This prevents the following error when building on 32bit systems with
gcc 4.7.2:

netlink.c: In function 'ir_read':
netlink.c:783:7: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' [-Werror=format]

9 years agoMerge pull request #839 from yogeswaran/python
trenkel [Wed, 3 Dec 2014 19:59:29 +0000 (20:59 +0100)]
Merge pull request #839 from yogeswaran/python

Fix Py list length check in cpy_build_meta()

9 years agoFixed indentation and decreased reference count
Yoga Ramalingam [Wed, 3 Dec 2014 19:37:06 +0000 (14:37 -0500)]
Fixed indentation and decreased reference count

9 years agoFix Py list length check in cpy_build_meta()
Yoga Ramalingam [Wed, 3 Dec 2014 17:20:17 +0000 (12:20 -0500)]
Fix Py list length check in cpy_build_meta()

9 years agoMerge pull request #834 from mfournier/zookeeper_build_error
Marc Fournier [Wed, 3 Dec 2014 15:08:50 +0000 (16:08 +0100)]
Merge pull request #834 from mfournier/zookeeper_build_error

zookeeper: initialize a variable

9 years agoMerge pull request #827 from yogeswaran/collectdctl
Pierre-Yves Ritschard [Wed, 3 Dec 2014 15:06:13 +0000 (16:06 +0100)]
Merge pull request #827 from yogeswaran/collectdctl

collectdctl command hangs on AIX and returns error 0 on Solaris.

9 years agostatsd histogram to support more than 1 second
Yoga Ramalingam [Fri, 14 Nov 2014 14:23:13 +0000 (09:23 -0500)]
statsd histogram to support more than 1 second

Summary:
Problem: Collectd/Statsd supports configurable percentiles for timers but it limits the value to be 1 to 1000ms. If the timer value is more than 1000ms, it uses for min, max, average,... and drops it for percentile computation.

Solution: Added support for increasing bin width when the value is above histogram's range.

Test Plan: Tested by sending metrics within range and out-of-range (ie above 1000 ms)

Reviewers: skhajamo, shalstea

Reviewed By: skhajamo

CC: arcyd
Differential Revision: https://all.phab.dev.bloomberg.com/D156454

9 years agoRemoved extra semicolon
Yoga Ramalingam [Wed, 3 Dec 2014 13:40:18 +0000 (08:40 -0500)]
Removed extra semicolon

9 years agoRPM specfile: switch to using upstart/systemd
Marc Fournier [Mon, 1 Dec 2014 13:31:14 +0000 (14:31 +0100)]
RPM specfile: switch to using upstart/systemd

Favor using systemd when installing on EL7, and upstart on EL6. No
changes for EL5. Uses the upstart & systemd config files from
the contrib/ directory.

The sysv initscript used on EL5 is still available in the
collectd-contrib package, for those who prefer using the traditional
init system.

9 years agozookeeper: initialize a variable
Marc Fournier [Tue, 2 Dec 2014 23:10:54 +0000 (00:10 +0100)]
zookeeper: initialize a variable

If the loop on line 132 doesn't iterate at least once, the function would
return the "sk" variable uninitialized.

This fixes the following build error:

cc1: warnings being treated as errors
zookeeper.c: In function 'zookeeper_read':
zookeeper.c:107: warning: 'sk' may be used uninitialized in this function
make[3]: *** [zookeeper.lo] Error 1

(caught by gcc version 4.1.2 on EL5)

9 years agoRPM specfile: require package providing ltdl.h
Marc Fournier [Tue, 2 Dec 2014 22:42:06 +0000 (23:42 +0100)]
RPM specfile: require package providing ltdl.h

9 years agoRPM specfile: add zookeeper plugin
Marc Fournier [Tue, 2 Dec 2014 21:04:50 +0000 (22:04 +0100)]
RPM specfile: add zookeeper plugin

9 years agozookeeper: add mention in README & AUTHORS
Marc Fournier [Tue, 2 Dec 2014 21:02:50 +0000 (22:02 +0100)]
zookeeper: add mention in README & AUTHORS

9 years agoreset counter type to it's initial value
Marc Fournier [Tue, 2 Dec 2014 20:49:47 +0000 (21:49 +0100)]
reset counter type to it's initial value

It was a COUNTER, not a GAUGE before it got accidentally deleted by
6372ca6a38.

9 years agoreintroduce counter, killed by error
Pierre-Yves Ritschard [Tue, 2 Dec 2014 15:59:23 +0000 (16:59 +0100)]
reintroduce counter, killed by error

10 years agoMerge pull request #826 from katzj/zookeeper
Pierre-Yves Ritschard [Tue, 2 Dec 2014 12:26:20 +0000 (13:26 +0100)]
Merge pull request #826 from katzj/zookeeper

Add a plugin for monitoring zookeeper

10 years agocpu plugin: Mark the "active" state as available.
Florian Forster [Tue, 2 Dec 2014 10:22:13 +0000 (11:22 +0100)]
cpu plugin: Mark the "active" state as available.

This fixes the !ByState && ByCpu case, i.e. when the user requests one
metric ("active") per CPU.

Bug: #820

10 years agocpu plugin: Fix ValuesPercentage to behave as documented.
Florian Forster [Tue, 2 Dec 2014 10:09:32 +0000 (11:09 +0100)]
cpu plugin: Fix ValuesPercentage to behave as documented.

The documentation claims that ValuesPercentage is only considered when
!ByState && !ByCpu. Fix the behavior to match this documented behavior.
This makes cpu_commit_without_aggregation much easier.

Bug: #820

10 years agoWrap the content of macro with do/while to make it safer as per code review comment
Yoga Ramalingam [Mon, 1 Dec 2014 14:55:10 +0000 (09:55 -0500)]
Wrap the content of macro with do/while to make it safer as per code review comment

10 years agocpu: remove legacy assignment to undefiend variable
Marc Fournier [Mon, 1 Dec 2014 08:07:30 +0000 (09:07 +0100)]
cpu: remove legacy assignment to undefiend variable

This finishes up the cleanup done by f7100301fa. It also fixes #828
(build error on Mac OS).

Many thanks to @njh for pointing that out !

10 years agoMerge pull request #411 from radford/curl-json-inhomogeneous-arrays
Pierre-Yves Ritschard [Mon, 1 Dec 2014 07:49:00 +0000 (08:49 +0100)]
Merge pull request #411 from radford/curl-json-inhomogeneous-arrays

curl_json plugin: don't complain about not finding expected maps in arrays

10 years agoMerge pull request #829 from njh/cpu_state
Pierre-Yves Ritschard [Mon, 1 Dec 2014 07:45:37 +0000 (08:45 +0100)]
Merge pull request #829 from njh/cpu_state

Renamed all CPU_STATE_* defines for consistency and to avoid conflicts

10 years agoRenamed all CPU_STATE_* defines for consistency and to avoid conflicts (fixes #812)
Nicholas Humfrey [Sun, 30 Nov 2014 20:15:23 +0000 (20:15 +0000)]
Renamed all CPU_STATE_* defines for consistency and to avoid conflicts (fixes #812)

10 years agoMerge pull request #396 from radford/perl-debug-compile-fix
Pierre-Yves Ritschard [Sat, 29 Nov 2014 07:08:16 +0000 (08:08 +0100)]
Merge pull request #396 from radford/perl-debug-compile-fix

perl plugin: #undef macros before poisoning them.

10 years agocollectdctl command hangs on AIX and returns error 0 on Solaris.
Yoga Ramalingam [Wed, 12 Nov 2014 21:07:15 +0000 (16:07 -0500)]
collectdctl command hangs on AIX and returns error 0 on Solaris.

Summary:
Problem: collectdctl command hangs on AIX and returns error 0 on Solaris.

Root cause - client (collectdctl) and server (collectd daemon) are using fprintf to communicate using Unix domain socket, Since fprintf buffers, command sent by client did not reach server, since client does not get the response, it closes the socket which forces the client to flush the command, now server receives the command, when responding, it gets socket error because the client already closed the socket.

Solution: Added flush after all fprintf calls.

Test Plan: Tested collectdctl on AIX and SunOS for listval, getval commands

Reviewers: skhajamo

Reviewed By: skhajamo

CC: arcyd
Differential Revision: https://all.phab.dev.bloomberg.com/D155584

10 years agoMerge pull request #824 from collectd/feature/update-innodb-stats
Pierre-Yves Ritschard [Fri, 28 Nov 2014 08:24:34 +0000 (09:24 +0100)]
Merge pull request #824 from collectd/feature/update-innodb-stats

Fetch innodb stats from the information_schema when appropriate.

10 years agoUse generic types for a few more of the zookeeper metrics
Jeremy Katz [Fri, 28 Nov 2014 05:33:39 +0000 (00:33 -0500)]
Use generic types for a few more of the zookeeper metrics

10 years agoAdd information to collectd.conf (5) for the zookeeper plugin
Jeremy Katz [Fri, 28 Nov 2014 05:32:32 +0000 (00:32 -0500)]
Add information to collectd.conf (5) for the zookeeper plugin

10 years agoerroneous comparison, caught by clang
Pierre-Yves Ritschard [Thu, 27 Nov 2014 09:08:43 +0000 (10:08 +0100)]
erroneous comparison, caught by clang

10 years agoAdd a plugin for monitoring zookeeper
Jeremy Katz [Wed, 26 Nov 2014 23:48:44 +0000 (18:48 -0500)]
Add a plugin for monitoring zookeeper

This adds a simple plugin to read data from Zookeeper's MNTR
command to allow for easy monitoring of Zookeeper from collectd
without requiring jmx

10 years agoFetch innodb stats from the information_schema when appropriate.
Pierre-Yves Ritschard [Wed, 26 Nov 2014 13:28:51 +0000 (14:28 +0100)]
Fetch innodb stats from the information_schema when appropriate.

This supercedes #556, using the same query but assigning types.
I'd love some help deciding which types to use.

10 years agoMerge pull request #813 from njh/openldap_symbol_fix
Marc Fournier [Wed, 26 Nov 2014 13:07:02 +0000 (14:07 +0100)]
Merge pull request #813 from njh/openldap_symbol_fix

Fix for "conflicting types for 'ldap_init'"

10 years agowrite_redis: pass a literal string to snprintf()
Marc Fournier [Mon, 24 Nov 2014 14:00:45 +0000 (15:00 +0100)]
write_redis: pass a literal string to snprintf()

This corrects the following compiler warning when building with
"-Werror=format-security" (the default when building debian packages):

write_redis.c:91:3: error: format not a string literal and no format
arguments

10 years agoavoid clashing with existing names on MacOSX. fixes #812
Pierre-Yves Ritschard [Mon, 24 Nov 2014 13:55:58 +0000 (14:55 +0100)]
avoid clashing with existing names on MacOSX. fixes #812

10 years agoMerge branch 'collectd-5.4'
Marc Fournier [Mon, 24 Nov 2014 08:44:45 +0000 (09:44 +0100)]
Merge branch 'collectd-5.4'

Conflicts:
src/Makefile.am
src/cpu.c
src/swap.c
src/write_redis.c

NB: dropped change to src/swap.c made in 1a146775d4, as suggested in the
commit message.

10 years agoMerge branch 'collectd-5.3' into collectd-5.4
Marc Fournier [Mon, 24 Nov 2014 08:23:18 +0000 (09:23 +0100)]
Merge branch 'collectd-5.3' into collectd-5.4

Conflicts:
src/write_graphite.c

10 years agoMerge branch 'collectd-4.10' into collectd-5.3
Marc Fournier [Mon, 24 Nov 2014 08:18:44 +0000 (09:18 +0100)]
Merge branch 'collectd-4.10' into collectd-5.3

10 years agomention configure script generation (idea from @hugoduncan).
Pierre-Yves Ritschard [Sun, 23 Nov 2014 12:27:58 +0000 (13:27 +0100)]
mention configure script generation (idea from @hugoduncan).

fixes #818

10 years agoMerge pull request #816 from collectd/feature/redis-llen
Pierre-Yves Ritschard [Fri, 21 Nov 2014 17:08:51 +0000 (18:08 +0100)]
Merge pull request #816 from collectd/feature/redis-llen

add support for custom commands in redis plugin

10 years agoMerge pull request #728 from mbethke/test-and-clean
Pierre-Yves Ritschard [Fri, 21 Nov 2014 09:32:55 +0000 (10:32 +0100)]
Merge pull request #728 from mbethke/test-and-clean

Test and clean

10 years agoadd doc bits for new postgresql option
Pierre-Yves Ritschard [Thu, 20 Nov 2014 22:17:41 +0000 (23:17 +0100)]
add doc bits for new postgresql option

10 years agoMerge pull request #593 from sodor/master
Pierre-Yves Ritschard [Thu, 20 Nov 2014 22:07:03 +0000 (23:07 +0100)]
Merge pull request #593 from sodor/master

Add postgresql writer option to skip older values.

10 years agoMerge pull request #571 from jktjkt/sensors-support-power
Pierre-Yves Ritschard [Thu, 20 Nov 2014 21:52:08 +0000 (22:52 +0100)]
Merge pull request #571 from jktjkt/sensors-support-power

Add support for monitoring lm_sensors' "power" sensors

10 years agoMerge pull request #699 from marekbecka/innodb_stats
Pierre-Yves Ritschard [Thu, 20 Nov 2014 15:38:57 +0000 (16:38 +0100)]
Merge pull request #699 from marekbecka/innodb_stats

add more innodb metrics

10 years agoMerge pull request #550 from marekbecka/nfs4
Pierre-Yves Ritschard [Thu, 20 Nov 2014 15:30:27 +0000 (16:30 +0100)]
Merge pull request #550 from marekbecka/nfs4

Add support for nfs4 on linux

10 years agoAdd documentation bits.
Pierre-Yves Ritschard [Thu, 20 Nov 2014 12:29:44 +0000 (13:29 +0100)]
Add documentation bits.

10 years agoProvide sensible default for configuration values
Pierre-Yves Ritschard [Thu, 20 Nov 2014 12:24:35 +0000 (13:24 +0100)]
Provide sensible default for configuration values

This reorders arguments a bit:

- The query is expected to be the block argument
- The type instance is inferred from the query if unsupplied
- The type will default to gauge if not supplied

10 years agouse consistent naming for arguments
Pierre-Yves Ritschard [Thu, 20 Nov 2014 12:15:22 +0000 (13:15 +0100)]
use consistent naming for arguments

10 years agorename command to query
Pierre-Yves Ritschard [Thu, 20 Nov 2014 12:13:18 +0000 (13:13 +0100)]
rename command to query

10 years agoadd support for custom commands in redis plugin
Pierre-Yves Ritschard [Thu, 20 Nov 2014 10:30:33 +0000 (11:30 +0100)]
add support for custom commands in redis plugin

Now that the redis plugin has moved to hiredis, it could
be worthwhile to add support for custom commands.

This diff implements a mechanism for executing commands which
allows for setting the type and type-instance. It doesn not
support hash or array returns, but if this is deemed necessary
could be added later on.

The canonical use case for this is for people using redis
has a queue (for instance, using solutions such as rq,
sidekiq and similar solutions) who want a simple way to
ensure the work queue size is not growing. To address this
you would use:

```
<Plugin redis>
  <Node local>
    <Command "queue_length">
      Exec "LLEN myqueue"
      Instance "myqueue"
    </Command>
  </Node>
</Plugin>
```

This would then produce a redis-local/queue_length-myqueue value.

If the idea has traction I'll add the doc bits.

10 years agoSupport the switch from credis to hiredis
Michael Spiegle [Fri, 13 Dec 2013 17:04:33 +0000 (09:04 -0800)]
Support the switch from credis to hiredis

Conflicts:
contrib/redhat/collectd.spec

10 years agoMerge pull request #759 from mschenck/add-linux-io-time
Marc Fournier [Thu, 20 Nov 2014 07:58:38 +0000 (08:58 +0100)]
Merge pull request #759 from mschenck/add-linux-io-time

Add linux I/O time

10 years agoMerge pull request #783 from mfournier/varnish4
Marc Fournier [Thu, 20 Nov 2014 07:53:58 +0000 (08:53 +0100)]
Merge pull request #783 from mfournier/varnish4

Add support for varnish 4.x

10 years agoMerge pull request #799 from mfournier/hiredis-switch
Marc Fournier [Thu, 20 Nov 2014 07:50:24 +0000 (08:50 +0100)]
Merge pull request #799 from mfournier/hiredis-switch

Switch redis & write_redis plugins from credis to hiredis

10 years agoRevert "Let snmp_synch_response deal with PDU freeing"
Marc Fournier [Wed, 19 Nov 2014 16:59:30 +0000 (17:59 +0100)]
Revert "Let snmp_synch_response deal with PDU freeing"

This reverts commit 9d6f72e5054cfbb183585991fefcf119259d71c4.

The proper fix to this issue is in the collectd-4.10 branch. See also
79e90bba.

10 years agoRevert "Let snmp_synch_response deal with PDU freeing"
Marc Fournier [Wed, 19 Nov 2014 16:49:30 +0000 (17:49 +0100)]
Revert "Let snmp_synch_response deal with PDU freeing"

This reverts commit e767dc103a142e1c57800f06a9c384f21a48aef5.

The proper fix to this issue is in the collectd-4.10 branch. See also
79e90bba.

10 years agosnmp: avoid freeing req under normal operation
Marc Fournier [Wed, 19 Nov 2014 16:54:09 +0000 (17:54 +0100)]
snmp: avoid freeing req under normal operation

Equivalent patch to 79e90bba5, to avoid issue #804 introduced while
fixing #610.

10 years agoAvoid reintroducing #610, updates the fix to #804
Pierre-Yves Ritschard [Wed, 19 Nov 2014 16:30:17 +0000 (17:30 +0100)]
Avoid reintroducing #610, updates the fix to #804

We might as well mess with avoid freeing the req pointer
only when failures occur, otherwise perform as before

10 years agoMerge pull request #814 from mfournier/upstart-systemd-examples
Pierre-Yves Ritschard [Wed, 19 Nov 2014 16:02:11 +0000 (17:02 +0100)]
Merge pull request #814 from mfournier/upstart-systemd-examples

upstart and systemd doc & examples

10 years agoMerge pull request #802 from ccin2p3/faxm0dem/cpu-ticks-percentage
Pierre-Yves Ritschard [Wed, 19 Nov 2014 16:01:53 +0000 (17:01 +0100)]
Merge pull request #802 from ccin2p3/faxm0dem/cpu-ticks-percentage

allow for 'ReportByCpu false' and 'ValuesPercentage false'

10 years agoLet snmp_synch_response deal with PDU freeing
Pierre-Yves Ritschard [Wed, 19 Nov 2014 15:00:54 +0000 (16:00 +0100)]
Let snmp_synch_response deal with PDU freeing

When reading from tables, upon errors the PDUs sent are already
freed by snmp_synch_response since they are right after
snmp_send is called.

This commit syncs collectd's approach with other occurences of
snmp_synch_response calls.

There might be a few corner cases where we leak PDUs, but it
is unclear how to check for those since we would need to
have an indication that snmp_send was never called, which
as far as I can tell is not possible.

The potential for failure in snmp_send is rather low and will
be easily spotted though, since when crafting invalid PDUs
snmp send will constantly fail and since valid configurations
can never leak memory.

This fixes #804

10 years agoLet snmp_synch_response deal with PDU freeing
Pierre-Yves Ritschard [Wed, 19 Nov 2014 15:00:54 +0000 (16:00 +0100)]
Let snmp_synch_response deal with PDU freeing

When reading from tables, upon errors the PDUs sent are already
freed by snmp_synch_response since they are right after
snmp_send is called.

This commit syncs collectd's approach with other occurences of
snmp_synch_response calls.

There might be a few corner cases where we leak PDUs, but it
is unclear how to check for those since we would need to
have an indication that snmp_send was never called, which
as far as I can tell is not possible.

The potential for failure in snmp_send is rather low and will
be easily spotted though, since when crafting invalid PDUs
snmp send will constantly fail and since valid configurations
can never leak memory.

This fixes #804

10 years agoLet snmp_synch_response deal with PDU freeing
Pierre-Yves Ritschard [Wed, 19 Nov 2014 15:00:54 +0000 (16:00 +0100)]
Let snmp_synch_response deal with PDU freeing

When reading from tables, upon errors the PDUs sent are already
freed by snmp_synch_response since they are right after
snmp_send is called.

This commit syncs collectd's approach with other occurences of
snmp_synch_response calls.

There might be a few corner cases where we leak PDUs, but it
is unclear how to check for those since we would need to
have an indication that snmp_send was never called, which
as far as I can tell is not possible.

The potential for failure in snmp_send is rather low and will
be easily spotted though, since when crafting invalid PDUs
snmp send will constantly fail and since valid configurations
can never leak memory.

This fixes #804

10 years agocollectd(1): mention upstart & systemd support
Marc Fournier [Wed, 19 Nov 2014 11:09:03 +0000 (12:09 +0100)]
collectd(1): mention upstart & systemd support

10 years agoamend comments in upstart config file + disable "console log"
Marc Fournier [Wed, 19 Nov 2014 10:14:18 +0000 (11:14 +0100)]
amend comments in upstart config file + disable "console log"

Hopefully avoid some confusion for RHEL6 users which have an old upstart
version.

10 years agoadd example systemd service file
Marc Fournier [Wed, 19 Nov 2014 10:12:55 +0000 (11:12 +0100)]
add example systemd service file

Making use of systemd socket notification feature added in ff270e6d5.

10 years agoFix for "conflicting types for 'ldap_init'"
Nicholas Humfrey [Wed, 19 Nov 2014 09:23:34 +0000 (09:23 +0000)]
Fix for "conflicting types for 'ldap_init'"
Prefixed all the collectd specific functions and datatypes with the letter 'c'

10 years agoMerge pull request #811 from mfournier/systemd-upstart-build-issue
Marc Fournier [Tue, 18 Nov 2014 09:34:55 +0000 (10:34 +0100)]
Merge pull request #811 from mfournier/systemd-upstart-build-issue

prevent going through systemd/upstart code, except on Linux

10 years agoMerge pull request #810 from njh/mac_battery_read_return
Marc Fournier [Tue, 18 Nov 2014 09:17:23 +0000 (10:17 +0100)]
Merge pull request #810 from njh/mac_battery_read_return

Added return (0) to the Mac/IOKit variant of battery_read()

10 years agoprevent going through systemd/upstart code, except on Linux
Marc Fournier [Tue, 18 Nov 2014 08:21:42 +0000 (09:21 +0100)]
prevent going through systemd/upstart code, except on Linux

Fixes #809 (build issue on MacOSX)

NB: in case one day upstart is used on non-Linux platforms, this could
be relaxed to only skip systemd.

10 years agoAdded return(0) to the Mac/IOKit variant of battery_read()
Nicholas Humfrey [Mon, 17 Nov 2014 23:16:05 +0000 (23:16 +0000)]
Added return(0) to the Mac/IOKit variant of battery_read()

10 years agoMerge pull request #806 from vincentbernat/fix/libstatgrab2
Pierre-Yves Ritschard [Mon, 17 Nov 2014 12:57:40 +0000 (13:57 +0100)]
Merge pull request #806 from vincentbernat/fix/libstatgrab2

libstatgrab: only use one configure test for 0.90 API change

10 years agoMerge pull request #808 from landryb/openbsd_build_fixes_2
Pierre-Yves Ritschard [Mon, 17 Nov 2014 12:54:35 +0000 (13:54 +0100)]
Merge pull request #808 from landryb/openbsd_build_fixes_2

Openbsd build fixes 2

10 years agoDetect sys/vmmeter.h and include it if available.
Landry Breuil [Mon, 17 Nov 2014 10:39:11 +0000 (11:39 +0100)]
Detect sys/vmmeter.h and include it if available.

Needed on OpenBSD for struct vmtotal definition.

10 years agoFix wrong #ifdef introduced in df46cd01
Landry Breuil [Mon, 17 Nov 2014 10:38:40 +0000 (11:38 +0100)]
Fix wrong #ifdef introduced in df46cd01

10 years agolibstatgrab: only use one configure test for 0.90 API change
Vincent Bernat [Mon, 17 Nov 2014 09:35:16 +0000 (10:35 +0100)]
libstatgrab: only use one configure test for 0.90 API change

Previously, each API change was tested in configure.ac. Some of the
tests are relying on signature checks and would need to have -Werror
flag enabled to make them work. This is quite fragile.

Instead, we assume that if `sg_init()` requires an argument, we must use
the 0.90 API.

Fixes: #795

10 years agoRPM specfile: add support for smart & openldap plugins
Marc Fournier [Mon, 17 Nov 2014 09:14:57 +0000 (10:14 +0100)]
RPM specfile: add support for smart & openldap plugins

10 years agoadd credits for new plugins
Marc Fournier [Mon, 17 Nov 2014 08:47:33 +0000 (09:47 +0100)]
add credits for new plugins