%def_enable apache %def_enable bind %def_enable cgi %def_enable curl %def_enable dbi %def_enable libvirt %def_enable mysql %def_enable monitorus %def_enable netlink %def_enable nginx %def_enable notify_desktop %def_enable notify_email %def_disable nut %def_enable openvz %def_enable ping %def_enable perl %def_enable postgresql %def_enable rrdtool %def_enable sensors %def_enable snmp %def_enable xmms %def_enable ipmi %def_disable static Name: collectd Version: 4.9.1 Release: alt1 Summary: (Multi-)System statistics collection License: GPL Group: Monitoring Url: http://collectd.org Source: %url/files/%name-%version.tar Patch: %name-%version-%release.patch Packager: Michael Shigorin ### NB: part of BRs is conditional (see subpackages below) # Automatically added by buildreq on Thu May 14 2009 (-bi) #BuildRequires: flex gcc-c++ iptables-devel libMySQL-devel libcurl-devel libdbi-devel libesmtp-devel libgcrypt-devel libnet-snmp-devel libnetlink-devel libnotify-devel liboping-devel libpcap-devel librrd-devel libsensors-devel libvirt-devel libxfs-devel libxml2-devel libxmms-devel nut-devel perl-devel perl-threads perl-Regexp-Common postgresql-devel BuildRequires: flex gcc-c++ iptables-devel libgcrypt-devel libpcap-devel libxfs-devel perl-devel perl-threads perl-Regexp-Common BuildRequires: libstatgrab-devel perl-base # http://mailman.verplant.org/pipermail/collectd/2008-April/001766.html %set_perl_req_method relaxed %set_verify_elf_method unresolved=relaxed textrel=relaxed %add_verify_elf_skiplist %_libdir/%name/*/* %define libname lib%{name}client %description collectd is a small program written in C for performance. It reads various system statistics and updates RRD files, creating them if neccessary. Since it 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. WARNING: 4.x is INCOMPATIBLE with 3.x data! You HAVE to perform custom MIGRATION as described in documentation OR drop the HISTORY! >> http://collectd.org/wiki/index.php/V3_to_v4_migration_guide << %package -n %libname Summary: Shared library for %name clients Group: System/Libraries %description -n %libname This package contains shared library for %name clients. %package -n %libname-devel Summary: Library headers to build %name clients Group: Development/C Requires: %libname = %version-%release %description -n %libname-devel This package contains development part of %libname. %package -n perl-Collectd Summary: Perl module for %name Group: Development/Perl %description -n perl-Collectd This package contains Perl part of %name. %package full Summary: Meta package for %name plugins Group: Monitoring %{?_enable_apache:Requires: %name-apache} %{?_enable_bind:Requires: %name-bind} %{?_enable_cgi:Requires: %name-cgi} %{?_enable_curl:Requires: %name-curl} %{?_enable_dbi:Requires: %name-dbi} %{?_enable_libvirt:Requires: %name-libvirt} %{?_enable_mysql:Requires: %name-mysql} %{?_enable_netlink:Requires: %name-netlink} %{?_enable_nginx:Requires: %name-nginx} %{?_enable_notify_desktop:Requires: %name-notify_desktop} %{?_enable_notify_email:Requires: %name-notify_email} %{?_enable_nut:Requires: %name-nut} %{?_enable_ping:Requires: %name-ping} %{?_enable_postgresql:Requires: %name-postgresql} %{?_enable_rrdtool:Requires: %name-rrdtool} %{?_enable_sensors:Requires: %name-sensors} %{?_enable_snmp:Requires: %name-snmp} %{?_enable_xmms:Requires: %name-xmms} %{?_enable_ipmi:Requires: %name-ipmi} %description full This package pulls in all the different plugins and might come handy if you don't mind extra dependencies on the system %if_enabled apache %package apache Summary: apache2 support module for collectd Group: Monitoring Requires: collectd = %version-%release BuildRequires(pre): apache2-devel BuildRequires(pre): rpm-macros-apache2 %description apache This plugin provides apache 2.x support for collectd %endif %if_enabled bind %package bind Summary: ISC BIND support module for collectd Group: Monitoring Requires: collectd = %version-%release BuildRequires: libcurl-devel libxml2-devel %description bind This plugin provides ISC BIND support for collectd %endif %if_enabled cgi %package cgi Summary: CGI script for collectd Group: Monitoring Requires: collectd = %version Requires: apache2-common, perl BuildRequires: perl-CGI BuildRequires(pre): apache2-devel BuildRequires(pre): rpm-macros-apache2 %description cgi This CGI frontend for collectd allows to browse the stats online, check out http://localhost/cgi-bin/%name/collection.cgi %endif %if_enabled curl %package curl Summary: CURL support module for collectd Group: Monitoring Requires: collectd = %version-%release BuildRequires: libcurl-devel %description curl This plugin provides CURL (proxy, etc) support for collectd %endif %if_enabled dbi %package dbi Summary: DBI support module for collectd Group: Monitoring Requires: collectd = %version-%release BuildRequires: libdbi-devel %description dbi This plugin provides DBI support for collectd %endif %if_enabled libvirt %package libvirt Summary: libvirt support module for collectd Group: Monitoring Requires: collectd = %version-%release BuildRequires: libvirt-devel libxml2-devel %description libvirt This plugin provides virtual machines support for collectd %endif %if_enabled monitorus %package monitorus Summary: Monitorus support module for collectd Group: Monitoring Requires: collectd = %version-%release %description monitorus This plugin provides Monitorus support for collectd %endif %if_enabled mysql %package mysql Summary: MySQL support module for collectd Group: Monitoring Requires: collectd = %version-%release Requires: libMySQL BuildRequires: libMySQL-devel %description mysql This plugin provides MySQL server support for collectd %endif %if_enabled netlink %package netlink Summary: netlink support module for collectd Group: Monitoring Requires: collectd = %version-%release BuildRequires: libnetlink-devel %description netlink This plugin provides netlink support for collectd %endif %if_enabled nginx %package nginx Summary: nginx support module for collectd Group: Monitoring Requires: collectd = %version-%release BuildRequires: libcurl-devel %description nginx This plugin provides nginx support for collectd %endif %if_enabled notify_desktop %package notify_desktop Summary: desktop notification support module for collectd Group: Monitoring Requires: collectd = %version-%release BuildRequires: libnotify-devel %description notify_desktop This plugin provides desktop notification support for collectd %endif %if_enabled notify_email %package notify_email Summary: email notification support module for collectd Group: Monitoring Requires: collectd = %version-%release BuildRequires: libesmtp-devel %description notify_email This plugin provides email notification support for collectd %endif %if_enabled nut %package nut Summary: Network UPS Tools support module for collectd Group: Monitoring Requires: collectd = %version-%release Requires: libnut BuildRequires: nut-devel %description nut This plugin provides UPS support for collectd (with NUT) %endif %if_enabled openvz %package openvz Summary: OpenVZ support module for collectd Group: Monitoring Requires: collectd = %version-%release %description openvz This plugin provides OpenVZ support for collectd %endif %if_enabled rrdtool %package rrdtool Summary: rrdtool support module for collectd Group: Monitoring Requires: collectd = %version-%release Requires: rrdtool BuildRequires: librrd-devel %description rrdtool This plugin provides RRD Tool support for collectd %endif %if_enabled ping %package ping Summary: ICMP support module for collectd Group: Monitoring Requires: collectd = %version-%release BuildRequires: liboping-devel %description ping This plugin provides ICMP (ping check) support for collectd %endif %if_enabled postgresql %package postgresql Summary: PostgreSQL support module for collectd Group: Monitoring Requires: collectd = %version-%release BuildRequires: postgresql-devel %description postgresql This plugin provides PostgreSQL support for collectd %endif %if_enabled sensors %package sensors Summary: lm_sensors support module for collectd Group: Monitoring Requires: collectd = %version-%release Requires: lm_sensors3 BuildRequires: libsensors3-devel >= 3.1.0-alt4 %description sensors This plugin provides sensors support for collectd (with lm_sensors) %endif %if_enabled snmp %package snmp Summary: SNMP support module for collectd Group: Monitoring Requires: collectd = %version-%release Requires: libnet-snmp BuildRequires: libnet-snmp-devel %description snmp This plugin provides SNMP support for collectd %endif %if_enabled xmms %package xmms Summary: XMMS support module for collectd Group: Monitoring Requires: collectd = %version-%release Requires: libxmms BuildRequires: libxmms-devel %description xmms This plugin provides XMMS support for collectd %endif %if_enabled ipmi %package ipmi Summary: IPMI support module for collectd Group: Monitoring Requires: collectd = %version-%release Requires: libopenipmi BuildRequires: libopenipmi-devel %description ipmi This plugin provides ipmi support for collectd %endif %package -n nagios-plugins-%name Summary: Nagios plugin to use data from collectd Group: Monitoring Requires: nagios-common %description -n nagios-plugins-%name This Nagios plugin provides possibility to feed statistics from collectd into nagios to avoid extra sensor-caused load %prep %setup %patch0 -p1 %__subst 's/ -Werror//' src/Makefile.* mkdir libltdl %build #libtoolize --ltdl --copy --force #%autoreconf ./build.sh # seems like mainstream uses /var for localstatedir, ALT uses /var/lib %configure \ --disable-apple_sensors \ --disable-ascent \ --disable-java \ --without-java \ --enable-debug \ %{subst_enable apache} \ %{subst_enable curl} \ %{subst_enable dbi} \ %{subst_enable libvirt} \ %{subst_enable monitorus} \ %{subst_enable mysql} \ %{subst_enable netlink} \ %{subst_enable nginx} \ %{subst_enable notify_desktop} \ %{subst_enable notify_email} \ %{subst_enable nut} \ %{subst_enable openvz} \ %{subst_enable rrdtool} \ %{subst_enable ping} \ %{subst_enable postgresql} \ %if_enabled sensors --with-libsensors=%prefix \ %{subst_enable sensors} \ %endif %if_enabled perl %{subst_enable perl} \ --with-libperl=/usr/lib \ %endif %{subst_enable snmp} \ %{subst_enable xmms} \ %{subst_enable ipmi} \ %{subst_enable static} \ --localstatedir=%_var \ # %make %install %makeinstall_std INSTALLDIRS=vendor install -pDm644 src/collectd.conf %buildroot%_sysconfdir/%name.conf sed -i 's,/usr/var,/var,g' %buildroot%_sysconfdir/%name.conf install -pDm755 contrib/altlinux/%name.init %buildroot%_initdir/%name install -d %buildroot%_libdir/%name/ %buildroot%_localstatedir/%name/ rm -f %buildroot{%_libdir/%name/*.la,%_libdir/perl5/*/perllocal.pod} %if_enabled cgi install -pDm755 contrib/collection.cgi %buildroot%apache2_cgibindir/%name/collection.cgi install -pDm644 contrib/altlinux/%name.conf %buildroot%apache2_extra_available/%name.conf cat >> %buildroot%_sysconfdir/collection.conf << EOF datadir: "/var/lib/collectd/rrd" libdir: "/var/lib/collectd/" EOF %endif %post %post_service %name %preun %preun_service %name %files %doc AUTHORS ChangeLog README TODO %doc contrib/ %config(noreplace) %_sysconfdir/%name.conf %_initdir/%name %_sbindir/%name %_sbindir/collectdmon %_man1dir/*.1* %_man5dir/*.5* %_datadir/%name/ %dir %_localstatedir/%name/ %dir %_libdir/%name/ %_libdir/%name/*.so %{?_enable_apache:%exclude %_libdir/%name/apache.so} %{?_enable_bind:%exclude %_libdir/%name/bind.so} %{?_enable_curl:%exclude %_libdir/%name/curl.so} %{?_enable_dbi:%exclude %_libdir/%name/dbi.so} %{?_enable_libvirt:%exclude %_libdir/%name/libvirt.so} %{?_enable_mysql:%exclude %_libdir/%name/mysql.so} %{?_enable_netlink:%exclude %_libdir/%name/netlink.so} %{?_enable_nginx:%exclude %_libdir/%name/nginx.so} %{?_enable_notify_email:%exclude %_libdir/%name/notify_email.so} %{?_enable_notify_desktop:%exclude %_libdir/%name/notify_desktop.so} %{?_enable_nut:%exclude %_libdir/%name/nut.so} %{?_enable_ping:%exclude %_libdir/%name/ping.so} %{?_enable_perl:%exclude %_libdir/%name/perl.so} %{?_enable_postgresql:%exclude %_libdir/%name/postgresql.so} %{?_enable_rrdtool:%exclude %_libdir/%name/rrdtool.so} %{?_enable_sensors:%exclude %_libdir/%name/sensors.so} %{?_enable_snmp:%exclude %_libdir/%name/snmp.so} %{?_enable_xmms:%exclude %_libdir/%name/xmms.so} %{?_enable_ipmi:%exclude %_libdir/%name/ipmi.so} %files -n %libname %_libdir/%libname.so.* %files -n %libname-devel %_includedir/%name/ %_libdir/%libname.so %_pkgconfigdir/* %files -n perl-Collectd %perl_vendor_privlib/*.pm %perl_vendor_privlib/*/*.pm %perl_vendor_man3dir/* %if_enabled apache %files apache %_libdir/%name/apache.so %endif %if_enabled bind %files bind %_libdir/%name/bind.so %endif %if_enabled cgi %files cgi %dir %apache2_cgibindir/%name/ %apache2_cgibindir/%name/collection.cgi %config(noreplace) %apache2_extra_available/%name.conf %config(noreplace) %_sysconfdir/collection.conf %endif %if_enabled curl %files curl %_libdir/%name/curl.so %endif %if_enabled dbi %files dbi %_libdir/%name/dbi.so %endif %if_enabled libvirt %files libvirt %_libdir/%name/libvirt.so %endif %if_enabled monitorus %files monitorus %perl_vendor_privlib/*/*/Monitorus.pm %endif %if_enabled mysql %files mysql %_libdir/%name/mysql.so %endif %if_enabled netlink %files netlink %_libdir/%name/netlink.so %endif %if_enabled nginx %files nginx %_libdir/%name/nginx.so %endif %if_enabled notify_desktop %files notify_desktop %_libdir/%name/notify_desktop.so %endif %if_enabled notify_email %files notify_email %_libdir/%name/notify_email.so %endif %if_enabled nut %files nut %_libdir/%name/nut.so %endif %if_enabled openvz %files openvz %perl_vendor_privlib/*/*/OpenVZ.pm %endif %if_enabled ping %files ping %_libdir/%name/ping.so %endif %if_enabled postgresql %files postgresql %_libdir/%name/postgresql.so %endif %if_enabled rrdtool %files rrdtool %_libdir/%name/rrdtool.so %endif %if_enabled sensors %files sensors %_libdir/%name/sensors.so %endif %if_enabled snmp %files snmp %_libdir/%name/snmp.so %endif %if_enabled xmms %files xmms %_libdir/%name/xmms.so %endif %if_enabled ipmi %files ipmi %_libdir/%name/ipmi.so %endif %if_enabled perl %_libdir/%name/perl.so %endif %files full %files -n nagios-plugins-%name %_bindir/collectd-nagios # TODO: # - consider building with: libiokit, liboconfig (system), # libiptc [kernhdrs], libjvm?, libkvm, libperl # - need external fixups: libupsclient [2.2.x?] # - collectd -> collectd-base, collectd-full -> collectd? %changelog * Tue Jan 19 2010 Anton Farygin 4.9.1-alt1 - new version - enabled IPMI and apache plugins - added cgi package * Mon Dec 21 2009 Michael Shigorin 4.9.0-alt1 - 4.9.0 + added plugins: NetApp, Python, RouterOS, ContextSwitch, Monitorus, OpenVZ + enhanced plugins: cURL, Ping, DF, Processes * Mon Dec 21 2009 Michael Shigorin 4.8.2-alt1 - 4.8.2 * Wed Oct 07 2009 Anton Farygin 4.8.1-alt1 - new version * Wed Sep 23 2009 Anton Farygin 4.8.0-alt1 - new version * Tue Jun 30 2009 Anton Farygin 4.7.1-alt1 - new version - fixed build with new libsensors3-devel * Mon Jun 01 2009 Anton Farygin 4.7.0-alt8 - collectd-sensors required lm_sensors3 - target "restart" fixed in initscrip * Sat May 30 2009 Anton Farygin 4.7.0-alt7 - build with libstatgrab - use collectdmon instead of collectd in initscript * Fri May 29 2009 Anton Farygin 4.7.0-alt6 - allow use Debug in LogLevel (--enable-debug) - merge collectd-4.7 branch from upstream, with fixes: rrdtool plugin: If `flush' cannot find the requested file, issue an `INFO'. src/utils_cache.c: Fix incorrect checking of persistent thresholds. * Tue May 26 2009 Anton Farygin 4.7.0-alt5 - build from git - fixed link with libsensors (Closes: #20162) * Fri May 15 2009 Michael Shigorin 4.7.0-alt4 - added v3-to-v4 migration link, thanks lav@ * Fri May 15 2009 Michael Shigorin 4.7.0-alt3 - added perl subpackage * Thu May 14 2009 Michael Shigorin 4.7.0-alt2 - added dbi, libvirt, notify_desktop, notify_email, postgresql subpackages - moved bind, curl, netlink, nginx, rrdtool plugins to subpackages - added libesmtp support to notify_email plugin - ping plugin built with system liboping - optional libgcrypt/libpcap support for network plugin - disabled ascent plugin (seems unneeded and a bit depsy) - re-added specific XFS support to df plugin - introduced "full" subpackage to pull in all the plugins - prepared libstatgrab support (waits for #20040) - considerable spec cleanup (thanks mplayer.spec for inspiration) - fixed heaps of engrish * Wed May 13 2009 Michael Shigorin 4.7.0-alt1 - 4.7.0 - well, I took the plunge and moved to 4.x; however you will have to either handle transition yourself (it's about reading documentation and fiddling with migration scripts anyways, not much to be automated) - temporarily(tm) disabled -apache and -cgi subpackages: anyone knows where %%apache_cgibindir and %%apache_confdir macros live in this village?! - temporarily disabled -nut subpackage: build troubles - introduced client library subpackages * Mon Jul 28 2008 Michael Shigorin 4.4.2-alt1 - 4.4.2 (minor bugfixes) - NB: this build was actually verified in production * Thu Jun 26 2008 Michael Shigorin 4.4.1-alt1 - 4.4.1: yeah, I've skipped quite a few 4.x releases while trying to get back to this package... now's about time ;-) * Sun Feb 10 2008 Michael Shigorin 4.2.4-alt3 - enabled features: + libnetlink, libstatgrab (core package) + snmp, nut, xmms (subpackages) * Sun Feb 10 2008 Michael Shigorin 4.2.4-alt2 - removed patches * Tue Jan 22 2008 Michael Shigorin 4.2.4-alt1 - 4.2.4 (major feature enhancements [over 4.0]) + built for Daedalus + note http://collectd.org/migrate-v3-v4.shtml or wipe %_localstatedir/%name/ clean of collected data * Tue Aug 14 2007 Michael Shigorin 4.0.6-alt1 - 4.0.6 (major feature enhancements) + warning, there are major RRD- and CGI-related changes! you should not update the package blindly if it is used + please see contrib/migrate-3-4.px and associated README - added apache2-devel, perl-devel to BuildRequires - enabled apache2 subpackage by default - introduced sample %_sysconfdir/collection.conf (adapted from git) * Thu May 31 2007 Michael Shigorin 3.11.5-alt1 - 3.11.5 (security fixes) + fixed buffer overflow in the ntpd plugin + fixed support for Linux 2.4 in the disk plugin + added large file support (LFS) * Tue Apr 03 2007 Michael Shigorin 3.11.3-alt1 - 3.11.3 (minor bugfixes) * Sat Feb 10 2007 Michael Shigorin 3.11.1-alt1 - 3.11.1 (minor bugfixes) * Sun Jan 28 2007 Michael Shigorin 3.11.0-alt1 - 3.11.0 - removed patch1 (fixed upstream) - fixed build with recent gcc4.1 (removed -Werror since -Wno-unused wouldn't help) * Fri Dec 22 2006 Michael Shigorin 3.10.3-alt1 - thanks Vitaly Lipatov (lav@) for fixing build (patch sent upstream) and other improvements - service off by default, see also [ru]: http://lists.altlinux.org/pipermail/devel/2006-December/039909.html * Sat Dec 09 2006 Vitaly Lipatov 3.10.3-alt0.2 - NMU: set config as noreplace - add post/preun service * Mon Nov 20 2006 Vitaly Lipatov 3.10.3-alt0.1 - NMU: new version 3.10.3 - fix compiling (remove syslog redefine) - fix default paths in /var (bug #10237) - move cgi script to cgi/collectd dir - add .htaccess, collectd.conf for apache * Sun Sep 17 2006 Michael Shigorin 3.10.1-alt2 - accepted spec patch from lakostis@ + NMU. + .spec cleanup. + remove unwanted buildrequires. + build with system libltdl. + build with linux-libc-headers. + disable -static builds by default. - fixed collectd.conf installation (source file moved) * Sat Aug 05 2006 Michael Shigorin 3.10.1-alt1 - 3.10.1 * Sun Jun 18 2006 Michael Shigorin 3.9.3-alt1 - 3.9.3 (minor bugfixes) * Mon May 15 2006 Michael Shigorin 3.9.2-alt1 - 3.9.2 (minor bugfixes) + ping plugin would stop working after roughly one week with default settings * Fri Apr 28 2006 Michael Shigorin 3.9.1-alt1 - 3.9.1 * Sun Apr 23 2006 Michael Shigorin 3.9.0-alt2 - macro control over modules (subpackages) built: apache, cgi, mysql, sensors (the rest is in the main package) * Fri Apr 21 2006 Michael Shigorin 3.9.0-alt1 - 3.9.0 - updated buildrequires for new plugins - added mysql subpackage - added cgi subpackage (WARNING: unrestricted out-of-box) - patched hddtemp module regarding higher SCSI majors - disabled apache support for the time being - disabled apple sensors - remove (unpackaged) *.la too * Fri Apr 07 2006 Michael Shigorin 3.8.3-alt1 - 3.8.3 * Wed Mar 15 2006 Michael Shigorin 3.8.2-alt1 - 3.8.2 - built for Sisyphus - sample configuration file taken from contrib/ now *and* moved to %_sysconfdir/%name.conf [3.8.1-1 spec] - I've not got around to make this all work more out-of-box, spec fixes are welcome but maybe it's better as is (setup isn't that hard) * Wed Mar 15 2006 Michael Shigorin 3.8.0-alt1 - 3.8.0 * Tue Jan 31 2006 Michael Shigorin 3.7.0-alt0.M24.1 - 3.7.0 * Mon Dec 19 2005 Michael Shigorin 3.5.1-alt0.M24.1 - 3.5.1 - spec cleanup * Mon Dec 05 2005 Michael Shigorin 3.4.0-alt0.M24.1 - 3.4.0 * Wed Nov 09 2005 Michael Shigorin 3.3.0-alt0.M24.1 - 3.3.0 * Thu Oct 27 2005 Michael Shigorin 3.2.0-alt0.M24.1 - 3.2.0 * Mon Oct 17 2005 Michael Shigorin 3.1.0-alt0.M24.1 - built for ALT Linux Master 2.4 - spec cleanup * Fri Sep 30 2005 Florian octo Forster 3.0.0-1 - New upstream version - Split the package into `collectd' and `collectd-sensors' * Fri Sep 16 2005 Florian octo Forster 2.1.0-1 - New upstream version * Mon Sep 10 2005 Florian octo Forster 2.0.0-1 - New upstream version * Mon Aug 29 2005 Florian octo Forster 1.8.0-1 - New upstream version * Sun Aug 25 2005 Florian octo Forster 1.7.0-1 - New upstream version * Sun Aug 21 2005 Florian octo Forster 1.6.0-1 - New upstream version * Sun Jul 17 2005 Florian octo Forster 1.5.1-1 - New upstream version * Sun Jul 17 2005 Florian octo Forster 1.5-1 - New upstream version * Mon Jul 11 2005 Florian octo Forster 1.4.2-1 - New upstream version * Sat Jul 09 2005 Florian octo Forster 1.4-1 - Built on RedHat 7.3