Code

Bumped version to 4.5.2; Updated ChangeLog.
[collectd.git] / contrib / redhat / collectd.spec
1 Summary:        Statistics collection daemon for filling RRD files.
2 Name:           collectd
3 Version:        4.3.1
4 Release:        0.centos5
5 Source:         http://collectd.org/files/%{name}-%{version}.tar.gz
6 License:        GPL
7 Group:          System Environment/Daemons
8 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
9 BuildPrereq:    lm_sensors-devel, mysql-devel, rrdtool-devel, curl-devel, libpcap-devel, net-snmp-devel, libstatgrab-devel, mysql-devel, libxml2-devel, libiptcdata-devel
10 Requires:       rrdtool, perl-Regexp-Common, libstatgrab
11 Packager:       RightScale <support@rightscale.com>
12 Vendor:         collectd development team <collectd@verplant.org>
14 %description
15 collectd is a small daemon which collects system information periodically and
16 provides mechanisms to monitor and store the values in a variety of ways. It
17 is written in C for performance. Since the daemon doesn't need to startup
18 every time it wants to update the values it's very fast and easy on the
19 system. Also, the statistics are very fine grained since the files are updated
20 every 10 seconds.
22 %package apache
23 Summary:        apache-plugin for collectd.
24 Group:          System Environment/Daemons
25 Requires:       collectd = %{version}, curl
26 %description apache
27 This plugin collects data provided by Apache's `mod_status'.
29 %package email
30 Summary:        email-plugin for collectd.
31 Group:          System Environment/Daemons
32 Requires:       collectd = %{version}, spamassassin
33 %description email
34 This plugin collects data provided by spamassassin.
36 %package mysql
37 Summary:        mysql-module for collectd.
38 Group:          System Environment/Daemons
39 Requires:       collectd = %{version}, mysql
40 %description mysql
41 MySQL querying plugin. This plugins provides data of issued commands, called
42 handlers and database traffic.
44 %package nginx
45 Summary:        nginx-plugin for collectd.
46 Group:          System Environment/Daemons
47 Requires:       collectd = %{version}, curl
48 %description nginx
49 This plugin gets data provided by nginx.
51 %package sensors
52 Summary:        libsensors-module for collectd.
53 Group:          System Environment/Daemons
54 Requires:       collectd = %{version}, lm_sensors
55 %description sensors
56 This plugin for collectd provides querying of sensors supported by lm_sensors.
58 %package snmp
59 Summary:        snmp-module for collectd.
60 Group:          System Environment/Daemons
61 Requires:       collectd = %{version}, net-snmp
62 %description snmp
63 This plugin for collectd allows querying of network equipment using SNMP.
65 %prep
66 rm -rf $RPM_BUILD_ROOT
67 %setup
69 %build
70 ./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
71 make
73 %install
74 make install DESTDIR=$RPM_BUILD_ROOT
75 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
76 mkdir -p $RPM_BUILD_ROOT/var/www/cgi-bin
77 cp contrib/redhat/init.d-collectd $RPM_BUILD_ROOT/etc/rc.d/init.d/collectd
78 cp contrib/collection.cgi $RPM_BUILD_ROOT/var/www/cgi-bin
79 mkdir -p $RPM_BUILD_ROOT/etc/collectd.d
80 mkdir -p $RPM_BUILD_ROOT/var/lib/collectd
81 ### Clean up docs
82 find contrib/ -type f -exec %{__chmod} a-x {} \;
83 ###Modify Config for Redhat Based Distros
84 cp contrib/redhat/collectd.conf $RPM_BUILD_ROOT/etc/collectd.conf
85 sed -i 's:#BaseDir     "/usr/var/lib/collectd":BaseDir     "/var/lib/collectd":' $RPM_BUILD_ROOT/etc/collectd.conf
86 sed -i 's:#PIDFile     "/usr/var/run/collectd.pid":PIDFile     "/var/run/collectd.pid":' $RPM_BUILD_ROOT/etc/collectd.conf
87 sed -i 's:#PluginDir   "/usr/lib/collectd":PluginDir   "/usr/lib/collectd":' $RPM_BUILD_ROOT/etc/collectd.conf
88 sed -i 's:#TypesDB     "/usr/lib/collectd/types.db":TypesDB     "/usr/lib/collectd/types.db":' $RPM_BUILD_ROOT/etc/collectd.conf
89 sed -i 's:#Interval     10:Interval     10:' $RPM_BUILD_ROOT/etc/collectd.conf
90 sed -i 's:#ReadThreads  5:ReadThreads  5:' $RPM_BUILD_ROOT/etc/collectd.conf
91 ##Move config contribs
92 cp contrib/redhat/apache.conf $RPM_BUILD_ROOT/etc/collectd.d/apache.conf
93 cp contrib/redhat/email.conf $RPM_BUILD_ROOT/etc/collectd.d/email.conf
94 cp contrib/redhat/sensors.conf $RPM_BUILD_ROOT/etc/collectd.d/sensors.conf
95 cp contrib/redhat/mysql.conf $RPM_BUILD_ROOT/etc/collectd.d/mysql.conf
96 cp contrib/redhat/nginx.conf $RPM_BUILD_ROOT/etc/collectd.d/nginx.conf
97 cp contrib/redhat/snmp.conf $RPM_BUILD_ROOT/etc/collectd.d/snmp.conf
99 %clean
100 rm -rf $RPM_BUILD_ROOT
102 %post
103 /sbin/chkconfig --add collectd
104 /sbin/chkconfig collectd on
106 %preun
107 if [ "$1" = 0 ]; then
108    /sbin/chkconfig collectd off
109    /etc/init.d/collectd stop
110    /sbin/chkconfig --del collectd
111 fi
112 exit 0
114 %postun
115 if [ "$1" -ge 1 ]; then
116     /etc/init.d/collectd restart
117 fi
118 exit 0
120 %files
121 %defattr(-,root,root)
122 %doc AUTHORS COPYING ChangeLog INSTALL NEWS README contrib/
123 %attr(0644,root,root) %config(noreplace) /etc/collectd.conf
124 %attr(0755,root,root) /etc/rc.d/init.d/collectd
125 %attr(0755,root,root) /var/www/cgi-bin/collection.cgi
126 %attr(0755,root,root) %{_sbindir}/collectd
127 %attr(0755,root,root) %{_bindir}/collectd-nagios
128 %attr(0755,root,root) %{_sbindir}/collectdmon
129 %attr(0644,root,root) %{_mandir}/man1/*
130 %attr(0644,root,root) %{_mandir}/man5/*
131 %dir /etc/collectd.d
133 %attr(0644,root,root) %{_libdir}/%{name}/apcups.so*
134 %attr(0644,root,root) %{_libdir}/%{name}/apcups.la
136 #%attr(0644,root,root) %{_libdir}/%{name}/apple_sensors.so*
137 #%attr(0644,root,root) %{_libdir}/%{name}/apple_sensors.la
139 %attr(0644,root,root) %{_libdir}/%{name}/battery.so*
140 %attr(0644,root,root) %{_libdir}/%{name}/battery.la
142 %attr(0644,root,root) %{_libdir}/%{name}/cpufreq.so*
143 %attr(0644,root,root) %{_libdir}/%{name}/cpufreq.la
145 %attr(0644,root,root) %{_libdir}/%{name}/cpu.so*
146 %attr(0644,root,root) %{_libdir}/%{name}/cpu.la
148 %attr(0644,root,root) %{_libdir}/%{name}/csv.so*
149 %attr(0644,root,root) %{_libdir}/%{name}/csv.la
151 %attr(0644,root,root) %{_libdir}/%{name}/df.so*
152 %attr(0644,root,root) %{_libdir}/%{name}/df.la
154 %attr(0644,root,root) %{_libdir}/%{name}/disk.so*
155 %attr(0644,root,root) %{_libdir}/%{name}/disk.la
157 %attr(0644,root,root) %{_libdir}/%{name}/dns.so*
158 %attr(0644,root,root) %{_libdir}/%{name}/dns.la
160 %attr(0644,root,root) %{_libdir}/%{name}/entropy.so*
161 %attr(0644,root,root) %{_libdir}/%{name}/entropy.la
163 %attr(0644,root,root) %{_libdir}/%{name}/exec.so*
164 %attr(0644,root,root) %{_libdir}/%{name}/exec.la
166 %attr(0644,root,root) %{_libdir}/%{name}/hddtemp.so*
167 %attr(0644,root,root) %{_libdir}/%{name}/hddtemp.la
169 %attr(0644,root,root) %{_libdir}/%{name}/interface.so*
170 %attr(0644,root,root) %{_libdir}/%{name}/interface.la
172 #%attr(0644,root,root) %{_libdir}/%{name}/iptables.so*
173 #%attr(0644,root,root) %{_libdir}/%{name}/iptables.la
175 %attr(0644,root,root) %{_libdir}/%{name}/irq.so*
176 %attr(0644,root,root) %{_libdir}/%{name}/irq.la
178 %attr(0644,root,root) %{_libdir}/%{name}/load.so*
179 %attr(0644,root,root) %{_libdir}/%{name}/load.la
181 %attr(0644,root,root) %{_libdir}/%{name}/logfile.so*
182 %attr(0644,root,root) %{_libdir}/%{name}/logfile.la
184 %attr(0644,root,root) %{_libdir}/%{name}/mbmon.so
185 %attr(0644,root,root) %{_libdir}/%{name}/mbmon.la
187 %attr(0644,root,root) %{_libdir}/%{name}/memcached.so*
188 %attr(0644,root,root) %{_libdir}/%{name}/memcached.la
190 %attr(0644,root,root) %{_libdir}/%{name}/memory.so*
191 %attr(0644,root,root) %{_libdir}/%{name}/memory.la
193 %attr(0644,root,root) %{_libdir}/%{name}/multimeter.so*
194 %attr(0644,root,root) %{_libdir}/%{name}/multimeter.la
196 %attr(0644,root,root) %{_libdir}/%{name}/network.so*
197 %attr(0644,root,root) %{_libdir}/%{name}/network.la
199 %attr(0644,root,root) %{_libdir}/%{name}/nfs.so*
200 %attr(0644,root,root) %{_libdir}/%{name}/nfs.la
202 %attr(0644,root,root) %{_libdir}/%{name}/ntpd.so*
203 %attr(0644,root,root) %{_libdir}/%{name}/ntpd.la
205 #%attr(0644,root,root) %{_libdir}/%{name}/nut.so*
206 #%attr(0644,root,root) %{_libdir}/%{name}/nut.la
208 %attr(0644,root,root) %{_libdir}/%{name}/perl.so*
209 %attr(0644,root,root) %{_libdir}/%{name}/perl.la
211 %attr(0644,root,root) %{_libdir}/%{name}/ping.so*
212 %attr(0644,root,root) %{_libdir}/%{name}/ping.la
214 %attr(0644,root,root) %{_libdir}/%{name}/processes.so*
215 %attr(0644,root,root) %{_libdir}/%{name}/processes.la
217 %attr(0644,root,root) %{_libdir}/%{name}/rrdtool.so*
218 %attr(0644,root,root) %{_libdir}/%{name}/rrdtool.la
220 %attr(0644,root,root) %{_libdir}/%{name}/serial.so*
221 %attr(0644,root,root) %{_libdir}/%{name}/serial.la
223 %attr(0644,root,root) %{_libdir}/%{name}/swap.so*
224 %attr(0644,root,root) %{_libdir}/%{name}/swap.la
226 %attr(0644,root,root) %{_libdir}/%{name}/syslog.so*
227 %attr(0644,root,root) %{_libdir}/%{name}/syslog.la
229 #%attr(0644,root,root) %{_libdir}/%{name}/tape.so*
230 #%attr(0644,root,root) %{_libdir}/%{name}/tape.la
232 %attr(0644,root,root) %{_libdir}/%{name}/tcpconns.so*
233 %attr(0644,root,root) %{_libdir}/%{name}/tcpconns.la
235 %attr(0644,root,root) %{_libdir}/%{name}/unixsock.so*
236 %attr(0644,root,root) %{_libdir}/%{name}/unixsock.la
238 %attr(0644,root,root) %{_libdir}/%{name}/users.so*
239 %attr(0644,root,root) %{_libdir}/%{name}/users.la
241 %attr(0644,root,root) %{_libdir}/%{name}/uuid.so*
242 %attr(0644,root,root) %{_libdir}/%{name}/uuid.la
244 %attr(0644,root,root) %{_libdir}/%{name}/vserver.so*
245 %attr(0644,root,root) %{_libdir}/%{name}/vserver.la
247 %attr(0644,root,root) %{_libdir}/%{name}/wireless.so*
248 %attr(0644,root,root) %{_libdir}/%{name}/wireless.la
250 %attr(0644,root,root) %{_libdir}/%{name}/types.db
252 %exclude %{_libdir}/perl5/5.8.8/%{_arch}-linux-thread-multi/perllocal.pod
253 %attr(0644,root,root) %{_libdir}/perl5/site_perl/5.8.8/Collectd.pm
254 %attr(0644,root,root) %{_libdir}/perl5/site_perl/5.8.8/Collectd/Unixsock.pm
255 %attr(0644,root,root) %{_libdir}/perl5/site_perl/5.8.8/%{_arch}-linux-thread-multi/auto/Collectd/.packlist
256 %attr(0644,root,root) /usr/share/man/man3/Collectd::Unixsock.3pm.gz
258 %dir /var/lib/collectd
260 %files apache
261 %attr(0644,root,root) %{_libdir}/%{name}/apache.so*
262 %attr(0644,root,root) %{_libdir}/%{name}/apache.la
263 %attr(0644,root,root) /etc/collectd.d/apache.conf
265 %files email
266 %attr(0644,root,root) %{_libdir}/%{name}/email.so*
267 %attr(0644,root,root) %{_libdir}/%{name}/email.la
268 %attr(0644,root,root) /etc/collectd.d/email.conf
270 %files mysql
271 %attr(0644,root,root) %{_libdir}/%{name}/mysql.so*
272 %attr(0644,root,root) %{_libdir}/%{name}/mysql.la
273 %attr(0644,root,root) /etc/collectd.d/mysql.conf
275 %files nginx
276 %attr(0644,root,root) %{_libdir}/%{name}/nginx.so*
277 %attr(0644,root,root) %{_libdir}/%{name}/nginx.la
278 %attr(0644,root,root) /etc/collectd.d/nginx.conf
280 %files sensors
281 %attr(0644,root,root) %{_libdir}/%{name}/sensors.so*
282 %attr(0644,root,root) %{_libdir}/%{name}/sensors.la
283 %attr(0644,root,root) /etc/collectd.d/sensors.conf
285 %files snmp
286 %attr(0644,root,root) %{_libdir}/%{name}/snmp.so*
287 %attr(0644,root,root) %{_libdir}/%{name}/snmp.la
288 %attr(0644,root,root) /etc/collectd.d/snmp.conf
290 %changelog
291 * Mon Mar 17 2008 RightScale <support@rightscale.com> 4.3.1
292 - New upstream version
293 - Changes to support 4.3.1
294 - Added More Prereqs to support more plugins
295 - Added support for perl plugin
297 * Mon Aug 06 2007 Kjell Randa <Kjell.Randa@broadpark.no> 4.0.6
298 - New upstream version
300 * Wed Jul 25 2007 Kjell Randa <Kjell.Randa@broadpark.no> 4.0.5
301 - New major releas
302 - Changes to support 4.0.5 
304 * Wed Jan 11 2007 Iain Lea <iain@bricbrac.de> 3.11.0-0
305 - fixed spec file to build correctly on fedora core
306 - added improved init.d script to work with chkconfig
307 - added %post and %postun to call chkconfig automatically
309 * Sun Jul 09 2006 Florian octo Forster <octo@verplant.org> 3.10.0-1
310 - New upstream version
312 * Tue Jun 25 2006 Florian octo Forster <octo@verplant.org> 3.9.4-1
313 - New upstream version
315 * Tue Jun 01 2006 Florian octo Forster <octo@verplant.org> 3.9.3-1
316 - New upstream version
318 * Tue May 09 2006 Florian octo Forster <octo@verplant.org> 3.9.2-1
319 - New upstream version
321 * Tue May 09 2006 Florian octo Forster <octo@verplant.org> 3.8.5-1
322 - New upstream version
324 * Fri Apr 21 2006 Florian octo Forster <octo@verplant.org> 3.9.1-1
325 - New upstream version
327 * Fri Apr 14 2006 Florian octo Forster <octo@verplant.org> 3.9.0-1
328 - New upstream version
329 - Added the `apache' package.
331 * Thu Mar 14 2006 Florian octo Forster <octo@verplant.org> 3.8.2-1
332 - New upstream version
334 * Thu Mar 13 2006 Florian octo Forster <octo@verplant.org> 3.8.1-1
335 - New upstream version
337 * Thu Mar 09 2006 Florian octo Forster <octo@verplant.org> 3.8.0-1
338 - New upstream version
340 * Sat Feb 18 2006 Florian octo Forster <octo@verplant.org> 3.7.2-1
341 - Include `tape.so' so the build doesn't terminate because of missing files..
342 - New upstream version
344 * Sat Feb 04 2006 Florian octo Forster <octo@verplant.org> 3.7.1-1
345 - New upstream version
347 * Mon Jan 30 2006 Florian octo Forster <octo@verplant.org> 3.7.0-1
348 - New upstream version
349 - Removed the extra `hddtemp' package
351 * Tue Jan 24 2006 Florian octo Forster <octo@verplant.org> 3.6.2-1
352 - New upstream version
354 * Fri Jan 20 2006 Florian octo Forster <octo@verplant.org> 3.6.1-1
355 - New upstream version
357 * Fri Jan 20 2006 Florian octo Forster <octo@verplant.org> 3.6.0-1
358 - New upstream version
359 - Added config file, `collectd.conf(5)', `df.so'
360 - Added package `collectd-mysql', dependency on `mysqlclient10 | mysql'
362 * Wed Dec 07 2005 Florian octo Forster <octo@verplant.org> 3.5.0-1
363 - New upstream version
365 * Sat Nov 26 2005 Florian octo Forster <octo@verplant.org> 3.4.0-1
366 - New upstream version
368 * Sat Nov 05 2005 Florian octo Forster <octo@verplant.org> 3.3.0-1
369 - New upstream version
371 * Tue Oct 26 2005 Florian octo Forster <octo@verplant.org> 3.2.0-1
372 - New upstream version
373 - Added statement to remove the `*.la' files. This fixes a problem when
374   `Unpackaged files terminate build' is in effect.
375 - Added `processes.so*' to the main package
377 * Fri Oct 14 2005 Florian octo Forster <octo@verplant.org> 3.1.0-1
378 - New upstream version
379 - Added package `collectd-hddtemp'
381 * Fri Sep 30 2005 Florian octo Forster <octo@verplant.org> 3.0.0-1
382 - New upstream version
383 - Split the package into `collectd' and `collectd-sensors'
385 * Fri Sep 16 2005 Florian octo Forster <octo@verplant.org> 2.1.0-1
386 - New upstream version
388 * Mon Sep 10 2005 Florian octo Forster <octo@verplant.org> 2.0.0-1
389 - New upstream version
391 * Mon Aug 29 2005 Florian octo Forster <octo@verplant.org> 1.8.0-1
392 - New upstream version
394 * Sun Aug 25 2005 Florian octo Forster <octo@verplant.org> 1.7.0-1
395 - New upstream version
397 * Sun Aug 21 2005 Florian octo Forster <octo@verplant.org> 1.6.0-1
398 - New upstream version
400 * Sun Jul 17 2005 Florian octo Forster <octo@verplant.org> 1.5.1-1
401 - New upstream version
403 * Sun Jul 17 2005 Florian octo Forster <octo@verplant.org> 1.5-1
404 - New upstream version
406 * Mon Jul 11 2005 Florian octo Forster <octo@verplant.org> 1.4.2-1
407 - New upstream version
409 * Sat Jul 09 2005 Florian octo Forster <octo@verplant.org> 1.4-1
410 - Built on RedHat 7.3