From: Pierre-Yves Ritschard Date: Sat, 15 Nov 2014 09:52:47 +0000 (+0100) Subject: Merge pull request #719 from mfournier/openldap-improvements-rebased X-Git-Tag: collectd-5.5.0~152 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=2421812ea47269c50920414a6e3c32448800120f;hp=-c Merge pull request #719 from mfournier/openldap-improvements-rebased Openldap plugin --- 2421812ea47269c50920414a6e3c32448800120f diff --combined README index 7aa83b07,90550afa..76d2e4f0 --- a/README +++ b/README @@@ -146,6 -146,9 +146,6 @@@ Feature Detailed CPU statistics of the “Logical Partitions” virtualization technique built into IBM's POWER processors. - - libvirt - CPU, memory, disk and network I/O statistics from virtual machines. - - lvm Size of “Logical Volumes” (LV) and “Volume Groups” (VG) of Linux' “Logical Volume Manager” (LVM). @@@ -229,6 -232,9 +229,9 @@@ Read onewire sensors using the owcapu library of the owfs project. Please read in collectd.conf(5) why this plugin is experimental. + - openldap + Read monitoring information from OpenLDAP's cn=Monitor subtree. + - openvpn RX and TX of each client in openvpn-status.log (status-version 2). @@@ -293,10 -299,6 +296,10 @@@ to have its measurements fed to collectd. This includes multimeters, sound level meters, thermometers, and much more. + - smart + Collect SMART statistics, notably load cycle count, temperature + and bad sectors. + - snmp Read values from SNMP (Simple Network Management Protocol) enabled network devices such as switches, routers, thermometers, rack monitoring @@@ -348,9 -350,6 +351,9 @@@ - varnish Various statistics from Varnish, an HTTP accelerator. + - virt + CPU, memory, disk and network I/O statistics from virtual machines. + - vmem Virtual memory statistics, e. g. the number of page-ins/-outs or the number of pagefaults. @@@ -654,6 -653,10 +657,10 @@@ Prerequisite libjvm” below. (and others) + * libldap (optional) + Used by the `openldap' plugin. + + * liblvm2 (optional) Used by the `lvm' plugin. @@@ -779,7 -782,7 +786,7 @@@ * libxml2 (optional) Parse XML data. This is needed for the `ascent', `bind', `curl_xml' and - `libvirt' plugins. + `virt' plugins. * libxmms (optional) diff --combined configure.ac index 13577c9f,38df1c0e..6ac2554c --- a/configure.ac +++ b/configure.ac @@@ -1,6 -1,6 +1,6 @@@ dnl Process this file with autoconf to produce a configure script. AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)]) -AC_CONFIG_SRCDIR(src/collectd.c) +AC_CONFIG_SRCDIR(src/) AC_CONFIG_HEADERS(src/config.h) AC_CONFIG_AUX_DIR([libltdl/config]) @@@ -527,7 -527,7 +527,7 @@@ AC_CHECK_HEADERS(linux/un.h, [], [] #endif ]) -AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h xfs/xqm.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h kvm.h wordexp.h) +AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h xfs/xqm.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h kvm.h wordexp.h locale.h) # For the dns plugin AC_CHECK_HEADERS(arpa/nameser.h) @@@ -602,7 -602,7 +602,7 @@@ AC_HEADER_TIM # Checks for library functions. # AC_PROG_GCC_TRADITIONAL -AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf setenv if_indextoname) +AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf setenv if_indextoname setlocale) AC_FUNC_STRERROR_R @@@ -809,9 -809,7 +809,9 @@@ if test "x$have_swapctl" = "xyes"; the # undef _LARGEFILE64_SOURCE #endif #include +#include #include +#include ]]], [[[ int num = swapctl(0, NULL); @@@ -831,9 -829,7 +831,9 @@@ # undef _LARGEFILE64_SOURCE #endif #include +#include #include +#include ]]], [[[ int num = swapctl(0, NULL, 0); @@@ -1315,7 -1311,7 +1315,7 @@@ AC_CHECK_MEMBERS([struct kinfo_proc.ki_ #include ]) -AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc], +AC_CHECK_MEMBERS([struct kinfo_proc.p_pid, struct kinfo_proc.p_vm_rssize], [ AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1, [Define if struct kinfo_proc exists in the OpenBSD variant.]) @@@ -1332,7 -1328,6 +1332,7 @@@ AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [], [#define _BSD_SOURCE +#define _DEFAULT_SOURCE #if HAVE_STDINT_H # include #endif @@@ -1354,7 -1349,6 +1354,7 @@@ ]) AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [], [#define _BSD_SOURCE +#define _DEFAULT_SOURCE #if HAVE_STDINT_H # include #endif @@@ -1695,10 -1689,6 +1695,10 @@@ the [with_libcurl="yes"], [with_libcurl="no (symbol 'curl_easy_init' not found)"], [$with_curl_libs]) + AC_CHECK_DECL(CURLOPT_USERNAME, + [have_curlopt_username="yes"], + [have_curlopt_username="no"], + [[#include ]]) fi fi if test "x$with_libcurl" = "xyes" @@@ -1707,11 -1697,6 +1707,11 @@@ the BUILD_WITH_LIBCURL_LIBS="$with_curl_libs" AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS) AC_SUBST(BUILD_WITH_LIBCURL_LIBS) + + if test "x$have_curlopt_username" = "xyes" + then + AC_DEFINE(HAVE_CURLOPT_USERNAME, 1, [Define if libcurl supports CURLOPT_USERNAME option.]) + fi fi AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes") # }}} @@@ -2247,6 -2232,64 +2247,64 @@@ AC_SUBST(JAVA_LIBS AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes") # }}} + # --with-libldap {{{ + AC_ARG_WITH(libldap, [AS_HELP_STRING([--with-libldap@<:@=PREFIX@:>@], [Path to libldap.])], + [ + if test "x$withval" = "xyes" + then + with_libldap="yes" + else if test "x$withval" = "xno" + then + with_libldap="no" + else + with_libldap="yes" + LIBLDAP_CPPFLAGS="$LIBLDAP_CPPFLAGS -I$withval/include" + LIBLDAP_LDFLAGS="$LIBLDAP_LDFLAGS -L$withval/lib" + fi; fi + ], + [with_libldap="yes"]) + + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + + CPPFLAGS="$CPPFLAGS $LIBLDAP_CPPFLAGS" + LDFLAGS="$LDFLAGS $LIBLDAP_LDFLAGS" + + if test "x$with_libldap" = "xyes" + then + if test "x$LIBLDAP_CPPFLAGS" != "x" + then + AC_MSG_NOTICE([libldap CPPFLAGS: $LIBLDAP_CPPFLAGS]) + fi + AC_CHECK_HEADERS(ldap.h, + [with_libldap="yes"], + [with_libldap="no ('ldap.h' not found)"]) + fi + if test "x$with_libldap" = "xyes" + then + if test "x$LIBLDAP_LDFLAGS" != "x" + then + AC_MSG_NOTICE([libldap LDFLAGS: $LIBLDAP_LDFLAGS]) + fi + AC_CHECK_LIB(ldap, ldap_initialize, + [with_libldap="yes"], + [with_libldap="no (symbol 'ldap_initialize' not found)"]) + + fi + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" + + if test "x$with_libldap" = "xyes" + then + BUILD_WITH_LIBLDAP_CPPFLAGS="$LIBLDAP_CPPFLAGS" + BUILD_WITH_LIBLDAP_LDFLAGS="$LIBLDAP_LDFLAGS" + AC_SUBST(BUILD_WITH_LIBLDAP_CPPFLAGS) + AC_SUBST(BUILD_WITH_LIBLDAP_LDFLAGS) + fi + AM_CONDITIONAL(BUILD_WITH_LIBLDAP, test "x$with_libldap" = "xyes") + # }}} + # --with-liblvm2app {{{ with_liblvm2app_cppflags="" with_liblvm2app_ldflags="" @@@ -4077,68 -4120,6 +4135,68 @@@ the LDFLAGS="$SAVE_LDFLAGS" fi +if test "x$with_libstatgrab" = "xyes" +then + SAVE_CFLAGS="$CFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + + CFLAGS="$CFLAGS $with_libstatgrab_cflags" + LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags" + + AC_CACHE_CHECK([if sg_init() requires an argument], + [c_cv_have_libstatgrab_init_arg], + AC_LINK_IFELSE([AC_LANG_PROGRAM( +[[[ +#include +#include +]]], +[[[ + if (sg_init()) return 0; +]]] + )], + [c_cv_have_libstatgrab_init_arg="no"], + [c_cv_have_libstatgrab_init_arg="yes"] + ) + ) + + AC_CACHE_CHECK([if sg_get_user_stats() requires an argument], + [c_cv_have_libstatgrab_get_user_stats_arg], + AC_LINK_IFELSE([AC_LANG_PROGRAM( +[[[ +#include +#include +]]], +[[[ + if (sg_get_user_stats()) return 0; +]]] + )], + [c_cv_have_libstatgrab_get_user_stats_arg="no"], + [c_cv_have_libstatgrab_get_user_stats_arg="yes"] + ) + ) + + AC_CACHE_CHECK([if sg_disk_io_stats() uses size_t], + [c_cv_have_libstatgrab_get_disk_io_stats_sizet], + AC_LINK_IFELSE([AC_LANG_PROGRAM( +[[[ +#include +#include +]]], +[[[ + sg_disk_io_stats *(*ptr) (size_t *); + ptr = sg_get_disk_io_stats; + if (ptr != NULL) return 0; +]]] + )], + [c_cv_have_libstatgrab_get_disk_io_stats_sizet="yes"], + [c_cv_have_libstatgrab_get_disk_io_stats_sizet="no"] + ) + ) + + CFLAGS="$SAVE_CFLAGS" + LDFLAGS="$SAVE_LDFLAGS" +fi + AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes") if test "x$with_libstatgrab" = "xyes" then @@@ -4147,18 -4128,6 +4205,18 @@@ BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags" AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS) AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS) + if test "x$c_cv_have_libstatgrab_init_arg" = "xyes" + then + AC_DEFINE(HAVE_LIBSTATGRAB_INIT_ARG, 1, [Define to 1 if sg_init does require an argument]) + fi + if test "x$c_cv_have_libstatgrab_get_user_stats_arg" = "xyes" + then + AC_DEFINE(HAVE_LIBSTATGRAB_GET_USER_STATS_ARG, 1, [Define to 1 if sg_get_user_stats does require an argument]) + fi + if test "x$c_cv_have_libstatgrab_get_disk_io_stats_sizet" = "xyes" + then + AC_DEFINE(HAVE_LIBSTATGRAB_GET_DISK_IO_STATS_SIZET, 1, [Define to 1 if sg_get_disk_io_stats does require pointer to size_t as an argument]) + fi fi # }}} @@@ -4897,62 -4866,6 +4955,62 @@@ the fi # }}} +# --with-libatasmart {{{ +with_libatasmart_cppflags="" +with_libatasmart_ldflags="" +AC_ARG_WITH(libatasmart, [AS_HELP_STRING([--with-libatasmart@<:@=PREFIX@:>@], [Path to libatasmart.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + with_libatasmart_cppflags="-I$withval/include" + with_libatasmart_ldflags="-L$withval/lib" + with_libatasmart="yes" + else + with_libatasmart="$withval" + fi +], +[ + if test "x$ac_system" = "xLinux" + then + with_libatasmart="yes" + else + with_libatasmart="no (Linux only library)" + fi +]) +if test "x$with_libatasmart" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_libatasmart_cppflags" + + AC_CHECK_HEADERS(atasmart.h, [with_libatasmart="yes"], [with_libatasmart="no (atasmart.h not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" +fi +if test "x$with_libatasmart" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + CPPFLAGS="$CPPFLAGS $with_libatasmart_cppflags" + LDFLAGS="$LDFLAGS $with_libatasmart_ldflags" + + AC_CHECK_LIB(atasmart, sk_disk_open, [with_libatasmart="yes"], [with_libatasmart="no (Symbol 'sk_disk_open' not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" +fi +if test "x$with_libatasmart" = "xyes" +then + BUILD_WITH_LIBATASMART_CPPFLAGS="$with_libatasmart_cppflags" + BUILD_WITH_LIBATASMART_LDFLAGS="$with_libatasmart_ldflags" + BUILD_WITH_LIBATASMART_LIBS="-latasmart" + AC_SUBST(BUILD_WITH_LIBATASMART_CPPFLAGS) + AC_SUBST(BUILD_WITH_LIBATASMART_LDFLAGS) + AC_SUBST(BUILD_WITH_LIBATASMART_LIBS) + AC_DEFINE(HAVE_LIBATASMART, 1, [Define if libatasmart is present and usable.]) +fi +AM_CONDITIONAL(BUILD_WITH_LIBATASMART, test "x$with_libatasmart" = "xyes") +# }}} + PKG_CHECK_MODULES([LIBNOTIFY], [libnotify], [with_libnotify="yes"], [if test "x$LIBNOTIFY_PKG_ERRORS" = "x"; then @@@ -5108,6 -5021,7 +5166,6 @@@ plugin_interface="no plugin_ipmi="no" plugin_ipvs="no" plugin_irq="no" -plugin_libvirt="no" plugin_load="no" plugin_log_logstash="no" plugin_memory="no" @@@ -5123,9 -5037,8 +5181,9 @@@ plugin_tape="no plugin_tcpconns="no" plugin_ted="no" plugin_thermal="no" -plugin_users="no" plugin_uptime="no" +plugin_users="no" +plugin_virt="no" plugin_vmem="no" plugin_vserver="no" plugin_wireless="no" @@@ -5350,6 -5263,11 +5408,6 @@@ the plugin_interface="yes" fi -if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes" -then - plugin_libvirt="yes" -fi - if test "x$have_getloadavg" = "xyes" then plugin_load="yes" @@@ -5390,11 -5308,6 +5448,11 @@@ the plugin_processes="yes" fi +if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_openbsd" = "xyes" +then + plugin_processes="yes" +fi + if test "x$with_kvm_getswapinfo" = "xyes" then plugin_swap="yes" @@@ -5419,12 -5332,6 +5477,12 @@@ the plugin_users="yes" fi +if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes" +then + plugin_virt="yes" +fi + + m4_divert_once([HELP_ENABLE], [ collectd plugins:]) @@@ -5483,6 -5390,7 +5541,6 @@@ AC_PLUGIN([iptables], [$with_libiptc AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics]) AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics]) AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine]) -AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics]) AC_PLUGIN([load], [$plugin_load], [System load]) AC_PLUGIN([logfile], [yes], [File logging plugin]) AC_PLUGIN([log_logstash], [$plugin_log_logstash], [Logstash json_event compatible logging]) @@@ -5515,6 -5423,7 +5573,7 @@@ AC_PLUGIN([numa], [$plugin_numa] AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics]) AC_PLUGIN([olsrd], [yes], [olsrd statistics]) AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics]) + AC_PLUGIN([openldap], [$with_libldap], [OpenLDAP statistics]) AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics]) AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin]) AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter]) @@@ -5534,7 -5443,6 +5593,7 @@@ AC_PLUGIN([rrdtool], [$with_librrd] AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics]) AC_PLUGIN([serial], [$plugin_serial], [serial port traffic]) AC_PLUGIN([sigrok], [$with_libsigrok], [sigrok acquisition sources]) +AC_PLUGIN([smart], [$with_libatasmart], [SMART statistics]) AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin]) AC_PLUGIN([statsd], [yes], [StatsD plugin]) AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics]) @@@ -5559,7 -5467,6 +5618,7 @@@ AC_PLUGIN([uptime], [$plugin_uptim AC_PLUGIN([users], [$plugin_users], [User statistics]) AC_PLUGIN([uuid], [yes], [UUID as hostname plugin]) AC_PLUGIN([varnish], [$with_libvarnish], [Varnish cache statistics]) +AC_PLUGIN([virt], [$plugin_virt], [Virtual machine statistics]) AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics]) AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics]) AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics]) @@@ -5722,7 -5629,7 +5781,7 @@@ AC_SUBST(LCC_VERSION_STRING AC_CONFIG_FILES(src/libcollectdclient/collectd/lcc_features.h) -AC_CONFIG_FILES([Makefile src/Makefile src/collectd.conf src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile src/daemon/Makefile src/collectd.conf src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile]) AC_OUTPUT if test "x$with_librrd" = "xyes" \ @@@ -5755,7 -5662,6 +5814,7 @@@ Configuration Libraries: intel mic . . . . . . $with_mic libaquaero5 . . . . . $with_libaquaero5 + libatasmart . . . . . $with_libatasmart libcurl . . . . . . . $with_libcurl libdbi . . . . . . . $with_libdbi libcredis . . . . . . $with_libcredis @@@ -5768,6 -5674,7 +5827,7 @@@ libjvm . . . . . . . $with_java libkstat . . . . . . $with_kstat libkvm . . . . . . . $with_libkvm + libldap . . . . . . . $with_libldap liblvm2app . . . . . $with_liblvm2app libmemcached . . . . $with_libmemcached libmnl . . . . . . . $with_libmnl @@@ -5850,6 -5757,7 +5910,6 @@@ ipvs . . . . . . . . $enable_ipvs irq . . . . . . . . . $enable_irq java . . . . . . . . $enable_java - libvirt . . . . . . . $enable_libvirt load . . . . . . . . $enable_load logfile . . . . . . . $enable_logfile lpar . . . . . . . . $enable_lpar @@@ -5882,6 -5790,7 +5942,7 @@@ nut . . . . . . . . . $enable_nut olsrd . . . . . . . . $enable_olsrd onewire . . . . . . . $enable_onewire + openldap . . . . . . $enable_openldap openvpn . . . . . . . $enable_openvpn oracle . . . . . . . $enable_oracle perl . . . . . . . . $enable_perl @@@ -5900,7 -5809,6 +5961,7 @@@ sensors . . . . . . . $enable_sensors serial . . . . . . . $enable_serial sigrok . . . . . . . $enable_sigrok + smart . . . . . . . . $enable_smart snmp . . . . . . . . $enable_snmp statsd . . . . . . . $enable_statsd swap . . . . . . . . $enable_swap @@@ -5925,7 -5833,6 +5986,7 @@@ users . . . . . . . . $enable_users uuid . . . . . . . . $enable_uuid varnish . . . . . . . $enable_varnish + virt . . . . . . . . $enable_virt vmem . . . . . . . . $enable_vmem vserver . . . . . . . $enable_vserver wireless . . . . . . $enable_wireless diff --combined src/Makefile.am index 74c5007a,315d1957..04c77a3b --- a/src/Makefile.am +++ b/src/Makefile.am @@@ -2,16 -2,12 +2,16 @@@ SUBDIRS = libcollectdclien if BUILD_WITH_OWN_LIBOCONFIG SUBDIRS += liboconfig endif +SUBDIRS += daemon + +PLUGIN_LDFLAGS = -module -avoid-version -export-symbols-regex '\' if COMPILER_IS_GCC AM_CFLAGS = -Wall -Werror endif -AM_CPPFLAGS = -DPREFIX='"${prefix}"' +AM_CPPFLAGS = -I$(srcdir)/daemon +AM_CPPFLAGS += -DPREFIX='"${prefix}"' AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"' AM_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"' @@@ -23,14 -19,83 +23,14 @@@ AM_CPPFLAGS += -DPKGDATADIR='"${pkgdata AUTOMAKE_OPTIONS = subdir-objects -sbin_PROGRAMS = collectd collectdmon +sbin_PROGRAMS = collectdmon bin_PROGRAMS = collectd-nagios collectdctl collectd-tg -collectd_SOURCES = collectd.c collectd.h \ - common.c common.h \ - configfile.c configfile.h \ - filter_chain.c filter_chain.h \ - meta_data.c meta_data.h \ - plugin.c plugin.h \ - utils_avltree.c utils_avltree.h \ - utils_cache.c utils_cache.h \ - utils_complain.c utils_complain.h \ - utils_heap.c utils_heap.h \ - utils_ignorelist.c utils_ignorelist.h \ - utils_llist.c utils_llist.h \ - utils_parse_option.c utils_parse_option.h \ - utils_random.c utils_random.h \ - utils_tail_match.c utils_tail_match.h \ - utils_match.c utils_match.h \ - utils_subst.c utils_subst.h \ - utils_tail.c utils_tail.h \ - utils_time.c utils_time.h \ - types_list.c types_list.h \ - utils_threshold.c utils_threshold.h - - -collectd_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) -collectd_CFLAGS = $(AM_CFLAGS) -collectd_LDFLAGS = -export-dynamic -collectd_LDADD = -lm -collectd_DEPENDENCIES = - -# Link to these libraries.. -if BUILD_WITH_LIBRT -collectd_LDADD += -lrt -endif -if BUILD_WITH_LIBPOSIX4 -collectd_LDADD += -lposix4 -endif -if BUILD_WITH_LIBSOCKET -collectd_LDADD += -lsocket -endif -if BUILD_WITH_LIBRESOLV -collectd_LDADD += -lresolv -endif -if BUILD_WITH_LIBPTHREAD -collectd_LDADD += -lpthread -endif -if BUILD_WITH_LIBKSTAT -collectd_LDADD += -lkstat -endif -if BUILD_WITH_LIBDEVINFO -collectd_LDADD += -ldevinfo -endif -if BUILD_AIX -collectd_LDFLAGS += -Wl,-bexpall,-brtllib -endif - -# The daemon needs to call sg_init, so we need to link it against libstatgrab, -# too. -octo -if BUILD_WITH_LIBSTATGRAB -collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS) -collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS) -endif - -if BUILD_WITH_OWN_LIBOCONFIG -collectd_LDADD += $(LIBLTDL) liboconfig/liboconfig.la -collectd_DEPENDENCIES += liboconfig/liboconfig.la -else -collectd_LDADD += -loconfig -endif - collectdmon_SOURCES = collectdmon.c collectdmon_CPPFLAGS = $(AM_CPPFLAGS) collectd_nagios_SOURCES = collectd-nagios.c -collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd +collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd collectd_nagios_LDADD = if BUILD_WITH_LIBSOCKET collectd_nagios_LDADD += -lsocket @@@ -44,7 -109,7 +44,7 @@@ collectd_nagios_DEPENDENCIES = libcolle collectdctl_SOURCES = collectdctl.c -collectdctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd +collectdctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd collectdctl_LDADD = if BUILD_WITH_LIBSOCKET collectdctl_LDADD += -lsocket @@@ -56,8 -121,8 +56,8 @@@ collectdctl_LDADD += libcollectdclient/ collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la collectd_tg_SOURCES = collectd-tg.c \ - utils_heap.c utils_heap.h -collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd + daemon/utils_heap.c daemon/utils_heap.h +collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd collectd_tg_LDADD = if BUILD_WITH_LIBSOCKET collectd_tg_LDADD += -lsocket @@@ -68,9 -133,6 +68,9 @@@ endi if BUILD_AIX collectd_tg_LDADD += -lm endif +if BUILD_WITH_LIBPTHREAD +collectd_tg_LDADD += -lpthread +endif collectd_tg_LDADD += libcollectdclient/libcollectdclient.la collectd_tg_DEPENDENCIES = libcollectdclient/libcollectdclient.la @@@ -84,8 -146,10 +84,8 @@@ if BUILD_PLUGIN_AGGREGATIO pkglib_LTLIBRARIES += aggregation.la aggregation_la_SOURCES = aggregation.c \ utils_vl_lookup.c utils_vl_lookup.h -aggregation_la_LDFLAGS = -module -avoid-version -aggregation_la_LIBADD = -collectd_LDADD += "-dlopen" aggregation.la -collectd_DEPENDENCIES += aggregation.la +aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS) +aggregation_la_LIBADD = -lm endif if BUILD_PLUGIN_AMQP @@@ -94,112 -158,134 +94,112 @@@ amqp_la_SOURCES = amqp.c utils_cmd_putval.c utils_cmd_putval.h \ utils_format_graphite.c utils_format_graphite.h \ utils_format_json.c utils_format_json.h -amqp_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBRABBITMQ_LDFLAGS) +amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS) amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS) amqp_la_LIBADD = $(BUILD_WITH_LIBRABBITMQ_LIBS) -collectd_LDADD += "-dlopen" amqp.la -collectd_DEPENDENCIES += amqp.la endif if BUILD_PLUGIN_APACHE pkglib_LTLIBRARIES += apache.la apache_la_SOURCES = apache.c -apache_la_LDFLAGS = -module -avoid-version +apache_la_LDFLAGS = $(PLUGIN_LDFLAGS) apache_la_CFLAGS = $(AM_CFLAGS) apache_la_LIBADD = -collectd_LDADD += "-dlopen" apache.la if BUILD_WITH_LIBCURL apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS) apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS) endif -collectd_DEPENDENCIES += apache.la endif if BUILD_PLUGIN_APCUPS pkglib_LTLIBRARIES += apcups.la apcups_la_SOURCES = apcups.c -apcups_la_LDFLAGS = -module -avoid-version +apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS) apcups_la_LIBADD = if BUILD_WITH_LIBSOCKET apcups_la_LIBADD += -lsocket endif -collectd_LDADD += "-dlopen" apcups.la -collectd_DEPENDENCIES += apcups.la endif if BUILD_PLUGIN_APPLE_SENSORS pkglib_LTLIBRARIES += apple_sensors.la apple_sensors_la_SOURCES = apple_sensors.c -apple_sensors_la_LDFLAGS = -module -avoid-version +apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) apple_sensors_la_LDFLAGS += -framework IOKit -collectd_LDADD += "-dlopen" apple_sensors.la -collectd_DEPENDENCIES += apple_sensors.la endif if BUILD_PLUGIN_AQUAERO pkglib_LTLIBRARIES += aquaero.la aquaero_la_SOURCES = aquaero.c -aquaero_la_LDFLAGS = -module -avoid-version +aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS) aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS) aquaero_la_LIBADD = $(BUILD_WITH_LIBAQUAERO5_LDFLAGS) -laquaero5 -collectd_LDADD += "-dlopen" aquaero.la -collectd_DEPENDENCIES += aquaero.la endif if BUILD_PLUGIN_ASCENT pkglib_LTLIBRARIES += ascent.la ascent_la_SOURCES = ascent.c -ascent_la_LDFLAGS = -module -avoid-version +ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS) ascent_la_CFLAGS = $(AM_CFLAGS) \ $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS) ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS) -collectd_LDADD += "-dlopen" ascent.la -collectd_DEPENDENCIES += ascent.la endif if BUILD_PLUGIN_BAROMETER pkglib_LTLIBRARIES += barometer.la barometer_la_SOURCES = barometer.c -barometer_la_LDFLAGS = -module -avoid-version +barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS) barometer_la_LIBADD = -lm -collectd_LDADD += "-dlopen" barometer.la -collectd_DEPENDENCIES += barometer.la endif if BUILD_PLUGIN_BATTERY pkglib_LTLIBRARIES += battery.la battery_la_SOURCES = battery.c -battery_la_LDFLAGS = -module -avoid-version +battery_la_LDFLAGS = $(PLUGIN_LDFLAGS) battery_la_LIBADD = if BUILD_WITH_LIBIOKIT battery_la_LDFLAGS += -framework IOKit endif -collectd_LDADD += "-dlopen" battery.la -collectd_DEPENDENCIES += battery.la endif if BUILD_PLUGIN_BIND pkglib_LTLIBRARIES += bind.la bind_la_SOURCES = bind.c -bind_la_LDFLAGS = -module -avoid-version +bind_la_LDFLAGS = $(PLUGIN_LDFLAGS) bind_la_CFLAGS = $(AM_CFLAGS) \ - $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS) + $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS) bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS) -collectd_LDADD += "-dlopen" bind.la -collectd_DEPENDENCIES += bind.la endif if BUILD_PLUGIN_CGROUPS pkglib_LTLIBRARIES += cgroups.la -cgroups_la_SOURCES = cgroups.c utils_mount.c utils_mount.h -cgroups_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" cgroups.la -collectd_DEPENDENCIES += cgroups.la +cgroups_la_SOURCES = cgroups.c \ + utils_ignorelist.c utils_ignorelist.h \ + utils_mount.c utils_mount.h +cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_CONNTRACK pkglib_LTLIBRARIES += conntrack.la conntrack_la_SOURCES = conntrack.c -conntrack_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" conntrack.la -collectd_DEPENDENCIES += conntrack.la +conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_CONTEXTSWITCH pkglib_LTLIBRARIES += contextswitch.la contextswitch_la_SOURCES = contextswitch.c -contextswitch_la_LDFLAGS = -module -avoid-version +contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS) contextswitch_la_LIBADD = if BUILD_WITH_PERFSTAT contextswitch_la_LIBADD += -lperfstat endif -collectd_LDADD += "-dlopen" contextswitch.la -collectd_DEPENDENCIES += contextswitch.la endif if BUILD_PLUGIN_CPU pkglib_LTLIBRARIES += cpu.la cpu_la_SOURCES = cpu.c cpu_la_CFLAGS = $(AM_CFLAGS) -cpu_la_LDFLAGS = -module -avoid-version +cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS) cpu_la_LIBADD = if BUILD_WITH_LIBKSTAT cpu_la_LIBADD += -lkstat @@@ -214,52 -300,64 +214,52 @@@ endi if BUILD_WITH_PERFSTAT cpu_la_LIBADD += -lperfstat endif -collectd_LDADD += "-dlopen" cpu.la -collectd_DEPENDENCIES += cpu.la endif if BUILD_PLUGIN_CPUFREQ pkglib_LTLIBRARIES += cpufreq.la cpufreq_la_SOURCES = cpufreq.c -cpufreq_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" cpufreq.la -collectd_DEPENDENCIES += cpufreq.la +cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_CSV pkglib_LTLIBRARIES += csv.la csv_la_SOURCES = csv.c -csv_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" csv.la -collectd_DEPENDENCIES += csv.la +csv_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_CURL pkglib_LTLIBRARIES += curl.la curl_la_SOURCES = curl.c -curl_la_LDFLAGS = -module -avoid-version +curl_la_LDFLAGS = $(PLUGIN_LDFLAGS) curl_la_CFLAGS = $(AM_CFLAGS) curl_la_LIBADD = -collectd_LDADD += "-dlopen" curl.la if BUILD_WITH_LIBCURL curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS) curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS) endif -collectd_DEPENDENCIES += curl.la endif if BUILD_PLUGIN_CURL_JSON pkglib_LTLIBRARIES += curl_json.la curl_json_la_SOURCES = curl_json.c curl_json_la_CFLAGS = $(AM_CFLAGS) -curl_json_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBYAJL_LDFLAGS) -curl_json_la_CPPFLAGS = $(BUILD_WITH_LIBYAJL_CPPFLAGS) +curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS) +curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS) curl_json_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) if BUILD_WITH_LIBCURL curl_json_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS) curl_json_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS) endif -collectd_LDADD += "-dlopen" curl_json.la -collectd_DEPENDENCIES += curl_json.la endif if BUILD_PLUGIN_CURL_XML pkglib_LTLIBRARIES += curl_xml.la curl_xml_la_SOURCES = curl_xml.c -curl_xml_la_LDFLAGS = -module -avoid-version +curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS) curl_xml_la_CFLAGS = $(AM_CFLAGS) \ $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS) curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS) -collectd_LDADD += "-dlopen" curl_xml.la -collectd_DEPENDENCIES += curl_xml.la endif if BUILD_PLUGIN_DBI @@@ -267,24 -365,25 +267,24 @@@ pkglib_LTLIBRARIES += dbi.l dbi_la_SOURCES = dbi.c \ utils_db_query.c utils_db_query.h dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS) -dbi_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBDBI_LDFLAGS) +dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS) dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS) -collectd_LDADD += "-dlopen" dbi.la -collectd_DEPENDENCIES += dbi.la endif if BUILD_PLUGIN_DF pkglib_LTLIBRARIES += df.la -df_la_SOURCES = df.c utils_mount.c utils_mount.h -df_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" df.la -collectd_DEPENDENCIES += df.la +df_la_SOURCES = df.c \ + utils_ignorelist.c utils_ignorelist.h \ + utils_mount.c utils_mount.h +df_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_DISK pkglib_LTLIBRARIES += disk.la -disk_la_SOURCES = disk.c +disk_la_SOURCES = disk.c \ + utils_ignorelist.c utils_ignorelist.h disk_la_CFLAGS = $(AM_CFLAGS) -disk_la_LDFLAGS = -module -avoid-version +disk_la_LDFLAGS = $(PLUGIN_LDFLAGS) disk_la_LIBADD = if BUILD_WITH_LIBKSTAT disk_la_LIBADD += -lkstat @@@ -305,82 -404,102 +305,82 @@@ endi if BUILD_WITH_PERFSTAT disk_la_LIBADD += -lperfstat endif -collectd_LDADD += "-dlopen" disk.la -collectd_DEPENDENCIES += disk.la endif if BUILD_PLUGIN_DNS pkglib_LTLIBRARIES += dns.la dns_la_SOURCES = dns.c utils_dns.c utils_dns.h -dns_la_LDFLAGS = -module -avoid-version +dns_la_LDFLAGS = $(PLUGIN_LDFLAGS) dns_la_LIBADD = -lpcap -lpthread -collectd_LDADD += "-dlopen" dns.la -collectd_DEPENDENCIES += dns.la endif if BUILD_PLUGIN_DRBD pkglib_LTLIBRARIES += drbd.la drbd_la_SOURCES = drbd.c -drbd_la_LDFLAGS = -module -avoid-version +drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS) drbd_la_LIBADD = -lpthread -collectd_LDADD += "-dlopen" drbd.la -collectd_DEPENDENCIES += drbd.la endif if BUILD_PLUGIN_EMAIL pkglib_LTLIBRARIES += email.la email_la_SOURCES = email.c -email_la_LDFLAGS = -module -avoid-version +email_la_LDFLAGS = $(PLUGIN_LDFLAGS) email_la_LIBADD = -lpthread -collectd_LDADD += "-dlopen" email.la -collectd_DEPENDENCIES += email.la endif if BUILD_PLUGIN_ENTROPY pkglib_LTLIBRARIES += entropy.la entropy_la_SOURCES = entropy.c -entropy_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" entropy.la -collectd_DEPENDENCIES += entropy.la +entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_EXEC pkglib_LTLIBRARIES += exec.la exec_la_SOURCES = exec.c \ utils_cmd_putnotif.c utils_cmd_putnotif.h \ - utils_cmd_putval.c utils_cmd_putval.h -exec_la_LDFLAGS = -module -avoid-version + utils_cmd_putval.c utils_cmd_putval.h \ + utils_parse_option.h utils_parse_option.c +exec_la_LDFLAGS = $(PLUGIN_LDFLAGS) exec_la_LIBADD = -lpthread -collectd_LDADD += "-dlopen" exec.la -collectd_DEPENDENCIES += exec.la endif if BUILD_PLUGIN_ETHSTAT pkglib_LTLIBRARIES += ethstat.la ethstat_la_SOURCES = ethstat.c -ethstat_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" ethstat.la -collectd_DEPENDENCIES += ethstat.la +ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_FILECOUNT pkglib_LTLIBRARIES += filecount.la filecount_la_SOURCES = filecount.c -filecount_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" filecount.la -collectd_DEPENDENCIES += filecount.la +filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_GMOND pkglib_LTLIBRARIES += gmond.la gmond_la_SOURCES = gmond.c gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS) -gmond_la_LDFLAGS = -module -avoid-version $(GANGLIA_LDFLAGS) +gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS) gmond_la_LIBADD = $(GANGLIA_LIBS) -collectd_LDADD += "-dlopen" gmond.la -collectd_DEPENDENCIES += gmond.la endif if BUILD_PLUGIN_HDDTEMP pkglib_LTLIBRARIES += hddtemp.la hddtemp_la_SOURCES = hddtemp.c -hddtemp_la_LDFLAGS = -module -avoid-version +hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS) hddtemp_la_LIBADD = if BUILD_WITH_LIBSOCKET hddtemp_la_LIBADD += -lsocket endif -collectd_LDADD += "-dlopen" hddtemp.la -collectd_DEPENDENCIES += hddtemp.la endif if BUILD_PLUGIN_INTERFACE pkglib_LTLIBRARIES += interface.la -interface_la_SOURCES = interface.c +interface_la_SOURCES = interface.c \ + utils_ignorelist.c utils_ignorelist.h interface_la_CFLAGS = $(AM_CFLAGS) -interface_la_LDFLAGS = -module -avoid-version +interface_la_LDFLAGS = $(PLUGIN_LDFLAGS) interface_la_LIBADD = -collectd_LDADD += "-dlopen" interface.la -collectd_DEPENDENCIES += interface.la if BUILD_WITH_LIBSTATGRAB interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS) interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS) @@@ -401,17 -520,20 +401,17 @@@ if BUILD_PLUGIN_IPTABLE pkglib_LTLIBRARIES += iptables.la iptables_la_SOURCES = iptables.c iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS) -iptables_la_LDFLAGS = -module -avoid-version +iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS) iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS) -collectd_LDADD += "-dlopen" iptables.la -collectd_DEPENDENCIES += iptables.la endif if BUILD_PLUGIN_IPMI pkglib_LTLIBRARIES += ipmi.la -ipmi_la_SOURCES = ipmi.c +ipmi_la_SOURCES = ipmi.c \ + utils_ignorelist.c utils_ignorelist.h ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS) -ipmi_la_LDFLAGS = -module -avoid-version +ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS) ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS) -collectd_LDADD += "-dlopen" ipmi.la -collectd_DEPENDENCIES += ipmi.la endif if BUILD_PLUGIN_IPVS @@@ -420,14 -542,17 +420,14 @@@ ipvs_la_SOURCES = ipvs. if IP_VS_H_NEEDS_KERNEL_CFLAGS ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) endif -ipvs_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" ipvs.la -collectd_DEPENDENCIES += ipvs.la +ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_IRQ pkglib_LTLIBRARIES += irq.la -irq_la_SOURCES = irq.c -irq_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" irq.la -collectd_DEPENDENCIES += irq.la +irq_la_SOURCES = irq.c \ + utils_ignorelist.c utils_ignorelist.h +irq_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_JAVA @@@ -435,16 -560,31 +435,16 @@@ pkglib_LTLIBRARIES += java.l java_la_SOURCES = java.c java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS) java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS) -java_la_LDFLAGS = -module -avoid-version $(JAVA_LDFLAGS) +java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS) java_la_LIBADD = $(JAVA_LIBS) -collectd_LDADD += "-dlopen" java.la -collectd_DEPENDENCIES += java.la -endif - -if BUILD_PLUGIN_LIBVIRT -pkglib_LTLIBRARIES += libvirt.la -libvirt_la_SOURCES = libvirt.c -libvirt_la_CFLAGS = $(AM_CFLAGS) \ - $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS) -libvirt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS) -libvirt_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" libvirt.la -collectd_DEPENDENCIES += libvirt.la endif if BUILD_PLUGIN_LOAD pkglib_LTLIBRARIES += load.la load_la_SOURCES = load.c load_la_CFLAGS = $(AM_CFLAGS) -load_la_LDFLAGS = -module -avoid-version +load_la_LDFLAGS = $(PLUGIN_LDFLAGS) load_la_LIBADD = -collectd_LDADD += "-dlopen" load.la -collectd_DEPENDENCIES += load.la if BUILD_WITH_LIBSTATGRAB load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS) load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS) @@@ -457,110 -597,138 +457,110 @@@ endif # BUILD_PLUGIN_LOA if BUILD_PLUGIN_LOGFILE pkglib_LTLIBRARIES += logfile.la logfile_la_SOURCES = logfile.c -logfile_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" logfile.la -collectd_DEPENDENCIES += logfile.la +logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_LOG_LOGSTASH pkglib_LTLIBRARIES += log_logstash.la log_logstash_la_SOURCES = log_logstash.c log_logstash_la_CFLAGS = $(AM_CFLAGS) -log_logstash_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBYAJL_LDFLAGS) +log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS) log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS) log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) -collectd_LDADD += "-dlopen" log_logstash.la -collectd_DEPENDENCIES += log_logstash.la endif if BUILD_PLUGIN_LPAR pkglib_LTLIBRARIES += lpar.la lpar_la_SOURCES = lpar.c -lpar_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" lpar.la -collectd_DEPENDENCIES += lpar.la +lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS) lpar_la_LIBADD = -lperfstat endif if BUILD_PLUGIN_LVM pkglib_LTLIBRARIES += lvm.la lvm_la_SOURCES = lvm.c -lvm_la_LDFLAGS = -module -avoid-version +lvm_la_LDFLAGS = $(PLUGIN_LDFLAGS) lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS) -collectd_LDADD += "-dlopen" lvm.la -collectd_DEPENDENCIES += lvm.la endif if BUILD_PLUGIN_MADWIFI pkglib_LTLIBRARIES += madwifi.la -madwifi_la_SOURCES = madwifi.c madwifi.h -madwifi_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" madwifi.la -collectd_DEPENDENCIES += madwifi.la +madwifi_la_SOURCES = madwifi.c madwifi.h \ + utils_ignorelist.c utils_ignorelist.h +madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_MATCH_EMPTY_COUNTER pkglib_LTLIBRARIES += match_empty_counter.la match_empty_counter_la_SOURCES = match_empty_counter.c -match_empty_counter_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" match_empty_counter.la -collectd_DEPENDENCIES += match_empty_counter.la +match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_MATCH_HASHED pkglib_LTLIBRARIES += match_hashed.la match_hashed_la_SOURCES = match_hashed.c -match_hashed_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" match_hashed.la -collectd_DEPENDENCIES += match_hashed.la +match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_MATCH_REGEX pkglib_LTLIBRARIES += match_regex.la match_regex_la_SOURCES = match_regex.c -match_regex_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" match_regex.la -collectd_DEPENDENCIES += match_regex.la +match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_MATCH_TIMEDIFF pkglib_LTLIBRARIES += match_timediff.la match_timediff_la_SOURCES = match_timediff.c -match_timediff_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" match_timediff.la -collectd_DEPENDENCIES += match_timediff.la +match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_MATCH_VALUE pkglib_LTLIBRARIES += match_value.la match_value_la_SOURCES = match_value.c -match_value_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" match_value.la -collectd_DEPENDENCIES += match_value.la +match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_MBMON pkglib_LTLIBRARIES += mbmon.la mbmon_la_SOURCES = mbmon.c -mbmon_la_LDFLAGS = -module -avoid-version +mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS) mbmon_la_LIBADD = if BUILD_WITH_LIBSOCKET mbmon_la_LIBADD += -lsocket endif -collectd_LDADD += "-dlopen" mbmon.la -collectd_DEPENDENCIES += mbmon.la endif if BUILD_PLUGIN_MD pkglib_LTLIBRARIES += md.la -md_la_SOURCES = md.c -md_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" md.la -collectd_DEPENDENCIES += md.la +md_la_SOURCES = md.c \ + utils_ignorelist.c utils_ignorelist.h +md_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_MEMCACHEC pkglib_LTLIBRARIES += memcachec.la memcachec_la_SOURCES = memcachec.c -memcachec_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMEMCACHED_LDFLAGS) -memcachec_la_CPPFLAGS = $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS) +memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS) +memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS) memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS) -collectd_LDADD += "-dlopen" memcachec.la -collectd_DEPENDENCIES += memcachec.la endif if BUILD_PLUGIN_MEMCACHED pkglib_LTLIBRARIES += memcached.la memcached_la_SOURCES = memcached.c -memcached_la_LDFLAGS = -module -avoid-version +memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS) memcached_la_LIBADD = if BUILD_WITH_LIBSOCKET memcached_la_LIBADD += -lsocket endif -collectd_LDADD += "-dlopen" memcached.la -collectd_DEPENDENCIES += memcached.la endif if BUILD_PLUGIN_MEMORY pkglib_LTLIBRARIES += memory.la memory_la_SOURCES = memory.c memory_la_CFLAGS = $(AM_CFLAGS) -memory_la_LDFLAGS = -module -avoid-version +memory_la_LDFLAGS = $(PLUGIN_LDFLAGS) memory_la_LIBADD = -collectd_LDADD += "-dlopen" memory.la -collectd_DEPENDENCIES += memory.la if BUILD_WITH_LIBKSTAT memory_la_LIBADD += -lkstat endif @@@ -576,56 -744,56 +576,56 @@@ memory_la_LIBADD += -lperfsta endif endif +if BUILD_PLUGIN_MIC +pkglib_LTLIBRARIES += mic.la +mic_la_SOURCES = mic.c \ + utils_ignorelist.c utils_ignorelist.h +mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LIBPATH) +mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS) +mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD) +endif + if BUILD_PLUGIN_MODBUS pkglib_LTLIBRARIES += modbus.la modbus_la_SOURCES = modbus.c -modbus_la_LDFLAGS = -module -avoid-version +modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS) modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS) modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS) -collectd_LDADD += "-dlopen" modbus.la -collectd_DEPENDENCIES += modbus.la endif if BUILD_PLUGIN_MULTIMETER pkglib_LTLIBRARIES += multimeter.la multimeter_la_SOURCES = multimeter.c -multimeter_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" multimeter.la -collectd_DEPENDENCIES += multimeter.la +multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_MYSQL pkglib_LTLIBRARIES += mysql.la mysql_la_SOURCES = mysql.c -mysql_la_LDFLAGS = -module -avoid-version +mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS) mysql_la_CFLAGS = $(AM_CFLAGS) mysql_la_LIBADD = -collectd_LDADD += "-dlopen" mysql.la if BUILD_WITH_LIBMYSQL mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS) mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS) endif -collectd_DEPENDENCIES += mysql.la endif if BUILD_PLUGIN_NETAPP pkglib_LTLIBRARIES += netapp.la -netapp_la_SOURCES = netapp.c +netapp_la_SOURCES = netapp.c \ + utils_ignorelist.c utils_ignorelist.h netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS) -netapp_la_LDFLAGS = -module -avoid-version $(LIBNETAPP_LDFLAGS) +netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS) netapp_la_LIBADD = $(LIBNETAPP_LIBS) -collectd_LDADD += "-dlopen" netapp.la -collectd_DEPENDENCIES += netapp.la endif if BUILD_PLUGIN_NETLINK pkglib_LTLIBRARIES += netlink.la netlink_la_SOURCES = netlink.c -netlink_la_LDFLAGS = -module -avoid-version +netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS) netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS) netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS) -collectd_LDADD += "-dlopen" netlink.la -collectd_DEPENDENCIES += netlink.la endif if BUILD_PLUGIN_NETWORK @@@ -633,7 -801,7 +633,7 @@@ pkglib_LTLIBRARIES += network.l network_la_SOURCES = network.c network.h \ utils_fbhash.c utils_fbhash.h network_la_CPPFLAGS = $(AM_CPPFLAGS) -network_la_LDFLAGS = -module -avoid-version +network_la_LDFLAGS = $(PLUGIN_LDFLAGS) network_la_LIBADD = -lpthread if BUILD_WITH_LIBSOCKET network_la_LIBADD += -lsocket @@@ -643,18 -811,24 +643,18 @@@ network_la_CPPFLAGS += $(GCRYPT_CPPFLAG network_la_LDFLAGS += $(GCRYPT_LDFLAGS) network_la_LIBADD += $(GCRYPT_LIBS) endif -collectd_LDADD += "-dlopen" network.la -collectd_DEPENDENCIES += network.la endif if BUILD_PLUGIN_NFS pkglib_LTLIBRARIES += nfs.la nfs_la_SOURCES = nfs.c -nfs_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" nfs.la -collectd_DEPENDENCIES += nfs.la +nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_FSCACHE pkglib_LTLIBRARIES += fscache.la fscache_la_SOURCES = fscache.c -fscache_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" fscache.la -collectd_DEPENDENCIES += fscache.la +fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_NGINX @@@ -662,77 -836,102 +662,85 @@@ pkglib_LTLIBRARIES += nginx.l nginx_la_SOURCES = nginx.c nginx_la_CFLAGS = $(AM_CFLAGS) nginx_la_LIBADD = -nginx_la_LDFLAGS = -module -avoid-version +nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS) if BUILD_WITH_LIBCURL nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS) nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS) endif -collectd_LDADD += "-dlopen" nginx.la -collectd_DEPENDENCIES += nginx.la endif if BUILD_PLUGIN_NOTIFY_DESKTOP pkglib_LTLIBRARIES += notify_desktop.la notify_desktop_la_SOURCES = notify_desktop.c notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS) -notify_desktop_la_LDFLAGS = -module -avoid-version +notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS) notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS) -collectd_LDADD += "-dlopen" notify_desktop.la -collectd_DEPENDENCIES += notify_desktop.la endif if BUILD_PLUGIN_NOTIFY_EMAIL pkglib_LTLIBRARIES += notify_email.la notify_email_la_SOURCES = notify_email.c -notify_email_la_LDFLAGS = -module -avoid-version +notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS) notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread -ldl -collectd_LDADD += "-dlopen" notify_email.la -collectd_DEPENDENCIES += notify_email.la endif if BUILD_PLUGIN_NTPD pkglib_LTLIBRARIES += ntpd.la ntpd_la_SOURCES = ntpd.c -ntpd_la_LDFLAGS = -module -avoid-version +ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS) ntpd_la_LIBADD = if BUILD_WITH_LIBSOCKET ntpd_la_LIBADD += -lsocket endif -collectd_LDADD += "-dlopen" ntpd.la -collectd_DEPENDENCIES += ntpd.la endif if BUILD_PLUGIN_NUMA pkglib_LTLIBRARIES += numa.la numa_la_SOURCES = numa.c -numa_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" numa.la -collectd_DEPENDENCIES += numa.la +numa_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_NUT pkglib_LTLIBRARIES += nut.la nut_la_SOURCES = nut.c nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS) -nut_la_LDFLAGS = -module -avoid-version +nut_la_LDFLAGS = $(PLUGIN_LDFLAGS) nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS) -collectd_LDADD += "-dlopen" nut.la -collectd_DEPENDENCIES += nut.la endif if BUILD_PLUGIN_OLSRD pkglib_LTLIBRARIES += olsrd.la olsrd_la_SOURCES = olsrd.c -olsrd_la_LDFLAGS = -module -avoid-version +olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS) olsrd_la_LIBADD = if BUILD_WITH_LIBSOCKET olsrd_la_LIBADD += -lsocket endif -collectd_LDADD += "-dlopen" olsrd.la -collectd_DEPENDENCIES += olsrd.la endif if BUILD_PLUGIN_ONEWIRE pkglib_LTLIBRARIES += onewire.la -onewire_la_SOURCES = onewire.c +onewire_la_SOURCES = onewire.c \ + utils_ignorelist.c utils_ignorelist.h onewire_la_CFLAGS = $(AM_CFLAGS) -onewire_la_CPPFLAGS = $(BUILD_WITH_LIBOWCAPI_CPPFLAGS) +onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS) onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS) -onewire_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" onewire.la -collectd_DEPENDENCIES += onewire.la +onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif + if BUILD_PLUGIN_OPENLDAP + pkglib_LTLIBRARIES += openldap.la + openldap_la_SOURCES = openldap.c + openldap_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBLDAP_LDFLAGS) + openldap_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS) + openldap_la_LIBADD = -lldap + endif + if BUILD_PLUGIN_OPENVPN pkglib_LTLIBRARIES += openvpn.la openvpn_la_SOURCES = openvpn.c openvpn_la_CFLAGS = $(AM_CFLAGS) -openvpn_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" openvpn.la -collectd_DEPENDENCIES += openvpn.la +openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_ORACLE @@@ -740,9 -939,11 +748,9 @@@ pkglib_LTLIBRARIES += oracle.l oracle_la_SOURCES = oracle.c \ utils_db_query.c utils_db_query.h oracle_la_CFLAGS = $(AM_CFLAGS) -oracle_la_CPPFLAGS = $(BUILD_WITH_ORACLE_CFLAGS) +oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CFLAGS) oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS) -oracle_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" oracle.la -collectd_DEPENDENCIES += oracle.la +oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_PERL @@@ -759,30 -960,38 +767,30 @@@ perl_la_CFLAGS = $(AM_CFLAGS) if HAVE_BROKEN_PERL_LOAD_MODULE perl_la_CFLAGS += -Wno-nonnull endif -perl_la_LDFLAGS = -module -avoid-version \ +perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) \ $(PERL_LDFLAGS) -collectd_LDADD += "-dlopen" perl.la -collectd_DEPENDENCIES += perl.la endif if BUILD_PLUGIN_PF pkglib_LTLIBRARIES += pf.la pf_la_SOURCES = pf.c -pf_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" pf.la -collectd_DEPENDENCIES += pf.la +pf_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_PINBA pkglib_LTLIBRARIES += pinba.la pinba_la_SOURCES = pinba.c nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h -pinba_la_LDFLAGS = -module -avoid-version +pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS) pinba_la_LIBADD = -lprotobuf-c -collectd_LDADD += "-dlopen" pinba.la -collectd_DEPENDENCIES += pinba.la endif if BUILD_PLUGIN_PING pkglib_LTLIBRARIES += ping.la ping_la_SOURCES = ping.c ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS) -ping_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBOPING_LDFLAGS) +ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS) ping_la_LIBADD = -loping -lm -collectd_LDADD += "-dlopen" ping.la -collectd_DEPENDENCIES += ping.la endif if BUILD_PLUGIN_POSTGRESQL @@@ -790,15 -999,19 +798,15 @@@ pkglib_LTLIBRARIES += postgresql.l postgresql_la_SOURCES = postgresql.c \ utils_db_query.c utils_db_query.h postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS) -postgresql_la_LDFLAGS = -module -avoid-version \ +postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \ $(BUILD_WITH_LIBPQ_LDFLAGS) postgresql_la_LIBADD = -lpq -collectd_LDADD += "-dlopen" postgresql.la -collectd_DEPENDENCIES += postgresql.la endif if BUILD_PLUGIN_POWERDNS pkglib_LTLIBRARIES += powerdns.la powerdns_la_SOURCES = powerdns.c -powerdns_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" powerdns.la -collectd_DEPENDENCIES += powerdns.la +powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_PYTHON @@@ -809,15 -1022,19 +817,15 @@@ python_la_CFLAGS = $(AM_CFLAGS if COMPILER_IS_GCC python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing endif -python_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_PYTHON_LDFLAGS) +python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_PYTHON_LDFLAGS) python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS) -collectd_LDADD += "-dlopen" python.la -collectd_DEPENDENCIES += python.la endif if BUILD_PLUGIN_PROCESSES pkglib_LTLIBRARIES += processes.la processes_la_SOURCES = processes.c -processes_la_LDFLAGS = -module -avoid-version +processes_la_LDFLAGS = $(PLUGIN_LDFLAGS) processes_la_LIBADD = -collectd_LDADD += "-dlopen" processes.la -collectd_DEPENDENCIES += processes.la if BUILD_WITH_LIBKVM_GETPROCS processes_la_LIBADD += -lkvm endif @@@ -825,81 -1042,84 +833,81 @@@ endi if BUILD_PLUGIN_PROTOCOLS pkglib_LTLIBRARIES += protocols.la -protocols_la_SOURCES = protocols.c -protocols_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" protocols.la -collectd_DEPENDENCIES += protocols.la +protocols_la_SOURCES = protocols.c \ + utils_ignorelist.c utils_ignorelist.h +protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_REDIS pkglib_LTLIBRARIES += redis.la redis_la_SOURCES = redis.c -redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS) +redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBCREDIS_LDFLAGS) redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS) redis_la_LIBADD = -lcredis -collectd_LDADD += "-dlopen" redis.la -collectd_DEPENDENCIES += redis.la endif if BUILD_PLUGIN_ROUTEROS pkglib_LTLIBRARIES += routeros.la routeros_la_SOURCES = routeros.c -routeros_la_CPPFLAGS = $(BUILD_WITH_LIBROUTEROS_CPPFLAGS) -routeros_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBROUTEROS_LDFLAGS) +routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS) +routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS) routeros_la_LIBADD = -lrouteros -collectd_LDADD += "-dlopen" routeros.la -collectd_DEPENDENCIES += routeros.la endif if BUILD_PLUGIN_RRDCACHED pkglib_LTLIBRARIES += rrdcached.la rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h -rrdcached_la_LDFLAGS = -module -avoid-version +rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS) rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS) rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS) -collectd_LDADD += "-dlopen" rrdcached.la -collectd_DEPENDENCIES += rrdcached.la endif if BUILD_PLUGIN_RRDTOOL pkglib_LTLIBRARIES += rrdtool.la rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h -rrdtool_la_LDFLAGS = -module -avoid-version +rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS) rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS) rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS) -collectd_LDADD += "-dlopen" rrdtool.la -collectd_DEPENDENCIES += rrdtool.la endif if BUILD_PLUGIN_SENSORS pkglib_LTLIBRARIES += sensors.la -sensors_la_SOURCES = sensors.c +sensors_la_SOURCES = sensors.c \ + utils_ignorelist.c utils_ignorelist.h sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS) -sensors_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBSENSORS_LDFLAGS) +sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS) sensors_la_LIBADD = -lsensors -collectd_LDADD += "-dlopen" sensors.la -collectd_DEPENDENCIES += sensors.la endif if BUILD_PLUGIN_SERIAL pkglib_LTLIBRARIES += serial.la serial_la_SOURCES = serial.c -serial_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" serial.la -collectd_DEPENDENCIES += serial.la +serial_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_SIGROK pkglib_LTLIBRARIES += sigrok.la sigrok_la_SOURCES = sigrok.c sigrok_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSIGROK_CFLAGS) -sigrok_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBSIGROK_LDFLAGS) +sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSIGROK_LDFLAGS) sigrok_la_LIBADD = -lsigrok -collectd_LDADD += "-dlopen" sigrok.la -collectd_DEPENDENCIES += sigrok.la +endif + +if BUILD_PLUGIN_SMART +if BUILD_WITH_LIBUDEV +pkglib_LTLIBRARIES += smart.la +smart_la_SOURCES = smart.c \ + utils_ignorelist.c utils_ignorelist.h +smart_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS) +smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS) +smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) -ludev +endif endif if BUILD_PLUGIN_SNMP pkglib_LTLIBRARIES += snmp.la snmp_la_SOURCES = snmp.c -snmp_la_LDFLAGS = -module -avoid-version +snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS) snmp_la_CFLAGS = $(AM_CFLAGS) snmp_la_LIBADD = if BUILD_WITH_LIBNETSNMP @@@ -909,22 -1129,28 +917,22 @@@ endi if BUILD_WITH_LIBPTHREAD snmp_la_LIBADD += -lpthread endif -collectd_LDADD += "-dlopen" snmp.la -collectd_DEPENDENCIES += snmp.la endif if BUILD_PLUGIN_STATSD pkglib_LTLIBRARIES += statsd.la statsd_la_SOURCES = statsd.c \ utils_latency.h utils_latency.c -statsd_la_LDFLAGS = -module -avoid-version +statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS) statsd_la_LIBADD = -lpthread -collectd_LDADD += "-dlopen" statsd.la -collectd_DEPENDENCIES += statsd.la endif if BUILD_PLUGIN_SWAP pkglib_LTLIBRARIES += swap.la swap_la_SOURCES = swap.c swap_la_CFLAGS = $(AM_CFLAGS) -swap_la_LDFLAGS = -module -avoid-version +swap_la_LDFLAGS = $(PLUGIN_LDFLAGS) swap_la_LIBADD = -collectd_LDADD += "-dlopen" swap.la -collectd_DEPENDENCIES += swap.la if BUILD_WITH_LIBKSTAT swap_la_LIBADD += -lkstat endif @@@ -947,69 -1173,91 +955,69 @@@ endi if BUILD_PLUGIN_SYSLOG pkglib_LTLIBRARIES += syslog.la syslog_la_SOURCES = syslog.c -syslog_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" syslog.la -collectd_DEPENDENCIES += syslog.la +syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_TABLE pkglib_LTLIBRARIES += table.la table_la_SOURCES = table.c -table_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" table.la -collectd_DEPENDENCIES += table.la +table_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_TAIL pkglib_LTLIBRARIES += tail.la tail_la_SOURCES = tail.c -tail_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" tail.la -collectd_DEPENDENCIES += tail.la +tail_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_TAIL_CSV pkglib_LTLIBRARIES += tail_csv.la tail_csv_la_SOURCES = tail_csv.c -tail_csv_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" tail_csv.la -collectd_DEPENDENCIES += tail_csv.la +tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_TAPE pkglib_LTLIBRARIES += tape.la tape_la_SOURCES = tape.c -tape_la_LDFLAGS = -module -avoid-version +tape_la_LDFLAGS = $(PLUGIN_LDFLAGS) tape_la_LIBADD = -lkstat -ldevinfo -collectd_LDADD += "-dlopen" tape.la -collectd_DEPENDENCIES += tape.la endif if BUILD_PLUGIN_TARGET_NOTIFICATION pkglib_LTLIBRARIES += target_notification.la target_notification_la_SOURCES = target_notification.c -target_notification_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" target_notification.la -collectd_DEPENDENCIES += target_notification.la +target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_TARGET_REPLACE pkglib_LTLIBRARIES += target_replace.la target_replace_la_SOURCES = target_replace.c -target_replace_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" target_replace.la -collectd_DEPENDENCIES += target_replace.la +target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_TARGET_SCALE pkglib_LTLIBRARIES += target_scale.la target_scale_la_SOURCES = target_scale.c -target_scale_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" target_scale.la -collectd_DEPENDENCIES += target_scale.la +target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_TARGET_SET pkglib_LTLIBRARIES += target_set.la target_set_la_SOURCES = target_set.c -target_set_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" target_set.la -collectd_DEPENDENCIES += target_set.la +target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_TARGET_V5UPGRADE pkglib_LTLIBRARIES += target_v5upgrade.la target_v5upgrade_la_SOURCES = target_v5upgrade.c -target_v5upgrade_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" target_v5upgrade.la -collectd_DEPENDENCIES += target_v5upgrade.la +target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_TCPCONNS pkglib_LTLIBRARIES += tcpconns.la tcpconns_la_SOURCES = tcpconns.c -tcpconns_la_LDFLAGS = -module -avoid-version +tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS) tcpconns_la_LIBADD = -collectd_LDADD += "-dlopen" tcpconns.la -collectd_DEPENDENCIES += tcpconns.la if BUILD_WITH_LIBKVM_NLIST tcpconns_la_LIBADD += -lkvm endif @@@ -1018,37 -1266,46 +1026,37 @@@ endi if BUILD_PLUGIN_TEAMSPEAK2 pkglib_LTLIBRARIES += teamspeak2.la teamspeak2_la_SOURCES = teamspeak2.c -teamspeak2_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" teamspeak2.la -collectd_DEPENDENCIES += teamspeak2.la +teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_TED pkglib_LTLIBRARIES += ted.la ted_la_SOURCES = ted.c -ted_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" ted.la -collectd_DEPENDENCIES += ted.la +ted_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_THERMAL pkglib_LTLIBRARIES += thermal.la -thermal_la_SOURCES = thermal.c -thermal_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" thermal.la -collectd_DEPENDENCIES += thermal.la +thermal_la_SOURCES = thermal.c \ + utils_ignorelist.c utils_ignorelist.h +thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_THRESHOLD pkglib_LTLIBRARIES += threshold.la threshold_la_SOURCES = threshold.c -threshold_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" threshold.la -collectd_DEPENDENCIES += threshold.la +threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_TOKYOTYRANT pkglib_LTLIBRARIES += tokyotyrant.la tokyotyrant_la_SOURCES = tokyotyrant.c tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS) -tokyotyrant_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS) +tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS) tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS) if BUILD_WITH_LIBSOCKET tokyotyrant_la_LIBADD += -lsocket endif -collectd_LDADD += "-dlopen" tokyotyrant.la -collectd_DEPENDENCIES += tokyotyrant.la endif if BUILD_PLUGIN_UNIXSOCK @@@ -1059,17 -1316,18 +1067,17 @@@ unixsock_la_SOURCES = unixsock.c utils_cmd_getthreshold.h utils_cmd_getthreshold.c \ utils_cmd_listval.h utils_cmd_listval.c \ utils_cmd_putval.h utils_cmd_putval.c \ - utils_cmd_putnotif.h utils_cmd_putnotif.c -unixsock_la_LDFLAGS = -module -avoid-version + utils_cmd_putnotif.h utils_cmd_putnotif.c \ + utils_parse_option.h utils_parse_option.c +unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS) unixsock_la_LIBADD = -lpthread -collectd_LDADD += "-dlopen" unixsock.la -collectd_DEPENDENCIES += unixsock.la endif if BUILD_PLUGIN_UPTIME pkglib_LTLIBRARIES += uptime.la uptime_la_SOURCES = uptime.c uptime_la_CFLAGS = $(AM_CFLAGS) -uptime_la_LDFLAGS = -module -avoid-version +uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS) uptime_la_LIBADD = if BUILD_WITH_LIBKSTAT uptime_la_LIBADD += -lkstat @@@ -1077,18 -1335,22 +1085,18 @@@ endi if BUILD_WITH_PERFSTAT uptime_la_LIBADD += -lperfstat endif -collectd_LDADD += "-dlopen" uptime.la -collectd_DEPENDENCIES += uptime.la endif if BUILD_PLUGIN_USERS pkglib_LTLIBRARIES += users.la users_la_SOURCES = users.c users_la_CFLAGS = $(AM_CFLAGS) -users_la_LDFLAGS = -module -avoid-version +users_la_LDFLAGS = $(PLUGIN_LDFLAGS) users_la_LIBADD = if BUILD_WITH_LIBSTATGRAB users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS) users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS) endif -collectd_LDADD += "-dlopen" users.la -collectd_DEPENDENCIES += users.la endif if BUILD_PLUGIN_UUID @@@ -1096,43 -1358,53 +1104,43 @@@ pkglib_LTLIBRARIES += uuid.l uuid_la_SOURCES = uuid.c uuid_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS) uuid_la_LIBADD = $(BUILD_WITH_LIBHAL_LIBS) -uuid_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" uuid.la -collectd_DEPENDENCIES += uuid.la -endif - -if BUILD_PLUGIN_MIC -pkglib_LTLIBRARIES += mic.la -mic_la_SOURCES = mic.c -mic_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_MIC_LIBPATH) -mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS) -mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD) -collectd_LDADD += "-dlopen" mic.la -collectd_DEPENDENCIES += mic.la +uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_VARNISH pkglib_LTLIBRARIES += varnish.la varnish_la_SOURCES = varnish.c -varnish_la_LDFLAGS = -module -avoid-version +varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS) varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS) varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS) -collectd_LDADD += "-dlopen" varnish.la -collectd_DEPENDENCIES += varnish.la +endif + +if BUILD_PLUGIN_VIRT +pkglib_LTLIBRARIES += virt.la +virt_la_SOURCES = virt.c \ + utils_ignorelist.c utils_ignorelist.h +virt_la_CFLAGS = $(AM_CFLAGS) \ + $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS) +virt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS) +virt_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_VMEM pkglib_LTLIBRARIES += vmem.la vmem_la_SOURCES = vmem.c -vmem_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" vmem.la -collectd_DEPENDENCIES += vmem.la +vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_VSERVER pkglib_LTLIBRARIES += vserver.la vserver_la_SOURCES = vserver.c -vserver_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" vserver.la -collectd_DEPENDENCIES += vserver.la +vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_WIRELESS pkglib_LTLIBRARIES += wireless.la wireless_la_SOURCES = wireless.c -wireless_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" wireless.la -collectd_DEPENDENCIES += wireless.la +wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_WRITE_GRAPHITE @@@ -1140,20 -1412,24 +1148,20 @@@ pkglib_LTLIBRARIES += write_graphite.l write_graphite_la_SOURCES = write_graphite.c \ utils_format_graphite.c utils_format_graphite.h \ utils_format_json.c utils_format_json.h -write_graphite_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" write_graphite.la -collectd_DEPENDENCIES += write_graphite.la +write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_WRITE_HTTP pkglib_LTLIBRARIES += write_http.la write_http_la_SOURCES = write_http.c \ utils_format_json.c utils_format_json.h -write_http_la_LDFLAGS = -module -avoid-version +write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS) write_http_la_CFLAGS = $(AM_CFLAGS) write_http_la_LIBADD = -collectd_LDADD += "-dlopen" write_http.la if BUILD_WITH_LIBCURL write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS) write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS) endif -collectd_DEPENDENCIES += write_http.la endif if BUILD_PLUGIN_WRITE_KAFKA @@@ -1163,53 -1439,65 +1171,53 @@@ write_kafka_la_SOURCES = write_kafka.c utils_format_json.c utils_format_json.h \ utils_cmd_putval.c utils_cmd_putval.h \ utils_crc32.c utils_crc32.h -write_kafka_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBRDKAFKA_LDFLAGS) +write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS) write_kafka_la_LIBADD = $(BUILD_WITH_LIBRDKAFKA_LIBS) -collectd_LDADD += "-dlopen" write_kafka.la -collectd_DEPENDENCIES += write_kafka.la endif if BUILD_PLUGIN_WRITE_MONGODB pkglib_LTLIBRARIES += write_mongodb.la write_mongodb_la_SOURCES = write_mongodb.c write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS) -write_mongodb_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMONGOC_LDFLAGS) +write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS) write_mongodb_la_LIBADD = -lmongoc -collectd_LDADD += "-dlopen" write_mongodb.la -collectd_DEPENDENCIES += write_mongodb.la endif if BUILD_PLUGIN_WRITE_REDIS pkglib_LTLIBRARIES += write_redis.la write_redis_la_SOURCES = write_redis.c -write_redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS) +write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBCREDIS_LDFLAGS) write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS) write_redis_la_LIBADD = -lcredis -collectd_LDADD += "-dlopen" write_redis.la -collectd_DEPENDENCIES += write_redis.la endif if BUILD_PLUGIN_WRITE_RIEMANN pkglib_LTLIBRARIES += write_riemann.la write_riemann_la_SOURCES = write_riemann.c write_riemann_threshold.c nodist_write_riemann_la_SOURCES = riemann.pb-c.c riemann.pb-c.h -write_riemann_la_LDFLAGS = -module -avoid-version +write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS) write_riemann_la_LIBADD = -lprotobuf-c -collectd_LDADD += "-dlopen" write_riemann.la -collectd_DEPENDENCIES += write_riemann.la endif if BUILD_PLUGIN_WRITE_TSDB pkglib_LTLIBRARIES += write_tsdb.la write_tsdb_la_SOURCES = write_tsdb.c -write_tsdb_la_LDFLAGS = -module -avoid-version -collectd_LDADD += "-dlopen" write_tsdb.la -collectd_DEPENDENCIES += write_tsdb.la +write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS) endif if BUILD_PLUGIN_XMMS pkglib_LTLIBRARIES += xmms.la xmms_la_SOURCES = xmms.c xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS) -xmms_la_LDFLAGS = -module -avoid-version +xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS) xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS) -collectd_LDADD += "-dlopen" xmms.la -collectd_DEPENDENCIES += xmms.la endif if BUILD_PLUGIN_ZFS_ARC pkglib_LTLIBRARIES += zfs_arc.la zfs_arc_la_SOURCES = zfs_arc.c zfs_arc_la_CFLAGS = $(AM_CFLAGS) -zfs_arc_la_LDFLAGS = -module -avoid-version +zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS) if BUILD_FREEBSD zfs_arc_la_LIBADD = -lm else @@@ -1220,6 -1508,8 +1228,6 @@@ els zfs_arc_la_LIBADD = -lkstat endif endif -collectd_LDADD += "-dlopen" zfs_arc.la -collectd_DEPENDENCIES += zfs_arc.la endif BUILT_SOURCES += $(dist_man_MANS) @@@ -1319,7 -1609,7 +1327,7 @@@ uninstall-hook check_PROGRAMS = test_common test_utils_avltree test_utils_heap test_utils_mount test_utils_vl_lookup test_common_SOURCES = tests/test_common.c \ - common.h common.c \ + daemon/common.h daemon/common.c \ tests/mock/plugin.c \ tests/mock/utils_cache.c \ tests/mock/utils_time.c @@@ -1328,20 -1618,20 +1336,20 @@@ test_common_LDFLAGS = -export-dynami test_common_LDADD = test_utils_avltree_SOURCES = tests/test_utils_avltree.c \ - utils_avltree.c utils_avltree.h + daemon/utils_avltree.c daemon/utils_avltree.h test_utils_avltree_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) test_utils_avltree_LDFLAGS = -export-dynamic test_utils_avltree_LDADD = test_utils_heap_SOURCES = tests/test_utils_heap.c \ - utils_heap.c utils_heap.h + daemon/utils_heap.c daemon/utils_heap.h test_utils_heap_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) test_utils_heap_LDFLAGS = -export-dynamic test_utils_heap_LDADD = test_utils_mount_SOURCES = tests/test_utils_mount.c \ utils_mount.c utils_mount.h \ - common.c common.h \ + daemon/common.c daemon/common.h \ tests/mock/plugin.c \ tests/mock/utils_cache.c \ tests/mock/utils_time.c @@@ -1351,8 -1641,8 +1359,8 @@@ test_utils_mount_LDADD test_utils_vl_lookup_SOURCES = tests/test_utils_vl_lookup.c \ utils_vl_lookup.h utils_vl_lookup.c \ - utils_avltree.c utils_avltree.h \ - common.c common.h \ + daemon/utils_avltree.c daemon/utils_avltree.h \ + daemon/common.c daemon/common.h \ tests/mock/plugin.c \ tests/mock/utils_cache.c \ tests/mock/utils_time.c diff --combined src/collectd.conf.in index 8e7f3fcc,b7f7b747..84410e02 --- a/src/collectd.conf.in +++ b/src/collectd.conf.in @@@ -25,13 -25,6 +25,13 @@@ #AutoLoadPlugin false #----------------------------------------------------------------------------# +# When enabled, internal statistics are collected, using "collectd" as the # +# plugin name. # +# Disabled by default. # +#----------------------------------------------------------------------------# +#CollectInternalStats false + +#----------------------------------------------------------------------------# # Interval at which to query values. This may be overwritten on a per-plugin # # base by using the 'Interval' option of the LoadPlugin block: # # # @@@ -40,10 -33,9 +40,10 @@@ #----------------------------------------------------------------------------# #Interval 10 -#Timeout 2 -#ReadThreads 5 -#WriteThreads 5 +#MaxReadInterval 86400 +#Timeout 2 +#ReadThreads 5 +#WriteThreads 5 # Limit the size of the write queue. Default is no limit. Setting up a limit is # recommended for servers handling a high volume of traffic. @@@ -126,6 -118,7 +126,6 @@@ #@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs #@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq #@BUILD_PLUGIN_JAVA_TRUE@LoadPlugin java -#@BUILD_PLUGIN_LIBVIRT_TRUE@LoadPlugin libvirt @BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load #@BUILD_PLUGIN_LPAR_TRUE@LoadPlugin lpar #@BUILD_PLUGIN_LVM_TRUE@LoadPlugin lvm @@@ -150,6 -143,7 +150,7 @@@ #@BUILD_PLUGIN_NUT_TRUE@LoadPlugin nut #@BUILD_PLUGIN_OLSRD_TRUE@LoadPlugin olsrd #@BUILD_PLUGIN_ONEWIRE_TRUE@LoadPlugin onewire + #@BUILD_PLUGIN_OPENLDAP_TRUE@LoadPlugin openldap #@BUILD_PLUGIN_OPENVPN_TRUE@LoadPlugin openvpn #@BUILD_PLUGIN_ORACLE_TRUE@LoadPlugin oracle #@BUILD_PLUGIN_PERL_TRUE@ @@@ -171,7 -165,6 +172,7 @@@ #@BUILD_PLUGIN_SENSORS_TRUE@LoadPlugin sensors #@BUILD_PLUGIN_SERIAL_TRUE@LoadPlugin serial #@BUILD_PLUGIN_SIGROK_TRUE@LoadPlugin sigrok +#@BUILD_PLUGIN_SMART_TRUE@LoadPlugin smart #@BUILD_PLUGIN_SNMP_TRUE@LoadPlugin snmp #@BUILD_PLUGIN_STATSD_TRUE@LoadPlugin statsd #@BUILD_PLUGIN_SWAP_TRUE@LoadPlugin swap @@@ -190,7 -183,6 +191,7 @@@ #@BUILD_PLUGIN_UUID_TRUE@LoadPlugin uuid #@BUILD_PLUGIN_VARNISH_TRUE@LoadPlugin varnish #@BUILD_PLUGIN_MIC_TRUE@LoadPlugin mic +#@BUILD_PLUGIN_VIRT_TRUE@LoadPlugin virt #@BUILD_PLUGIN_VMEM_TRUE@LoadPlugin vmem #@BUILD_PLUGIN_VSERVER_TRUE@LoadPlugin vserver #@BUILD_PLUGIN_WIRELESS_TRUE@LoadPlugin wireless @@@ -281,11 -273,6 +282,11 @@@ # TemperatureSensor "myserver/onewire-F10FCA000800/temperature" # +# +# ValuesPercentage false +# ReportDegraded +# + # # URL "http://localhost:8053/" # ParseTime false @@@ -312,8 -299,8 +313,8 @@@ # # -# ReportActive false # ReportByCpu true +# ReportByState true # ValuesPercentage false # # @@@ -327,15 -314,7 +328,15 @@@ # URL "http://finance.google.com/finance?q=NYSE%3AAMD" # User "foo" # Password "bar" +# Digest false +# VerifyPeer true +# VerifyHost true +# CACert "/path/to/ca.crt" +# Header "X-Custom-Header: foobar" +# Post "foo=bar" +# # MeasureResponseTime false +# MeasureResponseCode false # # Regex "]*> *([0-9]*\\.[0-9]+) *" # DSType "GaugeAverage" @@@ -382,12 -361,9 +383,12 @@@ # Instance "some_instance" # User "collectd" # Password "thaiNg0I" +# Digest false # VerifyPeer true # VerifyHost true # CACert "/path/to/ca.crt" +# Header "X-Custom-Header: foobar" +# Post "foo=bar" # # # Type "magic_level" @@@ -530,6 -506,18 +531,6 @@@ # # -# -# Connection "xen:///" -# RefreshInterval 60 -# Domain "name" -# BlockDevice "name:device" -# InterfaceDevice "name:device" -# IgnoreSelected false -# HostnameFormat name -# InterfaceFormat name -# PluginInstanceFormat name -# - # # ReportRelative true # @@@ -695,7 -683,6 +696,7 @@@ # Username "user" # Password "secret" # Interface "eth0" +# ResolveInterval 14400 @LOAD_PLUGIN_NETWORK@ # TimeToLive "128" # @@@ -706,7 -693,7 +707,7 @@@ # AuthFile "/etc/collectd/passwd" # Interface "eth0" # -# MaxPacketSize 1024 +# MaxPacketSize 1452 # # # proxy setup (client and server as above): # Forward true @@@ -768,6 -755,17 +769,17 @@@ # IgnoreSelected false # + # + # + # URL "ldap://localhost:389" + # StartTLS false + # VerifyHost true + # CACert "/path/to/ca.crt" + # Timeout -1 + # Version 3 + # + # + # # StatusFile "/etc/openvpn/openvpn-status.log" # ImprovedNamingSchema false @@@ -972,11 -970,6 +984,11 @@@ # # +# +# Disk "/^[hs]d[a-f][0-9]?$/" +# IgnoreSelected false +# + # # # Type "voltage" @@@ -1104,7 -1097,6 +1116,7 @@@ # # ListeningPorts false +# AllPortsSummary false # LocalPort "25" # RemotePort "25" # @@@ -1189,18 -1181,6 +1201,18 @@@ # # +# +# Connection "xen:///" +# RefreshInterval 60 +# Domain "name" +# BlockDevice "name:device" +# InterfaceDevice "name:device" +# IgnoreSelected false +# HostnameFormat name +# InterfaceFormat name +# PluginInstanceFormat name +# + # # Verbose false # @@@ -1233,7 -1213,6 +1245,7 @@@ # SSLVersion "TLSv1" # Format "Command" # StoreRates false +# BufferSize 4096 # # diff --combined src/collectd.conf.pod index 7da36b8c,9ca48b2a..69c922b0 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@@ -6,9 -6,9 +6,9 @@@ collectd.conf - Configuration for the s =head1 SYNOPSIS - BaseDir "/path/to/data/" - PIDFile "/path/to/pidfile/collectd.pid" - Server "123.123.123.123" 12345 + BaseDir "/var/lib/collectd" + PIDFile "/run/collectd.pid" + Interval 10.0 LoadPlugin cpu LoadPlugin load @@@ -16,9 -16,6 +16,9 @@@ Interval 3600 + + ValuesPercentage true + LoadPlugin ping @@@ -31,9 -28,7 +31,9 @@@ This config file controls how the system statistics collection daemon B behaves. The most significant option is B, which controls which plugins to load. These plugins ultimately define collectd's -behavior. +behavior. If the B option has been enabled, the explicit +B lines may be omitted for all plugins with a configuration block, +i.e. a CPluginE...E> block. The syntax of this config file is similar to the config file of the famous I webserver. Each line contains either an option (a key and a list of @@@ -60,9 -55,8 +60,9 @@@ indenting the wrapped lines The configuration is read and processed in order, i.e. from top to bottom. So the plugins are loaded in the order listed in this config file. It is a good idea to load any logging plugins first in order to catch messages from plugins -during configuration. Also, the C option B occur B -the appropriate CPlugin ...E> block. +during configuration. Also, unless B is enabled, the +B option I occur I the appropriate +CB ...E> block. =head1 GLOBAL OPTIONS @@@ -146,18 -140,6 +146,18 @@@ BPluginE...E> block act B statement. B statements are still required for plugins that don't provide any configuration, e.g. the I. +=item B B|B + +When set to B, various statistics about the I daemon will be +collected, with "collectd" as the I. Defaults to B. + +The "write_queue" I reports the number of elements currently +queued and the number of elements dropped off the queue by the +B/B mechanism. + +The "cache" I reports the number of elements in the value list +cache (the cache you can interact with using L). + =item B I [I] If I points to a file, includes that file. If I points to a @@@ -230,14 -212,6 +230,14 @@@ B You should set this once an I or know some serious RRDtool magic! (Assuming you're using the I or I plugin.) +=item B I + +Read plugin doubles interval between queries after each failed attempt +to get data. + +This options limits the maximum value of the interval. The default value is +B<86400>. + =item B I Consider a value list "missing" when no update has been read or received for @@@ -288,11 -262,8 +288,11 @@@ If B is set to non unset, the latter will default to half of B. If you do not want to randomly drop values when the queue size is between -I and I, set If B and -B to same value. +I and I, set B and B +to the same value. + +Enabling the B option is of great help to figure out the +values to set B and B to. =item B I @@@ -860,7 -831,7 +860,7 @@@ and are checked by default depends on t This plugin reads absolute air pressure using digital barometer sensor MPL115A2 or MPL3115 from Freescale (sensor attached to any I2C bus available in -the computer, for HW details see +the computer, for HW details see I or I). The sensor type - one fo these two - is detected automatically by the plugin @@@ -973,7 -944,7 +973,7 @@@ Temperature sensor which should be use When specified more sensors a minumum is found and uses each time. The temperature reading directly from this pressure sensor/plugin is typically not suitable as the pressure sensor -will be probably inside while we want outside temperature. +will be probably inside while we want outside temperature. The collectd reference name is something like /-/- ( is usually omitted when there is just single value type). @@@ -981,40 -952,6 +981,40 @@@ Or you can figure it out from the path =back +=head2 Plugin C + +The I reports the remaining capacity, power and voltage of +laptop batteries. + +=over 4 + +=item B B|B + +When enabled, remaining capacity is reported as a percentage, e.g. "42% +capacity remaining". Otherwise the capacity is stored as reported by the +battery, most likely in "Wh". This option does not work with all input methods, +in particular when only C is available on an old Linux system. +Defaults to B. + +=item B B|B + +Typical laptop batteries degrade over time, meaning the capacity decreases with +recharge cycles. The maximum charge of the previous charge cycle is tracked as +"last full capacity" and used to determine that a battery is "fully charged". + +When this option is set to B, the default, the I will +only report the remaining capacity. If the B option is +enabled, the relative remaining capacity is calculated as the ratio of the +"remaining capacity" and the "last full capacity". This is what most tools, +such as the status bar of desktop environments, also do. + +When set to B, the battery plugin will report three values: B +(remaining capacity), B (difference between "last full capacity" +and "remaining capacity") and B (difference between "design capacity" +and "last full capacity"). + +=back + =head2 Plugin C Starting with BIND 9.5.0, the most widely used DNS server software provides @@@ -1207,53 -1144,29 +1207,53 @@@ F instea =head2 Plugin C -The I collects CPU usage metrics. +The I collects CPU usage metrics. By default, CPU usage is reported +as Jiffies, using the C type. Two aggregations are available: + +=over 4 + +=item + +Sum, per-state, over all CPUs installed in the system; and + +=item + +Sum, per-CPU, over all non-idle states of a CPU, creating an "active" state. + +=back + +The two aggregations can be combined, leading to I only emitting a +single "active" metric for the entire system. As soon as one of these +aggregations (or both) is enabled, the I will report a percentage, +rather than Jiffies. In addition, you can request individual, per-state, +per-CPU metrics to be reported as percentage. The following configuration options are available: =over 4 -=item B B|B +=item B B|B -Reports non-idle CPU usage as the "active" value. Defaults to false. +When set to B, the default, reports per-state metrics, e.g. "system", +"user" and "idle". +When set to B, aggregates (sums) all I states into one +"active" metric. -=item B B|B +=item B B|B -When true reports usage for all cores. When false, reports cpu usage -aggregated over all cores. -Defaults to true. +When set to B, the default, reports per-CPU (per-core) metrics. +When set to B, instead of reporting metrics for individual CPUs, only a +global sum of CPU states is emitted. =item B B|B -When true report percentage usage instead of tick values. Defaults to false. +This option is only considered when both, B and B +are set to B. In this case, by default, metrics will be reported as +Jiffies. By setting this option to B, you can request percentage values +in the un-aggregated (per-CPU, per-state) mode as well. =back - =head2 Plugin C This plugin doesn't have any options. It reads @@@ -1296,16 -1209,6 +1296,16 @@@ finance page and dispatch the value to URL "http://finance.google.com/finance?q=NYSE%3AAMD" User "foo" Password "bar" + Digest false + VerifyPeer true + VerifyHost true + CACert "/path/to/ca.crt" + Header "X-Custom-Header: foobar" + Post "foo=bar" + + MeasureResponseTime false + MeasureResponseCode false + Regex "]*> *([0-9]*\\.[0-9]+) *" DSType "GaugeAverage" @@@ -1378,19 -1281,13 +1378,19 @@@ C) Measure response time for the request. If this setting is enabled, B blocks (see below) are optional. Disabled by default. +=item B B|B + +Measure response code for the request. If this setting is enabled, B +blocks (see below) are optional. Disabled by default. + =item BMatchE> One or more B blocks that define how to match information in the data returned by C. The C plugin uses the same infrastructure that's used by the C plugin, so please see the documentation of the C -plugin below on how matches are defined. If the B option -is set to B, B blocks are optional. +plugin below on how matches are defined. If the B or +B options are set to B, B blocks are +optional. =back @@@ -1513,8 -1410,6 +1513,8 @@@ The B uses B VerifyPeer true VerifyHost true CACert "/path/to/ca.crt" + Header "X-Custom-Header: foobar" + Post "foo=bar" Type "magic_level" @@@ -1810,7 -1705,7 +1810,7 @@@ There must be at least one B [I I ...] Names the columns whose content is used as metadata for the data sets -that are dispatched to the daemon. +that are dispatched to the daemon. The actual data type in the columns is not that important. The plugin will automatically cast the values to the right type if it know how to do that. So @@@ -2454,6 -2349,101 +2454,6 @@@ independent from the I argum =back -=head2 Plugin C - -This plugin allows CPU, disk and network load to be collected for virtualized -guests on the machine. This means that these characteristics can be collected -for guest systems without installing any software on them - collectd only runs -on the hosting system. The statistics are collected through libvirt -(L). - -Only I is required. - -=over 4 - -=item B I - -Connect to the hypervisor given by I. For example if using Xen use: - - Connection "xen:///" - -Details which URIs allowed are given at L. - -=item B I - -Refresh the list of domains and devices every I. The default is 60 -seconds. Setting this to be the same or smaller than the I will cause -the list of domains and devices to be refreshed on every iteration. - -Refreshing the devices in particular is quite a costly operation, so if your -virtualization setup is static you might consider increasing this. If this -option is set to 0, refreshing is disabled completely. - -=item B I - -=item B I - -=item B I - -=item B I|I - -Select which domains and devices are collected. - -If I is not given or I then only the listed domains and -disk/network devices are collected. - -If I is I then the test is reversed and the listed -domains and disk/network devices are ignored, while the rest are collected. - -The domain name and device names may use a regular expression, if the name is -surrounded by I and collectd was compiled with support for regexps. - -The default is to collect statistics for all domains and all their devices. - -Example: - - BlockDevice "/:hdb/" - IgnoreSelected "true" - -Ignore all I devices on any domain, but other block devices (eg. I) -will be collected. - -=item B B - -When the libvirt plugin logs data, it sets the hostname of the collected data -according to this setting. The default is to use the guest name as provided by -the hypervisor, which is equal to setting B. - -B means use the guest's UUID. This is useful if you want to track the -same guest across migrations. - -B means to use the global B setting, which is probably not -useful on its own because all guests will appear to have the same name. - -You can also specify combinations of these fields. For example B -means to concatenate the guest name and UUID (with a literal colon character -between, thus I<"foo:1234-1234-1234-1234">). - -=item B B|B
- -When the libvirt plugin logs interface data, it sets the name of the collected -data according to this setting. The default is to use the path as provided by -the hypervisor (the "dev" property of the target node), which is equal to -setting B. - -B
means use the interface's mac address. This is useful since the -interface path might change between reboots of a guest or across migrations. - -=item B B - -When the libvirt plugin logs data, it sets the plugin_instance of the collected -data according to this setting. The default is to use the guest name as provided -by the hypervisor, which is equal to setting B. - -B means use the guest's UUID. - -=back - =head2 Plugin C The I collects the system load. These numbers give a rough overview @@@ -3819,12 -3809,6 +3819,12 @@@ behavior is to let the kernel choose th that the manual selection of an interface for unicast traffic is only necessary in rare cases. +=item B I + +Sets the interval at which to re-resolve the DNS for the I. This is +useful to force a regular DNS lookup to support a high availability setup. If +not specified, re-resolves are never attempted. + =back =item BListen> I [I]B> @@@ -4245,6 -4229,70 +4245,70 @@@ short: If it works for you: Great! But change, though this is unlikely. Oh, and if you want to help improving this plugin, just send a short notice to the mailing list. ThanksE:) + =head2 Plugin C + + To use the C plugin you first need to configure the I + server correctly. The backend database C needs to be loaded and + working. See slapd-monitor(5) for the details. + + The configuration of the C plugin consists of one or more B + blocks. Each block requires one string argument as the instance name. For + example: + + + + URL "ldap://localhost/" + + + URL "ldaps://localhost/" + + + + The instance name will be used as the I. To emulate the old + (versionE4) behavior, you can use an empty string (""). In order for the + plugin to work correctly, each instance name must be unique. This is not + enforced by the plugin and it is your responsibility to ensure it is. + + The following options are accepted within each B block: + + =over 4 + + =item B I + + Sets the URL to use to connect to the I server. This option is + I. + + =item B B + + Defines whether TLS must be used when connecting to the I server. + Disabled by default. + + =item B B + + Enables or disables peer host name verification. If enabled, the plugin checks + if the C or a C field of the SSL + certificate matches the host name provided by the B option. If this + identity check fails, the connection is aborted. Enabled by default. + + =item B I + + File that holds one or more SSL certificates. If you want to use TLS/SSL you + may possibly need this option. What CA certificates are checked by default + depends on the distribution you use and can be changed with the usual ldap + client configuration mechanisms. See ldap.conf(5) for the details. + + =item B I + + Sets the timeout value for ldap operations. Defaults to B<-1> which results in + an infinite timeout. + + =item B I + + An integer which sets the LDAP protocol version number to use when connecting + to the I server. Defaults to B<3> for using I. + + =back + =head2 Plugin C The OpenVPN plugin reads a status file maintained by OpenVPN and gathers @@@ -5639,40 -5687,6 +5703,40 @@@ measurements are discarded =back +=head2 Plugin C + +The C plugin collects SMART information from physical +disks. Values collectd include temperature, power cycle count, poweron +time and bad sectors. Also, all SMART attributes are collected along +with the normalized current value, the worst value, the threshold and +a human readable value. + +Using the following two options you can ignore some disks or configure the +collection only of specific disks. + +=over 4 + +=item B I + +Select the disk I. Whether it is collected or ignored depends on the +B setting, see below. As with other plugins that use the +daemon's ignorelist functionality, a string that starts and ends with a slash +is interpreted as a regular expression. Examples: + + Disk "sdd" + Disk "/hda[34]/" + +=item B B|B + +Sets whether selected disks, i.Ee. the ones matches by any of the B +statements, are ignored or if all other disks are ignored. The behavior +(hopefully) is intuitive: If no B option is configured, all disks are +collected. If at least one B option is given and no B or +set to B, B matching disks will be collected. If B +is set to B, all disks are collected B the ones matched. + +=back + =head2 Plugin C Since the configuration of the C is a little more complicated than @@@ -6210,11 -6224,6 +6274,11 @@@ connections a mail server or news serve how many connections a web proxy holds to web servers. You have to give the port in numeric form. +=item B I|I + +If this option is set to I a summary of statistics from all connections +are collectd. This option defaults to I. + =back =head2 Plugin C @@@ -6472,101 -6481,6 +6536,101 @@@ Collect statistics about worker threads =back +=head2 Plugin C + +This plugin allows CPU, disk and network load to be collected for virtualized +guests on the machine. This means that these metrics can be collected for guest +systems without installing any software on them - I only runs on the +host system. The statistics are collected through libvirt +(L). + +Only I is required. + +=over 4 + +=item B I + +Connect to the hypervisor given by I. For example if using Xen use: + + Connection "xen:///" + +Details which URIs allowed are given at L. + +=item B I + +Refresh the list of domains and devices every I. The default is 60 +seconds. Setting this to be the same or smaller than the I will cause +the list of domains and devices to be refreshed on every iteration. + +Refreshing the devices in particular is quite a costly operation, so if your +virtualization setup is static you might consider increasing this. If this +option is set to 0, refreshing is disabled completely. + +=item B I + +=item B I + +=item B I + +=item B B|B + +Select which domains and devices are collected. + +If I is not given or B then only the listed domains and +disk/network devices are collected. + +If I is B then the test is reversed and the listed +domains and disk/network devices are ignored, while the rest are collected. + +The domain name and device names may use a regular expression, if the name is +surrounded by I and collectd was compiled with support for regexps. + +The default is to collect statistics for all domains and all their devices. + +Example: + + BlockDevice "/:hdb/" + IgnoreSelected "true" + +Ignore all I devices on any domain, but other block devices (eg. I) +will be collected. + +=item B B + +When the virt plugin logs data, it sets the hostname of the collected data +according to this setting. The default is to use the guest name as provided by +the hypervisor, which is equal to setting B. + +B means use the guest's UUID. This is useful if you want to track the +same guest across migrations. + +B means to use the global B setting, which is probably not +useful on its own because all guests will appear to have the same name. + +You can also specify combinations of these fields. For example B +means to concatenate the guest name and UUID (with a literal colon character +between, thus I<"foo:1234-1234-1234-1234">). + +=item B B|B
+ +When the virt plugin logs interface data, it sets the name of the collected +data according to this setting. The default is to use the path as provided by +the hypervisor (the "dev" property of the target node), which is equal to +setting B. + +B
means use the interface's mac address. This is useful since the +interface path might change between reboots of a guest or across migrations. + +=item B B + +When the virt plugin logs data, it sets the plugin_instance of the collected +data according to this setting. The default is to use the guest name as provided +by the hypervisor, which is equal to setting B. + +B means use the guest's UUID. + +=back + =head2 Plugin C The C plugin collects information about the usage of virtual memory. @@@ -6791,9 -6705,8 +6855,9 @@@ want to use authentication all three fi =head2 Plugin C -This output plugin submits values to an http server by POST them using the -PUTVAL plain-text protocol. Each destination you want to post data to needs to +This output plugin submits values to an HTTP server using POST requests and +encoding metrics with JSON or using the C command described in +L. Each destination you want to post data to needs to have one B block, within which the destination can be configured further, for example by specifying authentication data. @@@ -6803,7 -6716,6 +6867,7 @@@ Synopsis User "collectd" Password "weCh3ik0" + Format JSON @@@ -6877,16 -6789,8 +6941,16 @@@ Defaults to B =item B B If set to B, convert counter values to rates. If set to B (the -default) counter values are stored as is, i.Ee. as an increasing integer -number. +default) counter values are stored as is, i.e. as an increasing integer number. + +=item B I + +Sets the send buffer size to I. By increasing this buffer, less HTTP +requests will be generated, but more metrics will be batched / metrics are +cached for longer before being sent, introducing additional delay until they +are available on the server side. I must be at least 1024 and cannot +exceed the size of an C, i.e. 2EGByte. +Defaults to C<4096>. =back @@@ -6939,7 -6843,7 +7003,7 @@@ If set to B, the values are encod an easy and straight forward exchange format. If set to B, values are encoded in the I format, which is -" \n". +CmetricE EvalueE EtimestampE\n>. =item B B|B @@@ -6953,24 -6857,22 +7017,24 @@@ been set to B =item B (B=I only) -A prefix can be added in the metric name when outputting in the I format. -It's added before the I name. -Metric name will be "" +A prefix can be added in the metric name when outputting in the I +format. It's added before the I name. +Metric name will be +CprefixEEhostEEpostfixEEpluginEEtypeEEnameE> =item B (B=I only) -A postfix can be added in the metric name when outputting in the I format. -It's added after the I name. -Metric name will be "" +A postfix can be added in the metric name when outputting in the I +format. It's added after the I name. +Metric name will be +CprefixEEhostEEpostfixEEpluginEEtypeEEnameE> =item B (B=I only) Specify a character to replace dots (.) in the host part of the metric name. In I metric name, dots are used as separators between different metric parts (host, plugin, type). -Default is "_" (I). +Default is C<_> (I). =item B B|B @@@ -7044,20 -6946,6 +7108,20 @@@ Service name or port number to connect Specify the protocol to use when communicating with I. Defaults to B. +=item B B|B + +If set to B and B is set to B, +events will be batched in memory and flushed at +regular intervals or when B is exceeded. + +Notifications are not batched and sent as soon as possible. + +Defaults to false + +=item B I + +Maximum payload size for a riemann packet. Defaults to 8192 + =item B B|B If set to B (the default), convert counter values to rates. If set to