# mainstream library:
# liboconfig . . . . . yes (shipped version)
# - Libraries not found by configure:
-# libganglia . . . . . no (gm_protocol.h not found)
-# libiokit . . . . . . no
+# libcredis . . . . . . no (credis.h not found) (http://code.google.com/p/credis/)
+# libganglia . . . . . no (gm_protocol.h not found) (http://ganglia.info/)
+# libiokit . . . . . . no (Darwin only)
# libjvm . . . . . . . no (javac not found)
# libkstat . . . . . . no (Solaris only)
-# libkvm . . . . . . . no
-# libnetapp . . . . . . no (netapp_api.h not found)
-# librouteros . . . . . no ('routeros_api.h' not found)
-# libtokyotyrant . . . no (tcrdb.h not found)
-# libvirt . . . . . . . no (pkg-config doesn't know library)
+# libkvm . . . . . . . no (BSD only)
+# libmodbus . . . . . . no (pkg-config doesn't know modbus) (http://www.libmodbus.org/)
+# libnetapp . . . . . . no (netapp_api.h not found) (properitary)
+# libperfstat . . . . . no (AIX only)
+# librabbitmq . . . . . no (amqp.h not found) (http://hg.rabbitmq.com/rabbitmq-c/)
+# librouteros . . . . . no ('routeros_api.h' not found) (http://verplant.org/librouteros/)
+# libtokyotyrant . . . no (tcrdb.h not found) (http://1978th.net/tokyotyrant/)
# libyajl . . . . . . . no (yajl/yajl_parse.h not found)
+# protobuf-c . . . . . no
# oracle . . . . . . . no (ORACLE_HOME is not set)
# - Disabled modules (build most of them an package):
-# apple_sensors . . . no (obvious)
-# ipvs . . . . . . . no (ip_vs.h not found - llh to be fixed)
-# libvirt . . . . . . no (requires library)
-# multimeter . . . . no ?
-# onewire . . . . . . no (needs libowfs)
-# tape . . . . . . . no ?
+# amqp . . . . . . . no
+# apple_sensors . . . . no (Darwin only)
# gmond . . . . . . . . no
+# ipvs . . . . . . . . no (ip_vs.h not found - llh to be fixed)
# java . . . . . . . . no
+# lpar... . . . . . . . no
+# modbus . . . . . . . no
+# multimeter . . . . . no ?
# netapp . . . . . . . no
+# onewire . . . . . . . no (needs libowfs)
# oracle . . . . . . . no
+# pinba . . . . . . . . no
+# redis . . . . . . . . no
# routeros . . . . . . no
+# tape . . . . . . . . no ?
# tokyotyrant . . . . . no
+# write_redis . . . . . no
# zfs_arc . . . . . . . no
# - logrotate file for logfile plugin
# - %desc -l pl for plugins
%bcond_without ipmi # IPMI plugin
%bcond_without iptables # iptables plugin
%bcond_without libesmtp # notify_email plugin
+%bcond_without libvirt # libvirt plugin
%bcond_with multimeter # multimeter plugin
%bcond_without mysql # MySQL plugin
%bcond_without netlink # netlink plugin
Summary: Collects system information in RRD files
Summary(pl.UTF-8): Zbieranie informacji o systemie w plikach RRD
Name: collectd
-Version: 5.0.0
-Release: 1
+Version: 5.0.1
+Release: 4
License: GPL v2
Group: Daemons
Source0: http://collectd.org/files/%{name}-%{version}.tar.bz2
-# Source0-md5: 7bfea6e82d35b36f16d1da2c71397213
+# Source0-md5: 9ad1e4334bd4a671284e8e92a3e3323e
Source1: %{name}.conf
Source2: %{name}.init
Source3: %{name}-http.conf
Source11: %{name}-rrdtool.conf
Patch0: %{name}-collection.patch
Patch1: compile.patch
-Patch2: netfilter.patch
-Patch3: libnotify.patch
-Patch4: noquote.patch
-Patch5: libiptc.patch
+Patch2: noquote.patch
+Patch3: libiptc.patch
+Patch4: pld.patch
URL: http://collectd.org/
%{?with_ipmi:BuildRequires: OpenIPMI-devel >= 2.0.14-3}
BuildRequires: autoconf
BuildRequires: automake
%{?with_curl:BuildRequires: curl-devel}
-BuildRequires: hal-devel
%{?with_iptables:BuildRequires: iptables-devel >= 1.4.1.1-4}
BuildRequires: libdbi-devel
%{?with_libesmtp:BuildRequires: libesmtp-devel}
BuildRequires: libmemcached-devel
BuildRequires: libnetlink-devel
%{?with_netlink:BuildRequires: libnetlink-devel}
-%{?with_notify:BuildRequires: libnotify-devel >= 0.7.0}
+%{?with_libvirt:BuildRequires: libnl1-devel}
+%{?with_notify:BuildRequires: libnotify-devel}
%{?with_ping:BuildRequires: liboping-devel}
%{?with_dns:BuildRequires: libpcap-devel}
BuildRequires: libstatgrab-devel >= 0.12
%{?with_xml:BuildRequires: libxml2-devel}
%{?with_sensors:BuildRequires: lm_sensors-devel}
%{?with_mysql:BuildRequires: mysql-devel}
+%{?with_libvirt:BuildRequires: libvirt-devel}
BuildRequires: ncurses-devel
%{?with_snmp:BuildRequires: net-snmp-devel}
+%{?with_libvirt:BuildRequires: numactl-devel}
%{?with_ups:BuildRequires: nut-devel}
BuildRequires: perl-devel
BuildRequires: pkgconfig
BuildRequires: which
#BuildRequires: xfsprogs-devel
%{?with_xmms:BuildRequires: xmms-devel}
+BuildRequires: yajl-devel
Requires(post,preun): /sbin/chkconfig
+Requires: %{name}-libs = %{version}-%{release}
Requires: rc-scripts
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary(pl.UTF-8): Web script for collectd
Group: Applications/WWW
Requires: %{name} = %{version}-%{release}
+Requires: perl-Collectd = %{version}-%{release}
Requires: perl(Config::General)
Requires: perl(HTML::Entities)
+Requires: perl(Regexp::Common)
Requires: perl(RRDs)
Requires: webserver(cgi)
Suggests: fonts-TTF-DejaVu
The IRQ plugin collects the number of times each interrupt has been
handled by the operating system.
+%package libvirt
+Summary: libvirt-plugin for collectd
+Summary(pl.UTF-8): Wtyczka libvirt dla collectd
+Group: Daemons
+Requires: %{name} = %{version}-%{release}
+
+%description libvirt
+The libvirt plugin uses the virtualization API libvirt, created by
+RedHat's Emerging Technology group, to gather statistics about
+virtualized guests on a system. This way, you can collect CPU, network
+interface and block device usage for each guest without installing
+collectd on the guest systems. Because the statistics are received
+from the hypervisor directly, this works not only with
+para-virtualized hosts, but with hardware virtualized machines, too.
+
%package load
Summary: load-plugin for collectd
Summary(pl.UTF-8): Wtyczka load dla collectd
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
-%patch5 -p1
+%patch4 -p0
%build
%{__libtoolize}
%configure \
CPPFLAGS="-Wno-unused-but-set-variable" \
c_cv_have_libperl=yes \
+ --with-libiptc=/usr \
--with-libstatgrab=/usr \
--with-lm-sensors=/usr \
--with-libmysql=/usr \
%{__enable_disable netlink} \
%{__enable_disable notify notify_desktop} \
%{__enable_disable libesmtp notify_email} \
+ %{__enable_disable libvirt} \
%{__enable_disable ups nut} \
%{__enable_disable ping} \
%{__enable_disable pgsql postgresql} \
%{__disable curl bind} \
%{__disable xml ascent} \
%{__disable xml bind} \
- --disable-libvirt \
--disable-ipvs
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_var}/{log/,lib/%{name}},/etc/{rc.d/init.d/,collectd.d}} \
- $RPM_BUILD_ROOT{%{_appdir}/cgi-bin,%{_webappdir},%{_pkglibdir},%{perl_vendorlib}/}
+ $RPM_BUILD_ROOT{%{_appdir}/cgi-bin,%{_webappdir},%{_pkglibdir},%{perl_vendorlib}/,%{_mandir}/man3}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
install %{SOURCE4} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf
cp -R contrib/collection3 $RPM_BUILD_ROOT%{_appdir}
+mv $RPM_BUILD_ROOT%{_appdir}/collection3/etc/collection.conf $RPM_BUILD_ROOT%{_webappdir}/collection3.conf
+ln -sf %{_webappdir}/collection3.conf $RPM_BUILD_ROOT%{_appdir}/collection3/etc/collection.conf
+sed -i -e 's@#DataDir "/var/lib/collectd/rrd"@DataDir "%{_var}/lib/%{name}"@' $RPM_BUILD_ROOT%{_webappdir}/collection3.conf
### Configs instalation ###
for i in `egrep "^(#|)LoadPlugin" src/collectd.conf |awk '{print $NF}' ` ; do
install %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.d/rrdtool.conf
mv $RPM_BUILD_ROOT%{_datadir}/perl5/Collectd* $RPM_BUILD_ROOT%{perl_vendorlib}/
+mv $RPM_BUILD_ROOT/usr/man/man3/Collectd::Unixsock.3pm $RPM_BUILD_ROOT%{_mandir}/man3/
# Cleanups:
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
%module_scripts ipmi
%module_scripts iptables
%module_scripts irq
+%module_scripts libvirt
%module_scripts load
%module_scripts logfile
%module_scripts madwifi
%doc AUTHORS ChangeLog README TODO contrib
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
%dir %{_sysconfdir}/%{name}.d
+%dir %{_webappdir}
%attr(755,root,root) %{_sbindir}/collectd
%attr(755,root,root) %{_sbindir}/collectdmon
%attr(755,root,root) %{_bindir}/collectdctl
%files collection
%defattr(644,root,root,755)
-%dir %{_webappdir}
%config(noreplace) %verify(not md5 mtime size) %{_webappdir}/collection.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
%files collection3
%defattr(644,root,root,755)
-%{_appdir}/collection3
+%doc contrib/collection3/README
+%config(noreplace) %verify(not md5 mtime size) %{_webappdir}/collection3.conf
+%dir %{_appdir}/collection3
+%dir %{_appdir}/collection3/bin
+%attr(755,root,root) %{_appdir}/collection3/bin/*.cgi
+%{_appdir}/collection3/etc
+%{_appdir}/collection3/lib
+%{_appdir}/collection3/share
########## PLUGINS:
%if %{with xml}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/irq.conf
%attr(755,root,root) %{_libdir}/%{name}/irq.so
+%if %{with libvirt}
+%files libvirt
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/libvirt.conf
+%attr(755,root,root) %{_libdir}/%{name}/libvirt.so
+%endif
+
%files load
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/load.conf
%defattr(644,root,root,755)
%{perl_vendorlib}/Collectd.pm
%{perl_vendorlib}/Collectd
+%{_mandir}/man3/*.3*