- conntrack
Number of nf_conntrack entries.
+ - couchdb
+ Parse statistics from CouchDB JSON documents.
+
- cpu
CPU utilization: Time spent in the system, user, nice, idle, and related
states.
- filecount
Count the number of files in directories.
+ - fscache
+ Linux file-system based caching framework statistics.
+
- gmond
Receive multicast traffic from Ganglia instances.
Motherboard sensors: temperature, fanspeed and voltage information,
using mbmon(1).
+ - memcachec
+ Query and parse data from a memcache daemon (memcached).
+
- memcached
Statistics of the memcached distributed caching system.
<http://www.danga.com/memcached/>
- swap
Pages swapped out onto harddisk or whatever is called `swap' by the OS..
+ - table
+ Parse table-like structured files.
+
- tail
Follows (tails) logfiles, parses them by lines and submits matched
values.
- thermal
Linux ACPI thermal zone information.
+ - uptime
+ System uptime statistics.
+
- users
Users currently logged in.
For the `notify_email' plugin.
<http://www.stafford.uklinux.net/libesmtp/>
+ * libganglia (optional)
+ Used by the `gmond' plugin to process data received from Ganglia.
+
+ * libgcrypt (optional)
+ Used by the `network' plugin for encryption and authentication.
+
* libhal (optional)
If present, the uuid plugin will check for UUID from HAL.
<http://hal.freedesktop.org/>
used by the Java plugin to execute Java bytecode. See “Configuring with
libjvm” below.
+ * libmemcached (optional)
+ Used by the `memcachec' plugin to connect to a memcache daemon.
+
* libmysqlclient (optional)
Unsurprisingly used by the `mysql' plugin.
<http://dev.mysql.com/>
* libxmms (optional)
<http://www.xmms.org/>
+ * libyajl (optional)
+ Parse JSON data. This is needed for the `couchdb' plugin.
+ <http://www.lloydforge.org/projects/yajl/>
Configuring / Compiling / Installing
------------------------------------
will be enabled). To enable a plugin, install missing dependencies (see
section `Prerequisites' above) and rerun `configure'. If you specify the
`--enable-<plugin>' configure option, the script will fail if the depen-
- dencies for the specified plugin are not met. If you specify the
- `--disable-<plugin>' configure option, the plugin will not be built. Both
- options are meant for package maintainers and should not be used in everyday
- situations.
+ dencies for the specified plugin are not met. In that case you can force the
+ plugin to be built using the `--enable-<plugin>=force' configure option.
+ This will most likely fail though unless you're working in a very unusual
+ setup and you really know what you're doing. If you specify the
+ `--disable-<plugin>' configure option, the plugin will not be built. If you
+ specify the `--enable-all-plugins' or `--disable-all-plugins' configure
+ options, all plugins will be enabled or disabled respectively by default.
+ Explicitly enabling or disabling a plugin overwrites the default for the
+ specified plugin. These options are meant for package maintainers and should
+ not be used in everyday situations.
By default, collectd will be installed into `/opt/collectd'. You can adjust
this setting by specifying the `--prefix' configure option - see INSTALL for
with_java_vmtype="client"
with_java_cflags=""
with_java_libs=""
+ JAVAC="$JAVAC"
AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])],
[
if test "x$withval" = "xno"
else
AC_MSG_RESULT([not found])
fi
+
+ if test "x$JAVAC" = "x"
+ then
+ AC_MSG_CHECKING([for javac])
+ TMPDIR=`find -L "$with_java_home" -name javac | head -n 1`
+ if test "x$TMPDIR" != "x"
+ then
+ JAVAC="$TMPDIR"
+ AC_MSG_RESULT([$JAVAC])
+ else
+ AC_MSG_RESULT([not found])
+ fi
+ fi
else if test "x$with_java_home" != "x"
then
AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home])
then
AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS])
fi
+ if test "x$JAVAC" = "x"
+ then
+ with_javac_path="$PATH"
+ if test "x$with_java_home" != "x"
+ then
+ with_javac_path="$with_java_home:with_javac_path"
+ if test -d "$with_java_home/bin"
+ then
+ with_javac_path="$with_java_home/bin:with_javac_path"
+ fi
+ fi
+
+ AC_PATH_PROG(JAVAC, javac, [], "$with_javac_path")
+ fi
+ if test "x$JAVAC" = "x"
+ then
+ with_java="no (javac not found)"
+ fi
SAVE_CPPFLAGS="$CPPFLAGS"
SAVE_CFLAGS="$CFLAGS"
AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
# }}}
+# --with-libyajl {{{
+with_libyajl_cppflags=""
+with_libyajl_ldflags=""
+AC_ARG_WITH(libyajl, [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ with_libyajl_cppflags="-I$withval/include"
+ with_libyajl_ldflags="-L$withval/lib"
+ with_libyajl="yes"
+ else
+ with_libyajl="$withval"
+ fi
+],
+[
+ with_libyajl="yes"
+])
+if test "x$with_libyajl" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
+
+ AC_CHECK_HEADERS(yajl/yajl_parse.h, [with_libyajl="yes"], [with_libyajl="no (yajl/yajl_parse.h not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+if test "x$with_libyajl" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
+ LDFLAGS="$LDFLAGS $with_libyajl_ldflags"
+
+ AC_CHECK_LIB(yajl, yajl_alloc, [with_libyajl="yes"], [with_libyajl="no (Symbol 'yajl_alloc' not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+if test "x$with_libyajl" = "xyes"
+then
+ BUILD_WITH_LIBYAJL_CPPFLAGS="$with_libyajl_cppflags"
+ BUILD_WITH_LIBYAJL_LDFLAGS="$with_libyajl_ldflags"
+ BUILD_WITH_LIBYAJL_LIBS="-lyajl"
+ AC_SUBST(BUILD_WITH_LIBYAJL_CPPFLAGS)
+ AC_SUBST(BUILD_WITH_LIBYAJL_LDFLAGS)
+ AC_SUBST(BUILD_WITH_LIBYAJL_LIBS)
+ AC_DEFINE(HAVE_LIBYAJL, 1, [Define if libyajl is present and usable.])
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes")
+# }}}
+
# pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
with_libxml2="no (pkg-config isn't available)"
with_libxml2_cflags=""
[AC_PLUGIN],
[
enable_plugin="no"
+ force="no"
AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
[
if test "x$enableval" = "xyes"
then
enable_plugin="yes"
- else
- enable_plugin="no"
- fi
- ],
- [
- if test "x$2" = "xyes"
+ else if test "x$enableval" = "xforce"
then
enable_plugin="yes"
+ force="yes"
else
enable_plugin="no"
- fi
+ fi; fi
+ ],
+ [
+ if test "x$enable_all_plugins" = "xauto"
+ then
+ if test "x$2" = "xyes"
+ then
+ enable_plugin="yes"
+ else
+ enable_plugin="no"
+ fi
+ else
+ enable_plugin="$enable_all_plugins"
+ fi
])
if test "x$enable_plugin" = "xyes"
then
- if test "x$2" = "xyes"
+ if test "x$2" = "xyes" || test "x$force" = "xyes"
then
AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
+ if test "x$2" != "xyes"
+ then
+ dependency_warning="yes"
+ fi
else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
dependency_error="yes"
enable_plugin="no (dependency error)"
AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
+ dependency_warning="no"
dependency_error="no"
+
plugin_ascent="no"
plugin_battery="no"
plugin_bind="no"
plugin_conntrack="no"
+plugin_couchdb="no"
plugin_cpu="no"
plugin_cpufreq="no"
plugin_df="no"
plugin_ipmi="yes"
fi
+if test "x$with_libcurl" = "xyes" && test "x$with_libyajl" = "xyes"
+then
+ plugin_couchdb="yes"
+fi
+
if test "x$have_processor_info" = "xyes"
then
plugin_cpu="yes"
m4_divert_once([HELP_ENABLE], [
collectd plugins:])
+ AC_ARG_ENABLE([all-plugins],
+ AC_HELP_STRING([--enable-all-plugins],
+ [enable all plugins (auto by def)]),
+ [
+ if test "x$enableval" = "xyes"
+ then
+ enable_all_plugins="yes"
+ else if test "x$enableval" = "xauto"
+ then
+ enable_all_plugins="auto"
+ else
+ enable_all_plugins="no"
+ fi; fi
+ ],
+ [enable_all_plugins="auto"])
+
+ m4_divert_once([HELP_ENABLE], [])
+
AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
+AC_PLUGIN([couchdb], [$plugin_couchdb], [CouchDB statistics])
AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
AC_PLUGIN([csv], [yes], [CSV output plugin])
AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
AC_PLUGIN([exec], [yes], [Execution of external programs])
AC_PLUGIN([filecount], [yes], [Count files in directories])
+ AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin])
AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
AC_PLUGIN([network], [yes], [Network communication plugin])
AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
- AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h)
- AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libiptc/Makefile src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile)
+ AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libiptc/Makefile src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile)
if test "x$with_librrd" = "xyes" \
&& test "x$librrd_threadsafe" != "xyes"
battery . . . . . . . $enable_battery
bind . . . . . . . . $enable_bind
conntrack . . . . . . $enable_conntrack
+ couchdb . . . . . . . $enable_couchdb
cpu . . . . . . . . . $enable_cpu
cpufreq . . . . . . . $enable_cpufreq
csv . . . . . . . . . $enable_csv
entropy . . . . . . . $enable_entropy
exec . . . . . . . . $enable_exec
filecount . . . . . . $enable_filecount
+ fscache . . . . . . . $enable_fscache
gmond . . . . . . . . $enable_gmond
hddtemp . . . . . . . $enable_hddtemp
interface . . . . . . $enable_interface
netlink . . . . . . . $enable_netlink
network . . . . . . . $enable_network
nfs . . . . . . . . . $enable_nfs
- fscache . . . . . . . $enable_fscache
nginx . . . . . . . . $enable_nginx
notify_desktop . . . $enable_notify_desktop
notify_email . . . . $enable_notify_email
EOF
if test "x$dependency_error" = "xyes"; then
- AC_MSG_ERROR("Some plugins are missing dependencies - see above summary for details")
+ AC_MSG_ERROR("Some plugins are missing dependencies - see the summary above for details")
+ fi
+
+ if test "x$dependency_warning" = "xyes"; then
+ AC_MSG_WARN("Some plugins seem to have missing dependencies but have been enabled forcibly - see the summary above for details")
fi
# vim: set fdm=marker :
#@BUILD_PLUGIN_BATTERY_TRUE@LoadPlugin battery
#@BUILD_PLUGIN_BIND_TRUE@LoadPlugin bind
#@BUILD_PLUGIN_CONNTRACK_TRUE@LoadPlugin conntrack
+#@BUILD_PLUGIN_COUCHDB_TRUE@LoadPlugin couchdb
@BUILD_PLUGIN_CPU_TRUE@@BUILD_PLUGIN_CPU_TRUE@LoadPlugin cpu
#@BUILD_PLUGIN_CPUFREQ_TRUE@LoadPlugin cpufreq
@LOAD_PLUGIN_CSV@LoadPlugin csv
#@BUILD_PLUGIN_ENTROPY_TRUE@LoadPlugin entropy
#@BUILD_PLUGIN_EXEC_TRUE@LoadPlugin exec
#@BUILD_PLUGIN_FILECOUNT_TRUE@LoadPlugin filecount
+ #@BUILD_PLUGIN_FSCACHE_TRUE@LoadPlugin fscache
#@BUILD_PLUGIN_GMOND_TRUE@LoadPlugin gmond
#@BUILD_PLUGIN_HDDTEMP_TRUE@LoadPlugin hddtemp
@BUILD_PLUGIN_INTERFACE_TRUE@@BUILD_PLUGIN_INTERFACE_TRUE@LoadPlugin interface
#@BUILD_PLUGIN_LIBVIRT_TRUE@LoadPlugin libvirt
@BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load
#@BUILD_PLUGIN_MBMON_TRUE@LoadPlugin mbmon
+ #@BUILD_PLUGIN_MEMCACHEC_TRUE@LoadPlugin memcachec
#@BUILD_PLUGIN_MEMCACHED_TRUE@LoadPlugin memcached
@BUILD_PLUGIN_MEMORY_TRUE@@BUILD_PLUGIN_MEMORY_TRUE@LoadPlugin memory
#@BUILD_PLUGIN_MULTIMETER_TRUE@LoadPlugin multimeter
#@BUILD_PLUGIN_SERIAL_TRUE@LoadPlugin serial
#@BUILD_PLUGIN_SNMP_TRUE@LoadPlugin snmp
#@BUILD_PLUGIN_SWAP_TRUE@LoadPlugin swap
+ #@BUILD_PLUGIN_TABLE_TRUE@LoadPlugin table
#@BUILD_PLUGIN_TAIL_TRUE@LoadPlugin tail
#@BUILD_PLUGIN_TAPE_TRUE@LoadPlugin tape
#@BUILD_PLUGIN_TCPCONNS_TRUE@LoadPlugin tcpconns
#@BUILD_PLUGIN_TEAMSPEAK2_TRUE@LoadPlugin teamspeak2
+ #@BUILD_PLUGIN_TED_TRUE@LoadPlugin ted
#@BUILD_PLUGIN_THERMAL_TRUE@LoadPlugin thermal
#@BUILD_PLUGIN_UNIXSOCK_TRUE@LoadPlugin unixsock
#@BUILD_PLUGIN_UPTIME_TRUE@LoadPlugin uptime
# </View>
#</Plugin>
+#<Plugin couchdb>
+## See: http://wiki.apache.org/couchdb/Runtime_Statistics
+# <URL "http://localhost:5984/_stats">
+# Instance "httpd"
+# <Key "httpd/requests/count">
+# Type "http_requests"
+# </Key>
+#
+# <Key "httpd_request_methods/*/count">
+# Type "http_request_methods"
+# </Key>
+#
+# <Key "httpd_status_codes/*/count">
+# Type "http_response_codes"
+# </Key>
+# </URL>
+## Database status metrics:
+# <URL "http://localhost:5984/_all_dbs">
+# Instance "dbs"
+# <Key "*/doc_count">
+# Type "gauge"
+# </Key>
+# <Key "*/doc_del_count">
+# Type "counter"
+# </Key>
+# <Key "*/disk_size">
+# Type "bytes"
+# </Key>
+# </URL>
+#</Plugin>
+
#<Plugin csv>
# DataDir "@prefix@/var/lib/@PACKAGE_NAME@/csv"
# StoreRates false
# Port "411"
#</Plugin>
+ #<Plugin memcachec>
+ # <Page "plugin_instance">
+ # Server "localhost"
+ # Key "page_key"
+ # <Match>
+ # Regex "(\\d+) bytes sent"
+ # DSType CounterAdd
+ # Type "ipt_octets"
+ # Instance "type_instance"
+ # </Match>
+ # </Page>
+ #</Plugin>
+
#<Plugin memcached>
# Host "127.0.0.1"
# Port "11211"
# </Host>
#</Plugin>
+ #<Plugin "table">
+ # <Table "/proc/slabinfo">
+ # Instance "slabinfo"
+ # Separator " "
+ # <Result>
+ # Type gauge
+ # InstancePrefix "active_objs"
+ # InstancesFrom 0
+ # ValuesFrom 1
+ # </Result>
+ # <Result>
+ # Type gauge
+ # InstancePrefix "objperslab"
+ # InstancesFrom 0
+ # ValuesFrom 4
+ # </Result>
+ # </Table>
+ #</Plugin>
+
#<Plugin "tail">
# <File "/var/log/exim4/mainlog">
# Instance "exim"
# Server "8767"
#</Plugin>
+ #<Plugin ted>
+ # Device "/dev/ttyUSB0"
+ # Retries 0
+ #</Plugin>
+
#<Plugin thermal>
# ForceUseProcfs false
# Device "THRM"
=back
+=head2 Plugin C<couchdb>
+
+The couchdb plugin uses B<libcurl> (L<http://curl.haxx.se/>) and B<libyajl>
+(L<http://www.lloydforge.org/projects/yajl/>) to collect values from CouchDB
+documents (stored JSON notation).
+
+The following example will collect several values from the built-in `_stats'
+runtime statistics module (L<http://wiki.apache.org/couchdb/Runtime_Statistics>).
+
+ <Plugin couchdb>
+ <URL "http://localhost:5984/_stats">
+ Instance "httpd"
+ <Key "httpd/requests/count">
+ Type "http_requests"
+ </Key>
+
+ <Key "httpd_request_methods/*/count">
+ Type "http_request_methods"
+ </Key>
+
+ <Key "httpd_status_codes/*/count">
+ Type "http_response_codes"
+ </Key>
+ </URL>
+ </Plugin>
+
+The following example will collect the status values from each database:
+
+ <URL "http://localhost:5984/_all_dbs">
+ Instance "dbs"
+ <Key "*/doc_count">
+ Type "gauge"
+ </Key>
+ <Key "*/doc_del_count">
+ Type "counter"
+ </Key>
+ <Key "*/disk_size">
+ Type "bytes"
+ </Key>
+ </URL>
+
+In the B<Plugin> block, there may be one or more B<URL> blocks, each defining
+a URL to be fetched via HTTP (libcurl) and one or more B<Key> blocks.
+The B<Key> string argument must be in a path format, of which is used to collect
+a value from a JSON map object. If a B<Key> path element is that of a I<*> wildcard,
+the values for all keys will be collectd.
+
+The following options are valid within B<URL> blocks:
+
+=over 4
+
+=item B<Instance> I<Instance>
+
+Sets the plugin instance to I<Instance>.
+
+=item B<User> I<Name>
+
+Username to use if authorization is required to read the page.
+
+=item B<Password> I<Password>
+
+Password to use if authorization is required to read the page.
+
+=item B<VerifyPeer> B<true>|B<false>
+
+Enable or disable peer SSL certificate verification. See
+L<http://curl.haxx.se/docs/sslcerts.html> for details. Enabled by default.
+
+=item B<VerifyHost> B<true>|B<false>
+
+Enable or disable peer host name verification. If enabled, the plugin checks if
+the C<Common Name> or a C<Subject Alternate Name> field of the SSL certificate
+matches the host name provided by the B<URL> option. If this identity check
+fails, the connection is aborted. Obviously, only works when connecting to a
+SSL enabled server. Enabled by default.
+
+=item B<CACert> I<file>
+
+File that holds one or more SSL certificates. If you want to use HTTPS you will
+possibly need this option. What CA certificates come bundled with C<libcurl>
+and are checked by default depends on the distribution you use.
+
+=back
+
+The following options are valid within B<Key> blocks:
+
+=over 4
+
+=item B<Type> I<Type>
+
+Sets the type used to dispatch the values to the daemon. Detailed information
+about types and their configuration can be found in L<types.db(5)>. This
+option is mandatory.
+
+=item B<Instance> I<Instance>
+
+Type-instance to use. Defaults to the current map key or current string array element value.
+
+=back
+
=head2 Plugin C<cpufreq>
This plugin doesn't have any options. It reads
=back
+ =head2 Plugin C<memcachec>
+
+ The C<memcachec plugin> connects to a memcached server, queries one or more
+ given I<pages> and parses the returned data according to user specification.
+ The I<matches> used are the same as the matches used in the C<curl> and C<tail>
+ plugins.
+
+ In order to talk to the memcached server, this plugin uses the I<libmemcached>
+ library. Please note that there is another library with a very similar name,
+ libmemcache (notice the missing `d'), which is not applicable.
+
+ Synopsis of the configuration:
+
+ <Plugin "memcachec">
+ <Page "plugin_instance">
+ Server "localhost"
+ Key "page_key"
+ <Match>
+ Regex "(\\d+) bytes sent"
+ DSType CounterAdd
+ Type "ipt_octets"
+ Instance "type_instance"
+ </Match>
+ </Page>
+ </Plugin>
+
+ The configuration options are:
+
+ =over 4
+
+ =item E<lt>B<Page> I<Name>E<gt>
+
+ Each B<Page> block defines one I<page> to be queried from the memcached server.
+ The block requires one string argument which is used as I<plugin instance>.
+
+ =item B<Server> I<Address>
+
+ Sets the server address to connect to when querying the page. Must be inside a
+ B<Page> block.
+
+ =item B<Key> I<Key>
+
+ When connected to the memcached server, asks for the page I<Key>.
+
+ =item E<lt>B<Match>E<gt>
+
+ Match blocks define which strings to look for and how matches substrings are
+ interpreted. For a description of match blocks, please see L<"Plugin tail">.
+
+ =back
+
=head2 Plugin C<memcached>
The C<memcached plugin> connects to a memcached server and queries statistics