summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e968962)
raw | patch | inline | side by side (parent: e968962)
author | Chad Malfait <cmalfait@yahoo.com> | |
Sat, 6 Apr 2013 04:56:29 +0000 (22:56 -0600) | ||
committer | Chad Malfait <cmalfait@yahoo.com> | |
Sat, 6 Apr 2013 04:56:29 +0000 (22:56 -0600) |
configure.in | patch | blob | history | |
src/Makefile.am | patch | blob | history | |
src/collectd.conf.in | patch | blob | history |
diff --git a/configure.in b/configure.in
index e2110b58be928694b610bcb49454921c0d3d4c3d..6a48e4e50dc8ec9d5a0d78583afb9139f3e19a90 100644 (file)
--- a/configure.in
+++ b/configure.in
AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
# }}}
+# --with-liblvm2app {{{
+with_liblvm2app_cppflags=""
+with_liblvm2app_ldflags=""
+AC_ARG_WITH(liblvm2app, [AS_HELP_STRING([--with-liblvm2app@<:@=PREFIX@:>@], [Path to liblvm2app.])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ with_liblvm2app_cppflags="-I$withval/include"
+ with_liblvm2app_ldflags="-L$withval/lib"
+ with_liblvm2app="yes"
+ else
+ with_liblvm2app="$withval"
+ fi
+],
+[
+ with_liblvm2app="yes"
+])
+if test "x$with_liblvm2app" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags"
+
+ AC_CHECK_HEADERS(lvm2app.h, [with_liblvm2app="yes"], [with_liblvm2app="no (lvm2app.h not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+
+if test "x$with_liblvm2app" = "xyes"
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ SAVE_LDFLAGS="$LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags"
+ LDFLAGS="$LDFLAGS $with_liblvm2app_ldflags"
+
+ AC_CHECK_LIB(liblvm2app, lvm_init[with_liblvm2app="yes"], [with_liblvm2app="no (Symbol 'lvm_init' not found)"])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
+fi
+if test "x$with_liblvm2app" = "xyes"
+then
+ BUILD_WITH_LIBLVM2APP_CPPFLAGS="$with_liblvm2app_cppflags"
+ BUILD_WITH_LIBLVM2APP_LDFLAGS="$with_liblvm2app_ldflags"
+ BUILD_WITH_LIBLVM2APP_LIBS="-llvm2app"
+ AC_SUBST(BUILD_WITH_LIBLVM2APP_CPPFLAGS)
+ AC_SUBST(BUILD_WITH_LIBLVM2APP_LDFLAGS)
+ AC_SUBST(BUILD_WITH_LIBLVM2APP_LIBS)
+ AC_DEFINE(HAVE_LIBLVM2APP, 1, [Define if liblvm2app is present and usable.])
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBLVM2APP, test "x$with_liblvm2app" = "xyes")
+# }}}
+
# --with-libmemcached {{{
with_libmemcached_cppflags=""
with_libmemcached_ldflags=""
plugin_users="no"
plugin_uptime="no"
plugin_vmem="no"
+plugin_volume="no"
plugin_vserver="no"
plugin_wireless="no"
plugin_zfs_arc="no"
plugin_thermal="yes"
plugin_uptime="yes"
plugin_vmem="yes"
+ plugin_volume="yes"
plugin_vserver="yes"
plugin_wireless="yes"
AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
AC_PLUGIN([varnish], [$with_libvarnish], [Varnish cache statistics])
AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
+AC_PLUGIN([volume], [$with_liblvm2app], [Volume statistics])
AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
AC_PLUGIN([write_graphite], [yes], [Graphite / Carbon output plugin])
uuid . . . . . . . . $enable_uuid
varnish . . . . . . . $enable_varnish
vmem . . . . . . . . $enable_vmem
+ volume . . . . . . . $enable_volume
vserver . . . . . . . $enable_vserver
wireless . . . . . . $enable_wireless
write_graphite . . . $enable_write_graphite
diff --git a/src/Makefile.am b/src/Makefile.am
index 34012a7f1bb1463caead9675a9f15eda678a6d47..0f28478f401e1710d829945b05d9c3d5841deae6 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
collectd_DEPENDENCIES += vmem.la
endif
+if BUILD_PLUGIN_VOLUME
+pkglib_LTLIBRARIES += volume.la
+volume_la_SOURCES = volume.c
+volume_la_LDFLAGS = -module -avoid-version
+volume_la_LIBADD = -llvm2app
+collectd_LDADD += "-dlopen" volume.la
+collectd_DEPENDENCIES += volume.la
+endif
+
if BUILD_PLUGIN_VSERVER
pkglib_LTLIBRARIES += vserver.la
vserver_la_SOURCES = vserver.c
diff --git a/src/collectd.conf.in b/src/collectd.conf.in
index 5af15684092acb486b57d90023f7203da1a9abaa..ecc45c9ab9bd9320db6b68fa8a8fb9b63042566a 100644 (file)
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
#@BUILD_PLUGIN_VARNISH_TRUE@LoadPlugin varnish
#@BUILD_PLUGIN_VMEM_TRUE@LoadPlugin vmem
#@BUILD_PLUGIN_VSERVER_TRUE@LoadPlugin vserver
+#@BUILD_PLUGIN_VOLUME_TRUE@LoadPlugin volume
#@BUILD_PLUGIN_WIRELESS_TRUE@LoadPlugin wireless
#@BUILD_PLUGIN_WRITE_GRAPHITE_TRUE@LoadPlugin write_graphite
#@BUILD_PLUGIN_WRITE_HTTP_TRUE@LoadPlugin write_http