Merge branch 'collectd-4.8'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 17 Sep 2009 06:53:05 +0000 (08:53 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 17 Sep 2009 06:53:05 +0000 (08:53 +0200)
configure.in
contrib/collection3/etc/collection.conf
contrib/collection3/lib/Collectd/Graph/Common.pm
contrib/collection3/lib/Collectd/Graph/Type.pm
contrib/collection3/lib/Collectd/Graph/Type/JavaMemory.pm
src/Makefile.am

index f93f4fc..0343acd 100644 (file)
@@ -1448,8 +1448,8 @@ AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to l
                with_libiptc="yes"
        else if test "x$withval" != "xno" && test "x$withval" != "xyes"
        then
-               LDFLAGS="$LDFLAGS -L$withval/lib"
-               CPPFLAGS="$CPPFLAGS -I$withval/include"
+               LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS -I$withval/include"
+               LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS -L$withval/lib"
                with_libiptc="yes"
        else
                with_libiptc="$withval"
@@ -1487,8 +1487,8 @@ then
 fi
 if test "x$with_libiptc" = "xyes"
 then
-       SAVE_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $KERNEL_CFLAGS"
+       SAVE_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
 
        AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [],
        [
@@ -1499,18 +1499,12 @@ then
 #include "$srcdir/src/owniptc/ipt_kernel_headers.h"
        ])
 
-       CFLAGS="$SAVE_CFLAGS"
-fi
-AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
-AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
-if test "x$with_own_libiptc" = "xyes"
-then
-       AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
+       CPPFLAGS="$SAVE_CPPFLAGS"
 fi
 if test "x$with_libiptc" = "xyes"
 then
-       SAVE_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS $KERNEL_CFLAGS"
+       SAVE_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
 
        AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [],
        [
@@ -1523,7 +1517,20 @@ then
 #endif
        ])
 
-       CFLAGS="$SAVE_CFLAGS"
+       CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
+AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
+if test "x$with_libiptc" = "xyes"
+then
+       BUILD_WITH_LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS"
+       BUILD_WITH_LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS"
+       AC_SUBST(BUILD_WITH_LIBIPTC_CPPFLAGS)
+       AC_SUBST(BUILD_WITH_LIBIPTC_LDFLAGS)
+fi
+if test "x$with_own_libiptc" = "xyes"
+then
+       AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
 fi
 # }}}
 
index f15ea56..1322d0d 100644 (file)
@@ -161,7 +161,7 @@ GraphWidth 400
   DSName "read Read "
   DSName write Write
   RRDTitle "Disk Latency for {plugin_instance}"
-  RRDVerticalLabel "microseconds"
+  RRDVerticalLabel "seconds"
   Scale 0.000001
   RRDFormat "%5.1lf %ss"
 </Type>
@@ -327,6 +327,13 @@ GraphWidth 400
 # RRDOptions ...
   RRDFormat "%5.1lf%s"
 </Type>
+<Type invocations>
+  DataSources value
+  DSName "value Invocations/s"
+  RRDTitle "Invocations ({instance})"
+  RRDVerticalLabel "Invocations/s"
+  RRDFormat "%5.1lf"
+</Type>
 <Type io_octets>
   Module GenericIO
   DataSources rx tx
@@ -614,6 +621,20 @@ GraphWidth 400
   RRDVerticalLabel "°Celsius"
   RRDFormat "%4.1lf°C"
 </Type>
+<Type threads>
+  DataSources value
+  DSName "value Threads"
+  RRDTitle "Threads ({instance})"
+  RRDVerticalLabel "Threads"
+  RRDFormat "%5.2lf"
+</Type>
+<Type total_requests>
+  DataSources value
+  DSName "value Requests/s"
+  RRDTitle "Requests ({instance})"
+  RRDVerticalLabel "Requests/s"
+  RRDFormat "%6.2lf"
+</Type>
 <Type total_time_in_ms>
   DataSources value
   DSName "value Time"
index 6019edb..f88c22b 100644 (file)
@@ -265,6 +265,7 @@ sub get_all_hosts
   {
     next if ($entry =~ m/^\./);
     next if (!-d "$data_dir/$entry");
+    next if (!-r "$data_dir/$entry" or !-x "$data_dir/$entry");
     push (@ret, sanitize_hostname ($entry));
   }
   closedir ($dh);
index 01c2417..81add72 100644 (file)
@@ -250,7 +250,11 @@ sub getTitle
   my $type_instance = $ident->{'type_instance'};
   my $instance;
 
-  if (defined $type_instance)
+  if ((defined $type_instance) && (defined $plugin_instance))
+  {
+    $instance = "$plugin_instance/$type_instance";
+  }
+  elsif (defined $type_instance)
   {
     $instance = $type_instance;
   }
index 832b136..0da2988 100644 (file)
@@ -92,6 +92,10 @@ sub getRRDArgs
   {
     push (@ret, '-v', $obj->{'rrd_vertical'});
   }
+  else
+  {
+    push (@ret, '-v', "Bytes");
+  }
 
   for (@$idents)
   {
index 6d01b8a..54befad 100644 (file)
@@ -371,7 +371,8 @@ endif # BUILD_PLUGIN_INTERFACE
 if BUILD_PLUGIN_IPTABLES
 pkglib_LTLIBRARIES += iptables.la
 iptables_la_SOURCES = iptables.c
-iptables_la_LDFLAGS = -module -avoid-version
+iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
+iptables_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBIPTC_LDFLAGS)
 if BUILD_WITH_OWN_LIBIPTC
 iptables_la_LIBADD  = owniptc/libiptc.la
 iptables_la_DEPENDENCIES = owniptc/libiptc.la