+2010-01-14, Version 4.9.1
+ * Documentation: Some manpage fixes.
+ * Default config: Added sample configuration for missing plugins.
+ * apache plugin: Fix a segmentation fault in the config handling of
+ VerifyPeer / VerifyHost. Thanks to "plazmus" for his or her patch.
+ * processes plugin: Fix handling of derive data sources.
+ * rrdtool plugin: Fix a bug with random write timeouts. Due to an
+ incorrect initialization some files may be suspended basically
+ indefinitely. After flushing the files they were written regularly
+ again.
+ * routeros plugin: Use the node name for the "host" field.
+ * Monitorus.pm: Put the plugin into the "Collectd::Plugins" namespace.
+ * Perl bindings: Fix a warning that was printed when building
+ debugging output.
+
2009-12-21, Version 4.9.0
* contextswitch plugin: The new ContextSwitch plugin gathers the
number of context switches done by the CPU. Thanks to Patrik
* scale target: This target to scale (multiply) values by an arbitrary
value has been added.
+2010-01-14, Version 4.8.3
+ * Documentation: Some manpage fixes.
+ * rrdtool plugin: Fix a bug with random write timeouts. Due to an
+ incorrect initialization some files may be suspended basically
+ indefinitely. After flushing the files they were written regularly
+ again.
+
2009-12-18, Version 4.8.2
* Build system, java plugin: Don't use “find -L” to search for Java
headers, because it's a GNU extension.
src/battery.c: commend not working code.
Wishlist:
-* Update the RPM specfile to
- - build `collectd-apache'
- - be free of syntax errors.
* Port nfs module to solaris
* Port tape module to Linux
* Port the apple_sensors plugin to Linux/PPC.
java-build-stamp: org/collectd/api/*.java
$(JAVAC) -d "." "$(srcdir)/org/collectd/api"/*.java
$(JAVAC) -d "." "$(srcdir)/org/collectd/java"/*.java
+ mkdir -p .libs
+ $(JAR) cf .libs/collectd-api.jar "org/collectd/api"/*.class
+ $(JAR) cf .libs/generic-jmx.jar "org/collectd/java"/*.class
touch "$@"
all-local: java-build-stamp
install-exec-local: java-build-stamp
- mkdir -p "$(DESTDIR)$(pkgdatadir)/java/org/collectd/api"
- $(INSTALL) -m 644 "org/collectd/api"/*.class \
- "$(DESTDIR)$(pkgdatadir)/java/org/collectd/api/"
- mkdir -p "$(DESTDIR)$(pkgdatadir)/java/org/collectd/java"
- $(INSTALL) -m 644 "org/collectd/java"/*.class \
- "$(DESTDIR)$(pkgdatadir)/java/org/collectd/java/"
+ mkdir -p "$(DESTDIR)$(pkgdatadir)/java"
+ $(INSTALL) -m 644 .libs/collectd-api.jar \
+ "$(DESTDIR)$(pkgdatadir)/java"
+ $(INSTALL) -m 644 .libs/generic-jmx.jar \
+ "$(DESTDIR)$(pkgdatadir)/java"
clean-local:
rm -f "org/collectd/api"/*.class
rm -f "org/collectd/java"/*.class
+ rm -f .libs
rm -f "java-build-stamp"
with_java_cflags=""
with_java_libs=""
JAVAC="$JAVAC"
+JAR="$JAR"
AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])],
[
if test "x$withval" = "xno"
AC_MSG_RESULT([not found])
fi
fi
+ if test "x$JAR" = "x"
+ then
+ AC_MSG_CHECKING([for jar])
+ TMPDIR=`find "$with_java_home" -name jar -type f | head -n 1`
+ if test "x$TMPDIR" != "x"
+ then
+ JAR="$TMPDIR"
+ AC_MSG_RESULT([$JAR])
+ else
+ AC_MSG_RESULT([not found])
+ fi
+ fi
else if test "x$with_java_home" != "x"
then
AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home])
then
with_java="no (javac not found)"
fi
+if test "x$JAR" = "x"
+then
+ with_jar_path="$PATH"
+ if test "x$with_java_home" != "x"
+ then
+ with_jar_path="$with_java_home:$with_jar_path"
+ if test -d "$with_java_home/bin"
+ then
+ with_jar_path="$with_java_home/bin:$with_jar_path"
+ fi
+ fi
+
+ AC_PATH_PROG(JAR, jar, [], "$with_jar_path")
+fi
+if test "x$JAR" = "x"
+then
+ with_java="no (jar not found)"
+fi
SAVE_CPPFLAGS="$CPPFLAGS"
SAVE_CFLAGS="$CFLAGS"
our $Config = "/etc/collection.conf";
our @DataDirs = ();
+our @DontShowTypes = ();
our $LibDir;
our $ValidTimespan =
$value =~ s#/*$##;
$LibDir = $value;
}
+ elsif ($key eq 'dontshowtype')
+ {
+ push (@DontShowTypes, $value);
+ }
else
{
print STDERR "Unknown key: $key\n";
my $name = "$_";
$name =~ s/\.rrd$//i;
my ($type, $instance) = split (m/-/, $name, 2);
+ if (grep { $_ eq $type } @DontShowTypes) { next; }
$types{$type} = [] if (!$types{$type});
push (@{$types{$type}}, $instance) if (defined ($instance));
}
#!/usr/bin/perl
+#
+# collectd - contrib/exec-munin.px
+# Copyright (C) 2007,2008 Florian Forster
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; only version 2 of the License is applicable.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Authors:
+# Florian octo Forster <octo at verplant.org>
+#
+
use strict;
use warnings;
+
+%define with_java %(test -z "$JAVA_HOME" ; echo $?)
+
Summary: Statistics collection daemon for filling RRD files.
Name: collectd
-Version: 4.3.1
-Release: 0.centos5
+Version: 4.9.0
+Release: 1%{?dist}
Source: http://collectd.org/files/%{name}-%{version}.tar.gz
License: GPL
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildPrereq: lm_sensors-devel, mysql-devel, rrdtool-devel, curl-devel, libpcap-devel, net-snmp-devel, libstatgrab-devel, mysql-devel, libxml2-devel, libiptcdata-devel
+BuildPrereq: lm_sensors-devel, rrdtool-devel, libpcap-devel, net-snmp-devel, libstatgrab-devel, libxml2-devel, libiptcdata-devel
+# libcurl deps
+BuildPrereq: curl-devel,libidn-devel,openssl-devel
Requires: rrdtool, perl-Regexp-Common, libstatgrab
Packager: RightScale <support@rightscale.com>
Vendor: collectd development team <collectd@verplant.org>
system. Also, the statistics are very fine grained since the files are updated
every 10 seconds.
+
%package apache
Summary: apache-plugin for collectd.
Group: System Environment/Daemons
%description snmp
This plugin for collectd allows querying of network equipment using SNMP.
+%if %with_java
+%package java
+Summary: java-module for collectd.
+Group: System Environment/Daemons
+Requires: collectd = %{version}, jdk >= 1.6
+BuildPrereq: jdk >= 1.6
+%description java
+This plugin for collectd allows plugins to be written in Java and executed
+in an embedded JVM.
+%endif
+
%prep
rm -rf $RPM_BUILD_ROOT
%setup
%build
-./configure CFLAGS=-"DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL'" --prefix=%{_prefix} --sbindir=%{_sbindir} --mandir=%{_mandir} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --enable-apache --enable-email --enable-mysql --enable-dns
+./configure CFLAGS=-"DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL'" --prefix=%{_prefix} --sbindir=%{_sbindir} --mandir=%{_mandir} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} \
+ %{!?with_java:"--with-java=$JAVA_HOME --enable-java"} \
+ --disable-battery
make
%install
mkdir -p $RPM_BUILD_ROOT/var/lib/collectd
### Clean up docs
find contrib/ -type f -exec %{__chmod} a-x {} \;
+
###Modify Config for Redhat Based Distros
-cp contrib/redhat/collectd.conf $RPM_BUILD_ROOT/etc/collectd.conf
sed -i 's:#BaseDir "/usr/var/lib/collectd":BaseDir "/var/lib/collectd":' $RPM_BUILD_ROOT/etc/collectd.conf
sed -i 's:#PIDFile "/usr/var/run/collectd.pid":PIDFile "/var/run/collectd.pid":' $RPM_BUILD_ROOT/etc/collectd.conf
-sed -i 's:#PluginDir "/usr/lib/collectd":PluginDir "/usr/lib/collectd":' $RPM_BUILD_ROOT/etc/collectd.conf
+sed -i 's:#PluginDir "/usr/lib/collectd":PluginDir "%{_libdir}/collectd":' $RPM_BUILD_ROOT/etc/collectd.conf
sed -i 's:#TypesDB "/usr/share/collectd/types.db":TypesDB "/usr/share/collectd/types.db":' $RPM_BUILD_ROOT/etc/collectd.conf
-sed -i 's:#Interval 10:Interval 10:' $RPM_BUILD_ROOT/etc/collectd.conf
+sed -i 's:#Interval 10:Interval 30:' $RPM_BUILD_ROOT/etc/collectd.conf
sed -i 's:#ReadThreads 5:ReadThreads 5:' $RPM_BUILD_ROOT/etc/collectd.conf
+###Include broken out config directory
+echo -e '\nInclude "/etc/collectd.d"' >> $RPM_BUILD_ROOT/etc/collectd.conf
+
##Move config contribs
cp contrib/redhat/apache.conf $RPM_BUILD_ROOT/etc/collectd.d/apache.conf
cp contrib/redhat/email.conf $RPM_BUILD_ROOT/etc/collectd.d/email.conf
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README contrib/
-%attr(0644,root,root) %config(noreplace) /etc/collectd.conf
+%config %attr(0644,root,root) /etc/collectd.conf
%attr(0755,root,root) /etc/rc.d/init.d/collectd
%attr(0755,root,root) /var/www/cgi-bin/collection.cgi
%attr(0755,root,root) %{_sbindir}/collectd
%attr(0644,root,root) %{_mandir}/man5/*
%dir /etc/collectd.d
-%attr(0644,root,root) %{_libdir}/%{name}/apcups.so*
-%attr(0644,root,root) %{_libdir}/%{name}/apcups.la
-
-#%attr(0644,root,root) %{_libdir}/%{name}/apple_sensors.so*
-#%attr(0644,root,root) %{_libdir}/%{name}/apple_sensors.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/battery.so*
-%attr(0644,root,root) %{_libdir}/%{name}/battery.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/conntrack.so*
-%attr(0644,root,root) %{_libdir}/%{name}/conntrack.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/cpufreq.so*
-%attr(0644,root,root) %{_libdir}/%{name}/cpufreq.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/cpu.so*
-%attr(0644,root,root) %{_libdir}/%{name}/cpu.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/csv.so*
-%attr(0644,root,root) %{_libdir}/%{name}/csv.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/df.so*
-%attr(0644,root,root) %{_libdir}/%{name}/df.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/disk.so*
-%attr(0644,root,root) %{_libdir}/%{name}/disk.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/dns.so*
-%attr(0644,root,root) %{_libdir}/%{name}/dns.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/entropy.so*
-%attr(0644,root,root) %{_libdir}/%{name}/entropy.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/exec.so*
-%attr(0644,root,root) %{_libdir}/%{name}/exec.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/hddtemp.so*
-%attr(0644,root,root) %{_libdir}/%{name}/hddtemp.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/interface.so*
-%attr(0644,root,root) %{_libdir}/%{name}/interface.la
-
-#%attr(0644,root,root) %{_libdir}/%{name}/iptables.so*
-#%attr(0644,root,root) %{_libdir}/%{name}/iptables.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/irq.so*
-%attr(0644,root,root) %{_libdir}/%{name}/irq.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/load.so*
-%attr(0644,root,root) %{_libdir}/%{name}/load.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/logfile.so*
-%attr(0644,root,root) %{_libdir}/%{name}/logfile.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/mbmon.so
-%attr(0644,root,root) %{_libdir}/%{name}/mbmon.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/memcached.so*
-%attr(0644,root,root) %{_libdir}/%{name}/memcached.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/memory.so*
-%attr(0644,root,root) %{_libdir}/%{name}/memory.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/multimeter.so*
-%attr(0644,root,root) %{_libdir}/%{name}/multimeter.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/network.so*
-%attr(0644,root,root) %{_libdir}/%{name}/network.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/nfs.so*
-%attr(0644,root,root) %{_libdir}/%{name}/nfs.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/ntpd.so*
-%attr(0644,root,root) %{_libdir}/%{name}/ntpd.la
-
-#%attr(0644,root,root) %{_libdir}/%{name}/nut.so*
-#%attr(0644,root,root) %{_libdir}/%{name}/nut.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/perl.so*
-%attr(0644,root,root) %{_libdir}/%{name}/perl.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/ping.so*
-%attr(0644,root,root) %{_libdir}/%{name}/ping.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/processes.so*
-%attr(0644,root,root) %{_libdir}/%{name}/processes.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/rrdtool.so*
-%attr(0644,root,root) %{_libdir}/%{name}/rrdtool.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/serial.so*
-%attr(0644,root,root) %{_libdir}/%{name}/serial.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/swap.so*
-%attr(0644,root,root) %{_libdir}/%{name}/swap.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/syslog.so*
-%attr(0644,root,root) %{_libdir}/%{name}/syslog.la
-
-#%attr(0644,root,root) %{_libdir}/%{name}/tape.so*
-#%attr(0644,root,root) %{_libdir}/%{name}/tape.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/tcpconns.so*
-%attr(0644,root,root) %{_libdir}/%{name}/tcpconns.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/unixsock.so*
-%attr(0644,root,root) %{_libdir}/%{name}/unixsock.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/users.so*
-%attr(0644,root,root) %{_libdir}/%{name}/users.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/uuid.so*
-%attr(0644,root,root) %{_libdir}/%{name}/uuid.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/vserver.so*
-%attr(0644,root,root) %{_libdir}/%{name}/vserver.la
-
-%attr(0644,root,root) %{_libdir}/%{name}/wireless.so*
-%attr(0644,root,root) %{_libdir}/%{name}/wireless.la
+# client
+%attr(0644,root,root) /usr/include/collectd/client.h
+%attr(0644,root,root) /usr/include/collectd/lcc_features.h
+
+%attr(0644,root,root) %{_libdir}/libcollectdclient.*
+%attr(0644,root,root) %{_libdir}/pkgconfig/libcollectdclient.pc
+
+# macro to grab binaries for a plugin, given a name
+%define plugin_macro() \
+%attr(0644,root,root) %{_libdir}/%{name}/%1.a \
+%attr(0644,root,root) %{_libdir}/%{name}/%1.so* \
+%attr(0644,root,root) %{_libdir}/%{name}/%1.la
+
+%plugin_macro apcups
+%plugin_macro ascent
+%plugin_macro bind
+%plugin_macro conntrack
+%plugin_macro contextswitch
+%plugin_macro cpufreq
+%plugin_macro cpu
+%plugin_macro csv
+%plugin_macro curl
+%plugin_macro df
+%plugin_macro disk
+%plugin_macro dns
+%plugin_macro entropy
+%plugin_macro email
+%plugin_macro exec
+%plugin_macro filecount
+%plugin_macro fscache
+%plugin_macro hddtemp
+%plugin_macro interface
+%plugin_macro iptables
+%plugin_macro irq
+%plugin_macro load
+%plugin_macro logfile
+%plugin_macro madwifi
+
+%plugin_macro match_empty_counter
+%plugin_macro match_hashed
+%plugin_macro match_regex
+%plugin_macro match_timediff
+%plugin_macro match_value
+
+%plugin_macro mbmon
+%plugin_macro memcached
+%plugin_macro memory
+%plugin_macro multimeter
+%plugin_macro network
+%plugin_macro nfs
+%plugin_macro ntpd
+%plugin_macro openvpn
+%plugin_macro olsrd
+%plugin_macro perl
+%plugin_macro powerdns
+%plugin_macro processes
+%plugin_macro protocols
+%plugin_macro python
+%plugin_macro rrdtool
+%plugin_macro serial
+%plugin_macro sensors
+%plugin_macro swap
+%plugin_macro syslog
+%plugin_macro table
+%plugin_macro tail
+
+%plugin_macro target_notification
+%plugin_macro target_replace
+%plugin_macro target_scale
+%plugin_macro target_set
+
+%plugin_macro tcpconns
+%plugin_macro teamspeak2
+%plugin_macro ted
+%plugin_macro thermal
+%plugin_macro unixsock
+%plugin_macro uptime
+%plugin_macro users
+%plugin_macro uuid
+%plugin_macro vmem
+%plugin_macro vserver
+%plugin_macro wireless
+%plugin_macro write_http
%attr(0644,root,root) %{_datadir}/%{name}/types.db
%exclude %{_libdir}/perl5/5.8.8/%{_arch}-linux-thread-multi/perllocal.pod
-%attr(0644,root,root) %{_libdir}/perl5/site_perl/5.8.8/Collectd.pm
-%attr(0644,root,root) %{_libdir}/perl5/site_perl/5.8.8/Collectd/Unixsock.pm
%attr(0644,root,root) %{_libdir}/perl5/site_perl/5.8.8/%{_arch}-linux-thread-multi/auto/Collectd/.packlist
+%attr(0644,root,root) /usr/lib/perl5/site_perl/5.8.8/Collectd.pm
+%attr(0644,root,root) /usr/lib/perl5/site_perl/5.8.8/Collectd/Unixsock.pm
+%attr(0644,root,root) /usr/lib/perl5/site_perl/5.8.8/Collectd/Plugins/OpenVZ.pm
%attr(0644,root,root) /usr/share/man/man3/Collectd::Unixsock.3pm.gz
+%exclude /usr/share/collectd/postgresql_default.conf
+
%dir /var/lib/collectd
+%if %with_java
+%files java
+%attr(0644,root,root) /usr/share/%{name}/java/org/collectd/api/*.class
+%attr(0644,root,root) /usr/share/%{name}/java/org/collectd/java/*.class
+%plugin_macro java
+%endif
+
%files apache
-%attr(0644,root,root) %{_libdir}/%{name}/apache.so*
-%attr(0644,root,root) %{_libdir}/%{name}/apache.la
-%attr(0644,root,root) /etc/collectd.d/apache.conf
+%config %attr(0644,root,root) /etc/collectd.d/apache.conf
+%plugin_macro apache
%files email
%attr(0644,root,root) %{_libdir}/%{name}/email.so*
%attr(0644,root,root) %{_libdir}/%{name}/email.la
-%attr(0644,root,root) /etc/collectd.d/email.conf
+%config %attr(0644,root,root) /etc/collectd.d/email.conf
%files mysql
-%attr(0644,root,root) %{_libdir}/%{name}/mysql.so*
-%attr(0644,root,root) %{_libdir}/%{name}/mysql.la
-%attr(0644,root,root) /etc/collectd.d/mysql.conf
+%config %attr(0644,root,root) /etc/collectd.d/mysql.conf
+%plugin_macro mysql
%files nginx
-%attr(0644,root,root) %{_libdir}/%{name}/nginx.so*
-%attr(0644,root,root) %{_libdir}/%{name}/nginx.la
-%attr(0644,root,root) /etc/collectd.d/nginx.conf
+%config %attr(0644,root,root) /etc/collectd.d/nginx.conf
+%plugin_macro nginx
%files sensors
%attr(0644,root,root) %{_libdir}/%{name}/sensors.so*
%attr(0644,root,root) %{_libdir}/%{name}/sensors.la
-%attr(0644,root,root) /etc/collectd.d/sensors.conf
+%config %attr(0644,root,root) /etc/collectd.d/sensors.conf
%files snmp
-%attr(0644,root,root) %{_libdir}/%{name}/snmp.so*
-%attr(0644,root,root) %{_libdir}/%{name}/snmp.la
%attr(0644,root,root) /etc/collectd.d/snmp.conf
+%plugin_macro snmp
%changelog
+* Tue Jan 04 2010 Rackspace <stu.hood@rackspace.com> 4.9.0
+- New upstream version
+- Changes to support 4.9.0
+- Added support for Java/GenericJMX plugin
+
* Mon Mar 17 2008 RightScale <support@rightscale.com> 4.3.1
- New upstream version
- Changes to support 4.3.1
+++ /dev/null
-collectd on Debian
-==================
-
-General notes:
---------------
-
-- This package is split up into several packages to prevent you from having to
- install dependencies (or recommended packages) that you don't actually need.
- Any plugin that has dependencies other than libc gets its own package.
-
-Configuring collectd:
----------------------
-
-- collectd uses a similar configuration layout as openvpn does. That is to
- say that one daemon process is started for each configuration file found in
- /etc/collectd/.
-
-- See collectd.conf(5) for details about configuring collectd.
-
-Building your own plugins:
---------------------------
-
-- If you want to contribute plugins to the official distribution you should
- read http://collectd.org/dev-info.shtml.
-
-- If you want to build plugins for your personal use only simply install the
- collectd-dev package and use /usr/share/doc/collectd-dev/examples/myplugin.c
- as a starting point (Note: This is already a working example, though it does
- not collect any useful data).
-
- The resulting file can be compiled as follows:
-
- gcc -shared -o myplugin.so myplugin.c
-
- Copy myplugin.so to /usr/lib/collectd and add the following line to your
- collectd config file:
-
- LoadPlugin myplugin
-
- Restart collectd and you're done.
-
+++ /dev/null
-collectd (3.11.5-0octo1) unstable; urgency=low
-
- * New upstream release.
-
- -- Florian Forster <octo@leeloo.home.verplant.org> Tue, 29 May 2007 22:50:59 +0200
-
-collectd (3.11.4-0octo1) unstable; urgency=low
-
- * New upstream release.
-
- -- Florian Forster <octo@leeloo.home.verplant.org> Tue, 10 Apr 2007 17:18:11 +0200
-
-collectd (3.11.3-0octo1) unstable; urgency=low
-
- * New upstream release.
-
- -- Florian octo Forster <octo@alice.lan.home.verplant.org> Fri, 30 Mar 2007 22:08:40 +0200
-
-collectd (3.11.0-0octo1) unstable; urgency=low
-
- * New upstream release.
- * The package collectd-mbmon has been added.
-
- -- Florian octo Forster <octo@alice.lan.home.verplant.org> Fri, 22 Dec 2006 15:10:37 +0100
-
-collectd (3.10.4-0octo1) unstable; urgency=low
-
- * New upstream release.
-
- -- Florian Forster <octo@leeloo.home.verplant.org> Thu, 21 Dec 2006 20:36:37 +0100
-
-collectd (3.10.3-0octo1) unstable; urgency=low
-
- * New upstream release.
-
- -- Florian Forster <octo@leeloo.home.verplant.org> Sat, 4 Nov 2006 13:46:49 +0100
-
-collectd (3.10.1-4) unstable; urgency=low
-
- * Changed collectd-dbg's section and priority to "devel" and "extra"
- respectively.
- * Set init start sequence code to 95 to be sure to start after any daemons
- that data is collected from.
-
- -- Sebastian Harl <sh@tokkee.org> Thu, 5 Oct 2006 10:25:07 +0000
-
-collectd (3.10.1-3) unstable; urgency=low
-
- * Added --oknodo to start-stop-daemon in the init script (Closes: #379703).
-
- -- Sebastian Harl <sh@tokkee.org> Tue, 25 Jul 2006 18:34:55 +0200
-
-collectd (3.10.1-2) unstable; urgency=low
-
- * Added collectd-dbg package.
-
- -- Sebastian Harl <sh@tokkee.org> Sun, 23 Jul 2006 23:39:42 +0200
-
-collectd (3.10.1-1) unstable; urgency=low
-
- * New upstream release.
- * Dynamically link against external liboping.
- - New binary package collectd-ping.
- - Added collectd-ping to suggested packages.
- * Moved config file from /usr/share/doc/collectd/examples/ to
- /etc/collectd/.
-
- -- Sebastian Harl <sh@tokkee.org> Sat, 22 Jul 2006 21:43:37 +0200
-
-collectd (3.10.0-1) unstable; urgency=low
-
- * New upstream release.
- New plugins:
- - APC UPS's charge, load, input/output/battery voltage, etc.: apcups
- - NTP daemon's local clock drift, offset to peers, etc.: ntpd
- * Upstream no longer provides a debian/ directory. Thus no repackaging is
- required any longer.
- * Not using getifaddrs() is now the default in upstream. getifaddrs.dpatch
- no longer needed.
- * Added collectd-hddtemp as a suggestion to the collectd package.
-
- -- Sebastian Harl <sh@tokkee.org> Sun, 9 Jul 2006 21:52:13 +0200
-
-collectd (3.9.4+debian-1) unstable; urgency=low
-
- * Initial release (Closes: #373008).
- * Removed upstream's debian/ directory from .orig.tar.gz.
- * getifaddrs.dpatch: Patching src/traffic.c to read data from /proc instead
- of using getifaddrs(). getifaddrs() does not seem to work correctly on
- AMD64.
-
- -- Sebastian Harl <sh@tokkee.org> Fri, 7 Jul 2006 15:49:42 +0200
-
+++ /dev/null
-# Config file for collectd(1).
-#
-# Some plugins need additional configuration and are disabled by default.
-# Please read collectd.conf(5) for details.
-
-Mode Local
-
-# If in "Client" mode you have to specify which server to send datagrams to.
-#Mode Client
-#Server 123.123.123.123 12345
-
-#Mode Server
-
-#Mode Log
-
-#DataDir /var/lib/collectd
-#PIDFILE /var/run/collectd.pid
-#PluginDir /usr/lib/collectd
-
-#LoadPlugin apache
-#LoadPlugin apcups
-#LoadPlugin apple_sensors
-LoadPlugin battery
-LoadPlugin cpu
-#LoadPlugin cpufreq
-LoadPlugin df
-LoadPlugin disk
-#LoadPlugin hddtemp
-LoadPlugin load
-#LoadPlugin mbmon
-LoadPlugin memory
-#LoadPlugin mysql
-#LoadPlugin nfs
-#LoadPlugin ntpd
-#LoadPlugin ping
-LoadPlugin processes
-#LoadPlugin sensors
-#LoadPlugin serial
-LoadPlugin swap
-#LoadPlugin tape
-LoadPlugin traffic
-LoadPlugin users
-#LoadPlugin vserver
-#LoadPlugin wireless
-
-#<Plugin apache>
-# URL http://localhost/status?auto
-# User www-user
-# Password secret
-# CACert /etc/ssl/ca.crt
-#</Plugin>
-
-#<Plugin apcups>
-# Host localhost
-# Port 3551
-#</Plugin>
-
-#<Plugin hddtemp>
-# Host 127.0.0.1
-# Port 7634
-#</Plugin>
-
-#<Plugin mbmon>
-# Host 127.0.0.1
-# Port 411
-#</Plugin>
-
-#<Plugin ntpd>
-# Host localhost
-# Port 123
-#</Plugin>
-
-#<Plugin mysql>
-# Host localhost
-# User db_user
-# Password secret
-# Database db_name
-#</Plugin>
-
-#<Plugin ping>
-# Host host.foo.bar
-# Host host.baz.qux
-#</Plugin>
-
-#<Plugin traffic>
-# Interface eth0
-# IgnoreSelected false
-#</Plugin>
-
+++ /dev/null
-#!/bin/bash
-#
-# collectd Initscript for collectd
-# http://collectd.org/
-# Authors: Florian Forster <octo@verplant.org>
-# Sebastian Harl <sh@tokkee.org>
-#
-
-set -e
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DESC="Statistics collection daemon"
-NAME=collectd
-DAEMON=/usr/sbin/$NAME
-SCRIPTNAME=/etc/init.d/$NAME
-ARGS=""
-
-CONFIGDIR=/etc/collectd
-# for backward compatibility
-FALLBACKCONF=/etc/collectd.conf
-
-# Gracefully exit if the package has been removed.
-test -x $DAEMON || exit 0
-
-if [ -r /etc/default/$NAME ]
-then
- . /etc/default/$NAME
-fi
-
-#
-# Function that starts the daemon/service.
-#
-d_start() {
- i=0
-
- if [ ! -d "$CONFIGDIR" ]
- then
- if [ -e "$FALLBACKCONF" ]
- then
- $DAEMON -C "$FALLBACKCONF" 2> /dev/null
- else
- echo ""
- echo "This package is not configured yet. Please refer"
- echo "to /usr/share/doc/collectd/README.Debian for"
- echo "details."
- echo ""
- exit 0
- fi
- else
- for FILE in `ls $CONFIGDIR/*.conf 2>/dev/null`
- do
- NAME=`basename "$FILE" .conf`
-
- if [ $i == 0 ]
- then
- echo -n " ("
- else
- echo -n ", "
- fi
-
- $DAEMON -C "$FILE" 2> /dev/null
- if [ $? == 0 ]
- then
- echo -n "$NAME"
- else
- echo -n "$NAME failed"
- fi
-
- i=$(($i+1))
- done
-
- if [ $i == 0 ]
- then
- echo -n "[no config found]"
- exit 1
- else
- echo -n ")"
- fi
- fi
-}
-
-#
-# Function that stops the daemon/service.
-#
-d_stop() {
- start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
-}
-
-case "$1" in
- start)
- echo -n "Starting $DESC: $NAME"
- d_start
- echo "."
- ;;
- stop)
- echo -n "Stopping $DESC: $NAME"
- d_stop
- echo "."
- ;;
- restart|force-reload)
- echo -n "Restarting $DESC: $NAME"
- d_stop
- sleep 1
- d_start
- echo "."
- ;;
- *)
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0
-
-# vim: syntax=sh noexpandtab sw=8 ts=8 :
+++ /dev/null
-#!/bin/bash
-# postrm script for collectd
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-# * <postrm> `remove'
-# * <postrm> `purge'
-# * <old-postrm> `upgrade' <new-version>
-# * <new-postrm> `failed-upgrade' <old-version>
-# * <new-postrm> `abort-install'
-# * <new-postrm> `abort-install' <old-version>
-# * <new-postrm> `abort-upgrade' <old-version>
-# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
- purge)
- rm -rf /var/lib/collectd
- rm -rf /etc/collectd
- ;;
-
- remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
+++ /dev/null
-Source: collectd
-Section: utils
-Priority: optional
-Maintainer: Sebastian Harl <sh@tokkee.org>
-Build-Depends: debhelper (>= 5), autotools-dev, libcurl3-dev,
- libmysqlclient15-dev | libmysqlclient14-dev, librrd2-dev | librrd0-dev,
- libsensors-dev, liboping-dev (> 0.3.3)
-Standards-Version: 3.7.2
-
-Package: collectd
-Architecture: any
-Depends: ${shlibs:Depends}
-Suggests: collectd-apache, collectd-mysql, collectd-sensors, collectd-dev,
- collectd-hddtemp, collectd-mbmon, collectd-ping, librrds-perl
-Description: statistics collection daemon
- collectd is a small daemon written in C for performance. It reads various
- system statistics and updates RRD files, creating them if necessary. Since
- the daemon doesn't need to startup every time it wants to update the files
- it's very fast and easy on the system. Also, the statistics are very fine
- grained since the files are updated every 10 seconds.
- .
- This package contains the main program file and the following plugins:
- * APC UPS's charge, load, input/output/battery voltage, etc.: apcups
- * Apple computer's sensors information: apple_sensors (server mode only)
- * battery status: battery
- * CPU utilization: cpu
- * CPU frequency: cpufreq
- * disk space usage: df
- * disk and partition throughput: disk
- * system load averages: load
- * memory usage: memory
- * NFS utilization: nfs
- * NTP daemon's local clock drift, offset to peers, etc.: ntpd
- * number of processes: processes
- * serial port traffic: serial
- * swap usage: swap
- * tape drive usage: tape (server mode only)
- * network traffic: traffic
- * number of users logged into the system: users
- * system ressources used by Linux-VServers: vserver
- * wireless network stats: wireless
-
-Package: collectd-dbg
-Section: devel
-Architecture: any
-Priority: extra
-Depends: collectd (= ${Source-Version}), collectd-apache (= ${Source-Version}),
- collectd-hddtemp (= ${Source-Version}), collectd-mysql (= ${Source-Version}),
- collectd-ping (= ${Source-Version}), collectd-sensors (= ${Source-Version})
-Description: statistics collection daemon (debugging symbols)
- collectd is a small daemon written in C for performance. It reads various
- system statistics and updates RRD files, creating them if necessary. Since
- the daemon doesn't need to startup every time it wants to update the files
- it's very fast and easy on the system. Also, the statistics are very fine
- grained since the files are updated every 10 seconds.
- .
- This package contains the debugging symbols.
-
-Package: collectd-apache
-Architecture: any
-Depends: collectd (= ${Source-Version}), ${shlibs:Depends}
-Description: statistics collection daemon (Apache plugin)
- collectd is a small daemon written in C for performance. It reads various
- system statistics and updates RRD files, creating them if necessary. Since
- the daemon doesn't need to startup every time it wants to update the files
- it's very fast and easy on the system. Also, the statistics are very fine
- grained since the files are updated every 10 seconds.
- .
- This package contains the Apache plugin which collects Apache statistics
- provided by Apache's mod_status.
-
-Package: collectd-hddtemp
-Architecture: any
-Depends: collectd (= ${Source-Version}), ${shlibs:Depends}
-Recommends: hddtemp
-Description: statistics collection daemon (hddtemp plugin)
- collectd is a small daemon written in C for performance. It reads various
- system statistics and updates RRD files, creating them if necessary. Since
- the daemon doesn't need to startup every time it wants to update the files
- it's very fast and easy on the system. Also, the statistics are very fine
- grained since the files are updated every 10 seconds.
- .
- This package contains the hddtemp plugin which collects harddisk temperatures.
-
-Package: collectd-mbmon
-Architecture: any
-Depends: collectd (= ${Source-Version}), ${shlibs:Depends}
-Recommends: mbmon (>= 2.01)
-Description: statistics collection daemon (mbmon plugin)
- collectd is a small daemon written in C for performance. It reads various
- system statistics and updates RRD files, creating them if necessary. Since
- the daemon doesn't need to startup every time it wants to update the files
- it's very fast and easy on the system. Also, the statistics are very fine
- grained since the files are updated every 10 seconds.
- .
- This package contains the mbmon plugin which collects motherboard status
- information: temperatures, voltages and cooling fan speeds.
-
-Package: collectd-mysql
-Architecture: any
-Depends: collectd (= ${Source-Version}), ${shlibs:Depends}
-Description: statistics collection daemon (MySQL plugin)
- collectd is a small daemon written in C for performance. It reads various
- system statistics and updates RRD files, creating them if necessary. Since
- the daemon doesn't need to startup every time it wants to update the files
- it's very fast and easy on the system. Also, the statistics are very fine
- grained since the files are updated every 10 seconds.
- .
- This package contains the MySQL plugin which collects MySQL statistics
- provided by MySQL's "show status" command.
-
-Package: collectd-ping
-Architecture: any
-Depends: collectd (= ${Source-Version}), ${shlibs:Depends}
-Description: statistics collection daemon (ping plugin)
- collectd is a small daemon written in C for performance. It reads various
- system statistics and updates RRD files, creating them if necessary. Since
- the daemon doesn't need to startup every time it wants to update the files
- it's very fast and easy on the system. Also, the statistics are very fine
- grained since the files are updated every 10 seconds.
- .
- This package contains the ping plugin which collects network latency
- statistics.
-
-Package: collectd-sensors
-Architecture: any
-Depends: collectd (= ${Source-Version}), ${shlibs:Depends}
-Description: statistics collection daemon (sensors plugin)
- collectd is a small daemon written in C for performance. It reads various
- system statistics and updates RRD files, creating them if necessary. Since
- the daemon doesn't need to startup every time it wants to update the files
- it's very fast and easy on the system. Also, the statistics are very fine
- grained since the files are updated every 10 seconds.
- .
- This package contains the sensors plugin which collects lm_sensors
- information (e.g. CPU temperature, fan speeds).
-
-Package: collectd-dev
-Architecture: all
-Depends: collectd (= ${Source-Version})
-Description: statistics collection daemon (development files)
- collectd is a small daemon written in C for performance. It reads various
- system statistics and updates RRD files, creating them if necessary. Since
- the daemon doesn't need to startup every time it wants to update the files
- it's very fast and easy on the system. Also, the statistics are very fine
- grained since the files are updated every 10 seconds.
- .
- This package contains the development files needed to create your own
- plugins.
+++ /dev/null
-This package was debianized by Sebastian Harl <sh@tokkee.org> on
-Wed, 10 May 2006 09:20:39 +0200.
-
-It was downloaded from <http://collectd.org/files/>.
-
-Upstream Authors:
- Core Developer:
- Florian Forster <octo@verplant.org>
-
- For individual credits, see AUTHORS.
-
-Copyright Holders (in alphabetical order):
- Andre M. Hedrick <andre@suse.com>
- Anthony Gialluca <tonyabg@charter.net>
- David Bacher <drbacher@gmail.com>
- Florian Forster <octo@verplant.org>
- Free Software Foundation, Inc.
- Jason Pepas <cell@ices.utexas.edu>
- Kern Sibbald
- Lyonel Vincent <lyonel@ezix.org>
- Niki W. Waibel <niki.waibel@newlogic.com>
- Peter Holik <peter@holik.at>
- Roy Keene, Keene Enterprises <libconfig@rkeene.org>
- Scott Garrett <sgarrett@technomancer.com>
- Sebastian Harl <sh@tokkee.org>
- Vincent Stehlé <vincent.stehle@free.fr>
-
-License:
-
- Files src/apache.c
- src/apple_sensors.c
- src/mysql.c
- src/ntpd.c
- src/battery.c
- src/wireless.c
- Copyright (C) 2006 Florian Forster <octo@verplant.org>
-
- File src/apcups.c
- Copyright (C) 2006 Anthony Gialluca <tonyabg@charter.net>
- Copyright (C) 2000-2004 Kern Sibbald
- Copyright (C) 1996-99 Andre M. Hedrick <andre@suse.com>
-
- File src/cpufreq.c
- Copyright (C) 2005, 2006 Peter Holik <peter@holik.at>
-
- File src/hddtemp.c
- Copyright (C) 2005, 2006 Vincent Stehlé <vincent.stehle@free.fr>
-
- File src/mbmon.c
- Copyright (C) 2006 Flavio Stanchina <flavio@stanchina.net>
-
- File src/nfs.c
- Copyright (C) 2005, 2006 Jason Pepas <cell@ices.utexas.edu>
-
- File src/processes.c
- Copyright (C) 2005 Lyonel Vincent <lyonel@ezix.org>
- Copyright (C) 2006 Florian Forster <octo@verplant.org> (Mach code)
-
- File src/serial.c
- Copyright (C) 2005, 2006 David Bacher <drbacher@gmail.com>
-
- File src/tape.c
- Copyright (C) 2005, 2006 Scott Garrett <sgarrett@technomancer.com>
-
- File src/users.c
- Copyright (C) 2005, 2006 Sebastian Harl <sh@tokkee.org>
-
- Files src/utils_debug.c
- src/utils_debug.h
- src/utils_mount.c
- src/utils_mount.h
- Copyright (C) 2005, 2006 Niki W. Waibel <niki.waibel@gmx.net>
-
- File src/vserver.c
- Copyright (C) 2006 Sebastian Harl <sh@tokkee.org>
-
- All other files (except libltdl/* and src/libconfig/*):
- Copyright (C) 2005, 2006 Florian Forster <octo@verplant.org>
-
- This package is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This package is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this package; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
- USA.
-
-On Debian systems, the complete text of the GNU General Public License
-can be found in `/usr/share/common-licenses/GPL'.
-
- File libltdl/ltdl.c
- Copyright (C) 1998-2000, 2004, 2005 Free Software Foundation, Inc.
- Originally by Thomas Tanner <tanner@ffii.org>
-
- File libltdl/ltdl.h
- Copyright (C) 1998-2000 Free Software Foundation, Inc.
- Originally by Thomas Tanner <tanner@ffii.org>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
- USA.
-
-On Debian systems, the complete text of the GNU Lesser General Public License
-can be found in `/usr/share/common-licenses/LGPL'.
-
- Files src/libconfig/*
- Copyright (C) Roy Keene <libconfig@rkeene.org>
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-The Debian packaging is (C) 2006, Sebastian Harl <sh@tokkee.org> and
-is licensed under the GPL, see above.
-
+++ /dev/null
-/*
- * /usr/share/doc/collectd/examples/sample_plugin.c
- *
- * A sample plugin for collectd.
- *
- * Written by Sebastian Harl <sh@tokkee.org>
- *
- * This is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- */
-
-#include <collectd/common.h> /* rrd_update_file */
-#include <collectd/plugin.h> /* plugin_* */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-/* Optional config file support */
-/* #include <collectd/configfile.h> */
-
-/* Optional debugging support
- * (only available if collectd was compiled with debugging support) */
-/* #include <collectd/utils_debug.h> */
-
-#define MODULE_NAME "myplugin"
-
-/* Name of the rrd file under DataDir (/var/lib/collectd by default)
- *
- * The name may contain slashes to create subdirectories. */
-static char *my_rrd = "myplugin.rrd";
-
-/* DS definitions for the rrd file
- *
- * See the rrdcreate(1) manpage for details. The heartbeat is configurable in
- * collectd. It defaults to 25. */
-static char *ds_def[] =
-{
- "DS:my_ds:GAUGE:25:0:U",
- NULL
-};
-
-/* DS count */
-static int ds_num = 1;
-
-/* Time at which the read function is called */
-extern time_t curtime;
-
-/* Initialize the plugin
- *
- * This function is called to set up a plugin before using it. */
-static void my_init(void)
-{
- /* we have nothing to do here :-) */
- return;
-}
-
-/* Get the data
- *
- * This function implements the magic used to get the desired values that
- * should be stored in the rrd file. It uses plugin_submit to transfer the
- * data to whatever place is configured in the config file. If there are more
- * than one instances you should pass a uniq identifier as seconds argument to
- * the plugin_submit function. */
-#define BUFSIZE 256
-static void my_read(void)
-{
- long int data = 0;
- char buf[BUFSIZE] = "";
-
- /* magic ;-) */
- data = random();
-
- if (snprintf(buf, BUFSIZE, "%u:%li",
- (unsigned int)curtime, data) >= BUFSIZE)
- return;
-
- plugin_submit(MODULE_NAME, NULL, buf);
- return;
-}
-#undef BUFSIZE
-
-/* Save the data
- *
- * This function saves the data to the appropriate location by calling
- * rrd_update_file. It is used to "calculate" the filename and DS definition
- * appropriate for the given instance. */
-static void my_write(host, inst, val)
- char *host;
- char *inst;
- char *val;
-{
- rrd_update_file(host, my_rrd, val, ds_def, ds_num);
- return;
-}
-
-/* Register the plugin
- *
- * This function registers the plugin with collectd. It has to be named
- * "module_register". */
-void module_register(void)
-{
- plugin_register(MODULE_NAME, my_init, my_read, my_write);
- return;
-}
-
+++ /dev/null
-#!/usr/bin/make -f
-# debian/rules for collectd
-#
-# Written by Sebastian Harl <sh@tokkee.org>.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-config.status: configure
- dh_testdir
- CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
- --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
- --mandir=\$${prefix}/share/man \
- --localstatedir=/var --sysconfdir=/etc
-
-build: build-stamp
-
-build-stamp: config.status
- dh_testdir
-
- $(MAKE)
-
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- -$(MAKE) distclean
-
- dh_clean
-
-install-indep:
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs -i
-
- include_dir=$(CURDIR)/debian/collectd-dev/usr/include/collectd/ \
- && mkdir -p $$include_dir \
- && cp src/*.h $$include_dir
-
-install-arch: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs -a
-
- $(MAKE) install DESTDIR=$(CURDIR)/debian/collectd
-
- rm -f $(CURDIR)/debian/collectd/usr/lib/collectd/*.la
-
- rm -f $(CURDIR)/debian/collectd/etc/collectd.conf
- install -D -m 0644 $(CURDIR)/debian/collectd.conf \
- $(CURDIR)/debian/collectd/etc/collectd/collectd.conf
-
- for PLUGIN in apache hddtemp mbmon mysql ping sensors; do \
- plugin_dir=$(CURDIR)/debian/collectd-$$PLUGIN/usr/lib/collectd/; \
- mkdir -p $$plugin_dir; \
- mv $(CURDIR)/debian/collectd/usr/lib/collectd/$$PLUGIN.so \
- $$plugin_dir; \
- done
-
-binary-indep: install-indep
- dh_testdir
- dh_testroot
- dh_installchangelogs -i ChangeLog
- dh_installdocs -A -i debian/README.Debian AUTHORS README TODO
- dh_installexamples -i debian/examples/myplugin.c
- dh_compress -i
- dh_fixperms -i
- dh_installdeb -i
- dh_gencontrol -i
- dh_md5sums -i
- dh_builddeb -i
-
-binary-arch: build install-arch
- dh_testdir
- dh_testroot
- dh_installchangelogs -a ChangeLog
- dh_installdocs -A -a debian/README.Debian AUTHORS README TODO
- dh_installexamples -a contrib/collectd2html.pl contrib/collection.cgi
- dh_installinit -a -- defaults 95
- dh_installman -a src/collectd.1 src/collectd.conf.5
- dh_link -a
- dh_strip -a --dbg-package=collectd-dbg
- dh_compress -a
- dh_fixperms -a
- dh_installdeb -a
- dh_shlibdeps -a
- dh_gencontrol -a
- dh_md5sums -a
- dh_builddeb -a
-
-binary: binary-arch binary-indep
-.PHONY: build clean binary-indep binary-arch binary install-indep install-arch
-
{
if (strcmp (fields[0], "Scoreboard:") == 0)
submit_scoreboard (fields[1], st);
- else if (strcmp (fields[0], "BusyServers:") == 0)
+ else if ((strcmp (fields[0], "BusyServers:") == 0) /* Apache 1.* */
+ || (strcmp (fields[0], "BusyWorkers:") == 0) /* Apache 2.* */)
submit_gauge ("apache_connections", NULL, atol (fields[1]), st);
else if ((strcmp (fields[0], "IdleServers:") == 0) /* Apache 1.x */
|| (strcmp (fields[0], "IdleWorkers:") == 0) /* Apache 2.x */)
=item Config-Item
-A config-item is one structure which keeps the informations provided in the
+A config-item is one structure which keeps the information provided in the
configuration file. The array of children keeps one entry for each
configuration option. Each such entry is another config-item structure, which
may nest further if nested blocks are used.
Loads the Python plugin I<Plugin>. Unlike most other LoadPlugin lines, this one
should be a block containing the line "Globals true". This will cause collectd
to export the name of all objects in the python interpreter for all plugins to
-see. If you don't do this or your platform does not support it, the embeded
-interpreter will start anywa but you won't be able to load certain python
+see. If you don't do this or your platform does not support it, the embedded
+interpreter will start anyway but you won't be able to load certain python
modules, e.g. "time".
=item B<Encoding> I<Name>
=head2 Config
-The Config class is an object which keeps the informations provided in the
+The Config class is an object which keeps the information provided in the
configuration file. The sequence of children keeps one entry for each
configuration option. Each such entry is another Config instance, which
may nest further if nested blocks are used.
=item
This plugin is not compatible with python3. Trying to compile it with python3
-will fail because of the ways string, unicode and bytearray bahavior was
+will fail because of the ways string, unicode and bytearray behavior was
changed.
=item
#<Plugin "java">
# JVMArg "-verbose:jni"
-# JVMArg "-Djava.class.path=@prefix@/share/collectd/java"
+# JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar"
#
# LoadPlugin "org.collectd.java.Foobar"
# <Plugin "org.collectd.java.Foobar">
=item B<Hostname> I<Name>
Sets the hostname that identifies a host. If you omit this setting, the
-hostname will be determinded using the L<gethostname(2)> system call.
+hostname will be determined using the L<gethostname(2)> system call.
=item B<FQDNLookup> B<true|false>
and the match infrastructure (the same code used by the tail plugin) to use
regular expressions with the received data.
-The following example will read the current value of AMD stock from google's
+The following example will read the current value of AMD stock from Google's
finance page and dispatch the value to collectd.
<Plugin curl>
In the B<Plugin> block, there may be one or more B<URL> blocks, each defining
a URL to be fetched via HTTP (using libcurl) and one or more B<Key> blocks.
-The B<Key> string argument must be in a path format, of which is used to collect
-a value from a JSON map object. If a B<Key> path element is that of a I<*> wildcard,
-the values for all keys will be collectd.
+The B<Key> string argument must be in a path format, which is used to collect a
+value from a JSON map object. If a path element of B<Key> is the
+I<*>E<nbsp>wildcard, the values for all keys will be collectd.
The following options are valid within B<URL> blocks:
Query blocks define I<SQL> statements and how the returned data should be
interpreted. They are identified by the name that is given in the opening line
of the block. Thus the name needs to be unique. Other than that, the name is
-not used in collectd.
+not used in collectd.
In each B<Query> block, there is one or more B<Result> blocks. B<Result> blocks
define which column holds which value or instance information. You can use
different syntax. The plugin will use only those queries, where the specified
minimum and maximum versions fit the version of the database in use.
-The database version is determined by C<dbi_conn_get_engine_version>, see the
+The database version is determined by C<dbi_conn_get_engine_version>, see the
L<libdbi documentation|http://libdbi.sourceforge.net/docs/programmers-guide/reference-conn.html#DBI-CONN-GET-ENGINE-VERSION>
for details. Basically, each part of the version is assumed to be in the range
from B<00> to B<99> and all dots are removed. So version "4.1.2" becomes
=item B<Interface> I<Interface>
-The dns plugin uses B<libpcap> to capture dns traffic and analyses it. This
+The dns plugin uses B<libpcap> to capture dns traffic and analyzes it. This
option sets the interface that should be used. If this option is not set, or
set to "any", the plugin will try to get packets from B<all> interfaces. This
may not work on certain platforms, such as MacE<nbsp>OSE<nbsp>X.
=head2 Plugin C<netapp>
-The netapp plugin can collect various performance and capacity informations
+The netapp plugin can collect various performance and capacity information
from a NetApp filer using the NetApp API.
Please note that NetApp has a wide line of products and a lot of different
=item B<IgnoreSelected>
-The behaviour is the same as with all other similar plugins: If nothing is
+The behavior is the same as with all other similar plugins: If nothing is
selected at all, everything is collected. If some things are selected using the
options described above, only these statistics are collected. If you set
B<IgnoreSelected> to B<true>, this behavior is inverted, i.E<nbsp>e. the
The Network plugin sends data to a remote instance of collectd, receives data
from a remote instance, or both at the same time. Data which has been received
-from the network is usually not transmitted again, but this can be actived, see
+from the network is usually not transmitted again, but this can be activated, see
the B<Forward> option below.
The default IPv6 multicast group is C<ff18::efc0:4a42>. The default IPv4
=item B<ReverseLookups> B<true>|B<false>
-Sets wether or not to perform reverse lookups on peers. Since the name or
+Sets whether or not to perform reverse lookups on peers. Since the name or
IP-address may be used in a filename it is recommended to disable reverse
lookups. The default is to do reverse lookups to preserve backwards
compatibility, though.
=head2 Plugin C<tokyotyrant>
-The C<tokyotyrant plugin> connects to a TokyoTyrant server and collects a
+The C<tokyotyrant plugin> connects to a TokyoTyrant server and collects a
couple metrics: number of records, and database size on disk.
=over 4
=back
-=head2 Built-in targets
+=head2 Built-in targets
The following targets are built into the core daemon and therefore need no
plugins to be loaded:
# ifndef isnan
# define isnan(f) ((f) != (f))
# endif /* !defined(isnan) */
+# ifndef isfinite
+# define isfinite(f) (((f) - (f)) == 0.0)
+# endif
+# ifndef isinf
+# define isinf(f) (!isfinite(f) && !isnan(f))
+# endif
#endif /* NAN_ZERO_ZERO */
/* Try really, really hard to determine endianess. Under NexentaStor 1.0.2 this
# error "No applicable input method."
#endif
-static void cs_submit (unsigned long context_switches)
+static void cs_submit (derive_t context_switches)
{
value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
char buffer[64];
int numfields;
char *fields[3];
- unsigned long result = 0;
+ derive_t result = 0;
int status = -2;
fh = fopen ("/proc/stat", "r");
errno = 0;
endptr = NULL;
- result = strtoul(fields[1], &endptr, 10);
+ result = (derive_t) strtoll (fields[1], &endptr, /* base = */ 10);
if ((endptr == fields[1]) || (errno != 0)) {
ERROR ("contextswitch plugin: Cannot parse ctxt value: %s",
fields[1]);
status = getpwnam_r (pl->user, &sp, nambuf, sizeof (nambuf), &sp_ptr);
if (status != 0)
{
- ERROR ("exec plugin: getpwnam_r failed: %s",
- sstrerror (errno, errbuf, sizeof (errbuf)));
+ ERROR ("exec plugin: Failed to get user information for user ``%s'': %s",
+ pl->user, sstrerror (errno, errbuf, sizeof (errbuf)));
exit (-1);
}
if (sp_ptr == NULL)
status = getgrnam_r (pl->group, &gr, nambuf, sizeof (nambuf), &gr_ptr);
if (0 != status)
{
- ERROR ("exec plugin: getgrnam_r failed: %s",
+ ERROR ("exec plugin: Failed to get group information "
+ "for group ``%s'': %s", pl->group,
sstrerror (errno, errbuf, sizeof (errbuf)));
exit (-1);
}
status = execvp (pl->exec, pl->argv);
- ERROR ("exec plugin: exec failed: %s",
- sstrerror (errno, errbuf, sizeof (errbuf)));
+ ERROR ("exec plugin: Failed to execute ``%s'': %s",
+ pl->exec, sstrerror (errno, errbuf, sizeof (errbuf)));
exit (-1);
} /* void exec_child }}} */
/**
* collectd - src/filter_chain.h
- * Copyright (C) 2008,2009 Florian octo Forster
+ * Copyright (C) 2008-2010 Florian octo Forster
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
if ((plugin_list == NULL) || (plugin_list[0] == NULL))
{
status = plugin_write (/* plugin = */ NULL, ds, vl);
- if (status != 0)
+ if (status == ENOENT)
+ {
+ INFO ("Filter subsystem: Built-in target `write': Dispatching value to "
+ "all write plugins failed with status %i (ENOENT). "
+ "Most likely this means you didn't load any write plugins.",
+ status);
+ }
+ else if (status != 0)
{
INFO ("Filter subsystem: Built-in target `write': Dispatching value to "
"all write plugins failed with status %i.", status);
}
else
{
- INFO ("mysql plugin: Sucessfully connected to database %s "
+ INFO ("mysql plugin: Successfully connected to database %s "
"at server %s (server version: %s, protocol version: %d)",
(db->database != NULL) ? db->database : "<none>",
mysql_get_host_info (db->con),
count = 0;
for (hl = hostlist_head; hl != NULL; hl = hl->next)
{
- int status;
- status = ping_host_add (pingobj, hl->host);
- if (status != 0)
- WARNING ("ping plugin: ping_host_add (%s) failed.", hl->host);
+ int tmp_status;
+ tmp_status = ping_host_add (pingobj, hl->host);
+ if (tmp_status != 0)
+ WARNING ("ping plugin: ping_host_add (%s) failed: %s",
+ hl->host, ping_get_error (pingobj));
else
count++;
}
if (gettimeofday (&tv_begin, NULL) < 0)
{
- ERROR ("ping plugin: gettimeofday failed");
+ char errbuf[1024];
+ ERROR ("ping plugin: gettimeofday failed: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
ping_thread_error = 1;
break;
}
if (gettimeofday (&tv_end, NULL) < 0)
{
- ERROR ("ping plugin: gettimeofday failed");
+ char errbuf[1024];
+ ERROR ("ping plugin: gettimeofday failed: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
ping_thread_error = 1;
break;
}
return (0);
}
+static _Bool timeout_reached(struct timespec timeout)
+{
+ struct timeval now;
+ gettimeofday(&now, NULL);
+ return (now.tv_sec >= timeout.tv_sec && now.tv_usec >= (timeout.tv_nsec / 1000));
+}
+
static void *plugin_read_thread (void __attribute__((unused)) *args)
{
while (read_loop != 0)
struct timeval now;
int status;
int rf_type;
+ int rc;
/* Get the read function that needs to be read next. */
rf = c_heap_get_root (read_heap);
/* sleep until this entry is due,
* using pthread_cond_timedwait */
pthread_mutex_lock (&read_lock);
- pthread_cond_timedwait (&read_cond, &read_lock,
+ /* In pthread_cond_timedwait, spurious wakeups are possible
+ * (and really happen, at least on NetBSD with > 1 CPU), thus
+ * we need to re-evaluate the condition every time
+ * pthread_cond_timedwait returns. */
+ rc = 0;
+ while (!timeout_reached(rf->rf_next_read) && rc == 0) {
+ rc = pthread_cond_timedwait (&read_cond, &read_lock,
&rf->rf_next_read);
+ }
+
/* Must hold `real_lock' when accessing `rf->rf_type'. */
rf_type = rf->rf_type;
pthread_mutex_unlock (&read_lock);
* `BAIL_OUT'. */
column_names[col] = PQfname (res, col);
if (NULL == column_names[col]) {
- log_err ("Failed to resolv name of column %i.", col);
+ log_err ("Failed to resolve name of column %i.", col);
BAIL_OUT (-1);
}
}
server_host = PQhost (db->conn);
server_version = PQserverVersion (db->conn);
- log_info ("Sucessfully connected to database %s (user %s) "
+ log_info ("Successfully connected to database %s (user %s) "
"at server %s%s%s (server version: %d.%d.%d, "
"protocol version: %d, pid: %d)",
PQdb (db->conn), PQuser (db->conn),
unsigned long cpu_system_counter;
/* io data */
- long io_rchar;
- long io_wchar;
- long io_syscr;
- long io_syscw;
+ derive_t io_rchar;
+ derive_t io_wchar;
+ derive_t io_syscr;
+ derive_t io_syscw;
struct procstat_entry_s *next;
} procstat_entry_t;
unsigned long cpu_system_counter;
/* io data */
- long io_rchar;
- long io_wchar;
- long io_syscr;
- long io_syscw;
+ derive_t io_rchar;
+ derive_t io_wchar;
+ derive_t io_syscr;
+ derive_t io_syscw;
struct procstat *next;
struct procstat_entry_s *instances;
if ( (ps->io_rchar != -1) && (ps->io_wchar != -1) )
{
sstrncpy (vl.type, "ps_disk_octets", sizeof (vl.type));
- vl.values[0].counter = ps->io_rchar;
- vl.values[1].counter = ps->io_wchar;
+ vl.values[0].derive = ps->io_rchar;
+ vl.values[1].derive = ps->io_wchar;
vl.values_len = 2;
plugin_dispatch_values (&vl);
}
if ( (ps->io_syscr != -1) && (ps->io_syscw != -1) )
{
sstrncpy (vl.type, "ps_disk_ops", sizeof (vl.type));
- vl.values[0].counter = ps->io_syscr;
- vl.values[1].counter = ps->io_syscw;
+ vl.values[0].derive = ps->io_syscr;
+ vl.values[1].derive = ps->io_syscw;
vl.values_len = 2;
plugin_dispatch_values (&vl);
}
DEBUG ("name = %s; num_proc = %lu; num_lwp = %lu; vmem_rss = %lu; "
"vmem_minflt_counter = %lu; vmem_majflt_counter = %lu; "
"cpu_user_counter = %lu; cpu_system_counter = %lu; "
- "io_rchar = %ld; io_wchar = %ld; "
- "io_syscr = %ld; io_syscw = %ld;",
+ "io_rchar = %"PRIi64"; io_wchar = %"PRIi64"; "
+ "io_syscr = %"PRIi64"; io_syscw = %"PRIi64";",
ps->name, ps->num_proc, ps->num_lwp, ps->vmem_rss,
ps->vmem_minflt_counter, ps->vmem_majflt_counter,
ps->cpu_user_counter, ps->cpu_system_counter,
while (fgets (buffer, 1024, fh) != NULL)
{
- long *val = NULL;
+ derive_t *val = NULL;
+ long long tmp;
+ char *endptr;
if (strncasecmp (buffer, "rchar:", 6) == 0)
val = &(ps->io_rchar);
if (numfields < 2)
continue;
- *val = atol (fields[1]);
- }
+ errno = 0;
+ endptr = NULL;
+ tmp = strtoll (fields[1], &endptr, /* base = */ 10);
+ if ((errno != 0) || (endptr == fields[1]))
+ *val = -1;
+ else
+ *val = (derive_t) tmp;
+ } /* while (fgets) */
if (fclose (fh))
{
data-source specification. Each data-source is defined by a quadruple made up
of the data-source name, type, minimal and maximal values, delimited by colons
(":"): I<ds-name>:I<ds-type>:I<min>:I<max>. I<ds-type> may be either
-B<COUNTER> or B<GAUGE>. I<min> and I<max> define the range of valid values for
+B<ABSOLUTE>, B<COUNTER>, B<DERIVE>, or B<GAUGE>. I<min> and I<max> define the
+range of valid values for
data stored for this data-source. If B<U> is specified for either the min or
max value, it will be set to unknown, meaning that no range checks will
happen. See L<rrdcreate(1)> for more details.
#include "utils_cache.h"
#include "utils_parse_option.h"
+#define free_everything_and_return(status) do { \
+ size_t j; \
+ for (j = 0; j < number; j++) { \
+ sfree(names[j]); \
+ names[j] = NULL; \
+ } \
+ sfree(names); \
+ sfree(times); \
+ return (status); \
+ } while (0)
+
#define print_to_socket(fh, ...) \
if (fprintf (fh, __VA_ARGS__) < 0) { \
char errbuf[1024]; \
WARNING ("handle_listval: failed to write to socket #%i: %s", \
fileno (fh), sstrerror (errno, errbuf, sizeof (errbuf))); \
- return -1; \
+ free_everything_and_return (-1); \
}
int handle_listval (FILE *fh, char *buffer)
if (status != 0)
{
print_to_socket (fh, "-1 Cannot parse command.\n");
- return (-1);
+ free_everything_and_return (-1);
}
assert (command != NULL);
if (strcasecmp ("LISTVAL", command) != 0)
{
print_to_socket (fh, "-1 Unexpected command: `%s'.\n", command);
- return (-1);
+ free_everything_and_return (-1);
}
if (*buffer != 0)
{
print_to_socket (fh, "-1 Garbage after end of command: %s\n", buffer);
- return (-1);
+ free_everything_and_return (-1);
}
status = uc_get_names (&names, ×, &number);
{
DEBUG ("command listval: uc_get_names failed with status %i", status);
print_to_socket (fh, "-1 uc_get_names failed.\n");
- return (-1);
+ free_everything_and_return (-1);
}
print_to_socket (fh, "%i Value%s found\n",
(int) number, (number == 1) ? "" : "s");
for (i = 0; i < number; i++)
- {
print_to_socket (fh, "%u %s\n", (unsigned int) times[i], names[i]);
- sfree(names[i]);
- }
- sfree(names);
- sfree(times);
-
- return (0);
+ free_everything_and_return (0);
} /* int handle_listval */
/* vim: set sw=2 sts=2 ts=8 : */
BUFFER_ADD (",");
if (ds->ds[i].type == DS_TYPE_GAUGE)
- BUFFER_ADD ("%g", vl->values[i].gauge);
+ {
+ if(isfinite (vl->values[i].gauge))
+ BUFFER_ADD ("%g", vl->values[i].gauge);
+ else
+ BUFFER_ADD ("null");
+ }
else if (ds->ds[i].type == DS_TYPE_COUNTER)
BUFFER_ADD ("%llu", vl->values[i].counter);
else if (ds->ds[i].type == DS_TYPE_DERIVE)
ssnprintf (cb->credentials, credentials_size, "%s:%s",
cb->user, (cb->pass == NULL) ? "" : cb->pass);
curl_easy_setopt (cb->curl, CURLOPT_USERPWD, cb->credentials);
- curl_easy_setopt (cb->curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
+ curl_easy_setopt (cb->curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
}
curl_easy_setopt (cb->curl, CURLOPT_SSL_VERIFYPEER, cb->verify_peer);