2 # - lm_sensors subpackage
3 # - initscripts for local/client/server mode (subpackage ?)
4 # - package contrib scripts as %doc
5 # - put every plugin into subpackages
6 # - Current plugins status:
7 # apache . . . . . . yes
8 # apcups . . . . . . yes
9 # apple_sensors . . . no
10 # ascent . . . . . . yes
11 # battery . . . . . . yes
12 # cpu . . . . . . . . yes
13 # cpufreq . . . . . . yes
14 # csv . . . . . . . . yes
15 # df . . . . . . . . yes
16 # disk . . . . . . . yes
17 # dns . . . . . . . . yes
18 # email . . . . . . . yes
19 # entropy . . . . . . yes
20 # exec . . . . . . . yes
21 # hddtemp . . . . . . yes
22 # interface . . . . . yes
23 # iptables . . . . . yes
24 # ipmi . . . . . . . no
25 # ipvs . . . . . . . no (ip_vs.h not found)
26 # irq . . . . . . . . yes
27 # libvirt . . . . . . no
28 # load . . . . . . . yes
29 # logfile . . . . . . yes
30 # mbmon . . . . . . . yes
31 # memcached . . . . . yes
32 # memory . . . . . . yes
33 # multimeter . . . . yes
34 # mysql . . . . . . . yes
35 # netlink . . . . . . yes
36 # network . . . . . . yes
37 # nfs . . . . . . . . yes
38 # nginx . . . . . . . yes
39 # ntpd . . . . . . . yes
40 # nut . . . . . . . . no
41 # perl . . . . . . . no (needs libperl)
42 # ping . . . . . . . yes
43 # powerdns . . . . . yes
44 # processes . . . . . yes
45 # rrdtool . . . . . . yes
46 # sensors . . . . . . yes
47 # serial . . . . . . yes
48 # snmp . . . . . . . yes
49 # swap . . . . . . . yes
50 # syslog . . . . . . yes
51 # tail . . . . . . . yes
52 # tape . . . . . . . no
53 # tcpconns . . . . . yes
54 # teamspeak2 . . . . yes
55 # unixsock . . . . . yes
56 # users . . . . . . . yes
57 # uuid . . . . . . . yes
58 # vmem . . . . . . . yes
59 # vserver . . . . . . yes
60 # wireless . . . . . yes
61 # xmms . . . . . . . yes
63 %bcond_without iptables
64 %bcond_without netlink
66 #http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358637
68 %undefine with_iptables
69 %undefine with_netlink
71 Summary: Collects system information in RRD files
72 Summary(pl.UTF-8): Zbieranie informacji o systemie w plikach RRD
78 Source0: http://collectd.org/files/%{name}-%{version}.tar.gz
79 # Source0-md5: 25460f668fd3f386747a0b4871b0e09b
82 Source3: %{name}-http.conf
83 URL: http://collectd.org/
84 BuildRequires: OpenIPMI-devel
85 BuildRequires: autoconf
86 BuildRequires: automake
87 BuildRequires: curl-devel
88 BuildRequires: iptables-devel
89 BuildRequires: libnetlink-devel
90 BuildRequires: liboping-devel
91 BuildRequires: libpcap-devel
92 BuildRequires: libstatgrab-devel >= 0.12
93 BuildRequires: libtool
94 BuildRequires: lm_sensors-devel
95 BuildRequires: mysql-devel
96 BuildRequires: perl-devel
97 BuildRequires: rpmbuild(macros) >= 1.268
98 BuildRequires: rrdtool-devel
99 BuildRequires: net-snmp-devel
100 BuildRequires: xmms-devel
101 Requires(post,preun): /sbin/chkconfig
103 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
105 %define _pkglibdir /var/lib/%{name}
106 %define _webapps /etc/webapps
107 %define _webapp %{name}
108 %define _webappdir %{_webapps}/%{_webapp}
109 %define _appdir %{_datadir}/%{_webapp}
112 collectd is a small daemon which collects system information every 10
113 seconds and writes the results in an RRD-file.
115 In contrast to most similar software, collectd is not a script but
116 written in plain C for performance and portability. As a daemon it
117 stays in memory, so there is no need to start up a heavy interpreter
118 every time new values should be logged. This allows collectd to have a
119 10 second resolution while being nice to the system.
121 %description -l pl.UTF-8
122 collectd to mały demon zbierający co 10 sekund informacje o systemie i
123 zapisujący wyniki do pliku RRD.
125 W odróżnieniu od innych podobnych programów collectd nie jest
126 skryptem, lecz jest napisany w czystym C z myślą o wydajności i
127 przenośności. Jako demon pozostaje w pamięci, więc nie ma potrzeby
128 urychamiania ciężkiego interpretera za każdym razem, kiedy powinny być
129 zapisane nowe wartości. Dzięki temu collect może mieć rozdzielczość 10
130 sekund i nie obciążać zbytnio systemu.
133 Summary: ascent-plugin for collectd
134 Summary(pl_PL.UTF-8): Wtyczka ascent dla collectd
136 Requires: %{name} = %{version}-%{release}
139 ascent plugin for collectd.
142 Summary: apache-plugin for collectd
143 Summary(pl_PL.UTF-8): Wtyczka apache dla collectd
145 Requires: %{name} = %{version}-%{release}
148 This plugin collectd data provided by Apache's `mod_status'.
150 %description apache -l pl.UTF-8
151 Wtyczka collectd zbierająca informacje udostępniane przez moduł
155 Summary: Web script for collectiond
156 Summary(pl_PL.UTF-8): Web script for collectiond
157 Group: Applications/WWW
158 Requires: %{name} = %{version}-%{release}
160 %description collection
161 Web script for collectiond
164 Summary: dns-plugin for collectd
165 Summary(pl_PL.UTF-8): Wtyczka dns dla collectd
167 Requires: %{name} = %{version}-%{release}
168 Requires: perl-rrdtool
171 dns plugin for collectd.
174 Summary: hddtemp-plugin for collectd
175 Summary(pl_PL.UTF-8): Wtyczka hddtemp dla collectd
177 Requires: %{name} = %{version}-%{release}
180 hddtemp plugin for collectd.
183 Summary: mysql-plugin for collectd
184 Summary(pl_PL.UTF-8): Moduł mysql dla collectd.
186 Requires: %{name} = %{version}-%{release}
189 MySQL querying plugin. This plugins provides data of issued commands,
190 called handlers and database traffic.
192 %description mysql -l pl.UTF-8
193 Moduł odpytujący MySQL. Wtyczka udostępnia dane o wydawanych
194 poleceniach, wywoływanych procedurach obsługi i ruchu bazodanowym.
197 Summary: nginx-plugin for collectd
198 Summary(pl_PL.UTF-8): Wtyczka nginx dla collectd
200 Requires: %{name} = %{version}-%{release}
203 nginx plugin for collectd.
206 Summary: ping-plugin for collectd
207 Summary(pl_PL.UTF-8): Wtyczka ping dla collectd
209 Requires: %{name} = %{version}-%{release}
212 ping plugin for collectd.
215 Summary: powerdns-plugin for collectd
216 Summary(pl_PL.UTF-8): Wtyczka powerdns dla collectd
218 Requires: %{name} = %{version}-%{release}
220 %description powerdns
221 powerdns plugin for collectd.
224 Summary: rrdtool-plugin for collectd
225 Summary(pl_PL.UTF-8): Wtyczka rrdtool dla collectd
227 Requires: %{name} = %{version}-%{release}
231 RRDTOOL plugin for collectd.
234 Summary: sensors-plugin for collectd
235 Summary(pl_PL.UTF-8): Wtyczka sensors dla collectd
237 Requires: %{name} = %{version}-%{release}
240 This plugin collectd data provided by hardware sensors.
243 Summary: snmp-plugin for collectd
244 Summary(pl_PL.UTF-8): Wtyczka snmp dla collectd
246 Requires: %{name} = %{version}-%{release}
249 snmp plugin for collectd.
252 Summary: uuid-plugin for collectd
253 Summary(pl_PL.UTF-8): Wtyczka uuid dla collectd
255 Requires: %{name} = %{version}-%{release}
258 This plugin collectd UUID data.
261 Summary: xmms-plugin for collectd
262 Summary(pl_PL.UTF-8): Wtyczka xmms dla collectd
264 Requires: %{name} = %{version}-%{release}
268 This plugin collectd data provided by XMMS.
273 cat >> collection.conf <<'EOF'
274 datadir: "/var/lib/collectd/"
275 libdir: "/usr/lib/collectd/"
286 --with-libstatgrab=/usr \
287 --with-lm-sensors=/usr \
288 --with-libmysql=/usr \
289 --%{?with_dns:en}%{?!with_dns:dis}able-dns \
290 --%{?with_iptables:en}%{?!with_iptables:dis}able-iptables \
291 --%{?with_netlink:en}%{?!with_netlink:dis}able-netlink
294 %{__make} LDFLAGS="%{rpmldflags} -lstatgrab"
297 rm -rf $RPM_BUILD_ROOT
298 install -d $RPM_BUILD_ROOT{%{_var}/{log/,lib/%{name}},/etc/rc.d/init.d/} \
299 $RPM_BUILD_ROOT{%{_appdir}/cgi-bin,%{_webappdir},%{_pkglibdir}}
302 DESTDIR=$RPM_BUILD_ROOT
304 #install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
305 touch $RPM_BUILD_ROOT%{_var}/log/collectd.log
306 install src/collectd.conf $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
307 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
310 install contrib/collection.conf $RPM_BUILD_ROOT%{_webappdir}
311 install contrib/collection.cgi $RPM_BUILD_ROOT%{_appdir}/cgi-bin
312 install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
313 install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
316 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
319 rm -rf $RPM_BUILD_ROOT
322 /sbin/chkconfig --add %{name}
323 %service %{name} restart
326 if [ "$1" = "0" ]; then
327 %service -q %{name} stop
328 /sbin/chkconfig --del %{name}
331 %triggerin collection -- apache1 < 1.3.37-3, apache1-base
332 %webapp_register apache %{_webapp}
334 %triggerun collection -- apache1 < 1.3.37-3, apache1-base
335 %webapp_unregister apache %{_webapp}
337 %triggerin collection -- apache < 2.2.0, apache-base
338 %webapp_register httpd %{_webapp}
340 %triggerun collection -- apache < 2.2.0, apache-base
341 %webapp_unregister httpd %{_webapp}
344 %defattr(644,root,root,755)
345 %doc AUTHORS ChangeLog README TODO contrib
347 %attr(755,root,root) %{_sbindir}/collectd
348 %attr(755,root,root) %{_sbindir}/collectdmon
349 %attr(755,root,root) %{_bindir}/collectd-nagios
350 %dir %{_libdir}/%{name}
351 %attr(755,root,root) %{_libdir}/%{name}/apcups.so
352 #%attr(755,root,root) %{_libdir}/%{name}/apple_sensors.so
353 %attr(755,root,root) %{_libdir}/%{name}/battery.so
354 %attr(755,root,root) %{_libdir}/%{name}/cpufreq.so
355 %attr(755,root,root) %{_libdir}/%{name}/cpu.so
356 %attr(755,root,root) %{_libdir}/%{name}/csv.so
357 %attr(755,root,root) %{_libdir}/%{name}/df.so
358 %attr(755,root,root) %{_libdir}/%{name}/disk.so
359 %attr(755,root,root) %{_libdir}/%{name}/email.so
360 %attr(755,root,root) %{_libdir}/%{name}/entropy.so
361 %attr(755,root,root) %{_libdir}/%{name}/exec.so
362 %attr(755,root,root) %{_libdir}/%{name}/interface.so
364 %attr(755,root,root) %{_libdir}/%{name}/iptables.so
366 %attr(755,root,root) %{_libdir}/%{name}/irq.so
367 %attr(755,root,root) %{_libdir}/%{name}/load.so
368 %attr(755,root,root) %{_libdir}/%{name}/logfile.so
369 %attr(755,root,root) %{_libdir}/%{name}/mbmon.so
370 %attr(755,root,root) %{_libdir}/%{name}/memcached.so
371 %attr(755,root,root) %{_libdir}/%{name}/memory.so
372 %attr(755,root,root) %{_libdir}/%{name}/multimeter.so
374 %attr(755,root,root) %{_libdir}/%{name}/netlink.so
376 %attr(755,root,root) %{_libdir}/%{name}/network.so
377 %attr(755,root,root) %{_libdir}/%{name}/nfs.so
378 %attr(755,root,root) %{_libdir}/%{name}/ntpd.so
379 #%attr(755,root,root) %{_libdir}/%{name}/perl.so
380 %attr(755,root,root) %{_libdir}/%{name}/processes.so
381 %attr(755,root,root) %{_libdir}/%{name}/serial.so
382 %attr(755,root,root) %{_libdir}/%{name}/swap.so
383 %attr(755,root,root) %{_libdir}/%{name}/syslog.so
384 %attr(755,root,root) %{_libdir}/%{name}/tail.so
385 #%attr(755,root,root) %{_libdir}/%{name}/tape.so
386 %attr(755,root,root) %{_libdir}/%{name}/teamspeak2.so
387 %attr(755,root,root) %{_libdir}/%{name}/tcpconns.so
388 #%attr(755,root,root) %{_libdir}/%{name}/traffic.so
389 %attr(755,root,root) %{_libdir}/%{name}/unixsock.so
390 %attr(755,root,root) %{_libdir}/%{name}/users.so
391 %attr(755,root,root) %{_libdir}/%{name}/vmem.so
392 %attr(755,root,root) %{_libdir}/%{name}/vserver.so
393 %attr(755,root,root) %{_libdir}/%{name}/wireless.so
394 %{_libdir}/%{name}/types.db
396 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
398 %attr(754,root,root) /etc/rc.d/init.d/%{name}
400 %{_mandir}/man1/collectd.1*
401 %{_mandir}/man1/collectd-nagios.1*
402 %{_mandir}/man5/collectd.conf.5*
403 %{_mandir}/man5/collectd-email.5*
404 %{_mandir}/man5/collectd-exec.5*
405 %{_mandir}/man5/collectd-perl.5*
406 %{_mandir}/man5/collectd-snmp.5*
407 %{_mandir}/man5/collectd-unixsock.5*
408 %{_mandir}/man1/collectdmon.1*
409 %{_mandir}/man5/types.db.5*
410 %{_var}/log/collectd.log
411 %dir %{_var}/lib/%{name}
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_libdir}/%{name}/ascent.so
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_libdir}/%{name}/apache.so
423 %defattr(644,root,root,755)
424 %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/collection.conf
425 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
426 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
427 %attr(755,root,root) %{_appdir}/cgi-bin/collection.cgi
430 %defattr(644,root,root,755)
431 %attr(755,root,root) %{_libdir}/%{name}/dns.so
434 %defattr(644,root,root,755)
435 %attr(755,root,root) %{_libdir}/%{name}/hddtemp.so
438 %defattr(644,root,root,755)
439 %attr(755,root,root) %{_libdir}/%{name}/mysql.so
442 %defattr(644,root,root,755)
443 %attr(755,root,root) %{_libdir}/%{name}/nginx.so
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_libdir}/%{name}/ping.so
450 %defattr(644,root,root,755)
451 %attr(755,root,root) %{_libdir}/%{name}/powerdns.so
454 %defattr(644,root,root,755)
455 %attr(755,root,root) %{_libdir}/%{name}/rrdtool.so
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_libdir}/%{name}/sensors.so
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/%{name}/snmp.so
466 %defattr(644,root,root,755)
467 %attr(755,root,root) %{_libdir}/%{name}/uuid.so
470 %defattr(644,root,root,755)
471 %attr(755,root,root) %{_libdir}/%{name}/xmms.so