2 # - lm_sensors subpackage
3 # - package contrib scripts as %doc
4 # - put every plugin into subpackages
5 # - Current plugins status:
6 # apache . . . . . . yes
7 # apcups . . . . . . yes
8 # apple_sensors . . . no
9 # ascent . . . . . . yes
10 # battery . . . . . . yes
11 # cpu . . . . . . . . yes
12 # cpufreq . . . . . . yes
13 # csv . . . . . . . . yes
14 # df . . . . . . . . yes
15 # disk . . . . . . . yes
16 # dns . . . . . . . . yes
17 # email . . . . . . . yes
18 # entropy . . . . . . yes
19 # exec . . . . . . . yes
20 # hddtemp . . . . . . yes
21 # interface . . . . . yes
22 # iptables . . . . . yes
23 # ipmi . . . . . . . yes
24 # ipvs . . . . . . . no (ip_vs.h not found)
25 # irq . . . . . . . . yes
26 # libvirt . . . . . . no
27 # load . . . . . . . yes
28 # logfile . . . . . . yes
29 # mbmon . . . . . . . yes
30 # memcached . . . . . yes
31 # memory . . . . . . yes
32 # multimeter . . . . no
33 # mysql . . . . . . . yes
34 # netlink . . . . . . yes
35 # network . . . . . . yes
36 # nfs . . . . . . . . yes
37 # nginx . . . . . . . yes
38 # ntpd . . . . . . . yes
39 # nut . . . . . . . . yes
40 # perl . . . . . . . no (needs libperl)
41 # ping . . . . . . . yes
42 # powerdns . . . . . yes
43 # processes . . . . . yes
44 # rrdtool . . . . . . yes
45 # sensors . . . . . . yes
46 # serial . . . . . . yes
47 # snmp . . . . . . . yes
48 # swap . . . . . . . yes
49 # syslog . . . . . . yes
50 # tail . . . . . . . yes
51 # tape . . . . . . . no
52 # tcpconns . . . . . yes
53 # teamspeak2 . . . . yes
54 # unixsock . . . . . yes
55 # users . . . . . . . yes
56 # uuid . . . . . . . yes
57 # vmem . . . . . . . yes
58 # vserver . . . . . . yes
59 # wireless . . . . . yes
60 # xmms . . . . . . . yes
63 %bcond_without dns # ???
64 %bcond_without ipmi # ipmi plugin package
65 %bcond_without iptables # iptables plugin
66 %bcond_with multimeter # multimeter plugin
67 %bcond_without netlink # netlink plugin
69 #http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358637
71 %undefine with_iptables
72 %undefine with_netlink
74 Summary: Collects system information in RRD files
75 Summary(pl.UTF-8): Zbieranie informacji o systemie w plikach RRD
81 Source0: http://collectd.org/files/%{name}-%{version}.tar.gz
82 # Source0-md5: dbffe35a2d19840e86253c7052485ff0
85 Source3: %{name}-http.conf
86 URL: http://collectd.org/
87 BuildRequires: OpenIPMI-devel
88 BuildRequires: autoconf
89 BuildRequires: automake
90 BuildRequires: curl-devel
91 BuildRequires: iptables-devel
92 BuildRequires: libnetlink-devel
93 BuildRequires: liboping-devel
94 BuildRequires: libpcap-devel
95 BuildRequires: libstatgrab-devel >= 0.12
96 BuildRequires: libtool
97 BuildRequires: lm_sensors-devel
98 BuildRequires: mysql-devel
99 BuildRequires: nut-devel
100 BuildRequires: perl-devel
101 BuildRequires: rpmbuild(macros) >= 1.268
102 BuildRequires: rrdtool-devel
103 BuildRequires: net-snmp-devel
104 BuildRequires: xmms-devel
105 Requires(post,preun): /sbin/chkconfig
107 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
109 %define _pkglibdir /var/lib/%{name}
110 %define _webapps /etc/webapps
111 %define _webapp %{name}
112 %define _webappdir %{_webapps}/%{_webapp}
113 %define _appdir %{_datadir}/%{_webapp}
116 collectd is a small daemon which collects system information every 10
117 seconds and writes the results in an RRD-file.
119 In contrast to most similar software, collectd is not a script but
120 written in plain C for performance and portability. As a daemon it
121 stays in memory, so there is no need to start up a heavy interpreter
122 every time new values should be logged. This allows collectd to have a
123 10 second resolution while being nice to the system.
125 %description -l pl.UTF-8
126 collectd to mały demon zbierający co 10 sekund informacje o systemie i
127 zapisujący wyniki do pliku RRD.
129 W odróżnieniu od innych podobnych programów collectd nie jest
130 skryptem, lecz jest napisany w czystym C z myślą o wydajności i
131 przenośności. Jako demon pozostaje w pamięci, więc nie ma potrzeby
132 urychamiania ciężkiego interpretera za każdym razem, kiedy powinny być
133 zapisane nowe wartości. Dzięki temu collect może mieć rozdzielczość 10
134 sekund i nie obciążać zbytnio systemu.
137 Summary: ascent-plugin for collectd
138 Summary(pl_PL.UTF-8): Wtyczka ascent dla collectd
140 Requires: %{name} = %{version}-%{release}
143 ascent plugin for collectd.
146 Summary: apache-plugin for collectd
147 Summary(pl_PL.UTF-8): Wtyczka apache dla collectd
149 Requires: %{name} = %{version}-%{release}
152 This plugin collectd data provided by Apache's `mod_status'.
154 %description apache -l pl.UTF-8
155 Wtyczka collectd zbierająca informacje udostępniane przez moduł
159 Summary: Web script for collectiond
160 Summary(pl_PL.UTF-8): Web script for collectiond
161 Group: Applications/WWW
162 Requires: %{name} = %{version}-%{release}
164 %description collection
165 Web script for collectiond
168 Summary: dns-plugin for collectd
169 Summary(pl_PL.UTF-8): Wtyczka dns dla collectd
171 Requires: %{name} = %{version}-%{release}
172 Requires: perl-rrdtool
175 dns plugin for collectd.
178 Summary: hddtemp-plugin for collectd
179 Summary(pl_PL.UTF-8): Wtyczka hddtemp dla collectd
181 Requires: %{name} = %{version}-%{release}
184 hddtemp plugin for collectd.
187 Summary: ipmi-plugin for collectd
188 Summary(pl_PL.UTF-8): Wtyczka ipmi dla collectd
190 Requires: %{name} = %{version}-%{release}
193 ipmi plugin for collectd.
195 %description ipmi -l pl.UTF-8
196 Wtyczka ipmi dla collectd.
199 Summary: mysql-plugin for collectd
200 Summary(pl_PL.UTF-8): Moduł mysql dla collectd.
202 Requires: %{name} = %{version}-%{release}
205 MySQL querying plugin. This plugins provides data of issued commands,
206 called handlers and database traffic.
208 %description mysql -l pl.UTF-8
209 Moduł odpytujący MySQL. Wtyczka udostępnia dane o wydawanych
210 poleceniach, wywoływanych procedurach obsługi i ruchu bazodanowym.
213 Summary: nginx-plugin for collectd
214 Summary(pl_PL.UTF-8): Wtyczka nginx dla collectd
216 Requires: %{name} = %{version}-%{release}
219 nginx plugin for collectd.
222 Summary: ping-plugin for collectd
223 Summary(pl_PL.UTF-8): Wtyczka ping dla collectd
225 Requires: %{name} = %{version}-%{release}
228 ping plugin for collectd.
231 Summary: powerdns-plugin for collectd
232 Summary(pl_PL.UTF-8): Wtyczka powerdns dla collectd
234 Requires: %{name} = %{version}-%{release}
236 %description powerdns
237 powerdns plugin for collectd.
240 Summary: rrdtool-plugin for collectd
241 Summary(pl_PL.UTF-8): Wtyczka rrdtool dla collectd
243 Requires: %{name} = %{version}-%{release}
247 RRDTOOL plugin for collectd.
250 Summary: sensors-plugin for collectd
251 Summary(pl_PL.UTF-8): Wtyczka sensors dla collectd
253 Requires: %{name} = %{version}-%{release}
256 This plugin collectd data provided by hardware sensors.
259 Summary: snmp-plugin for collectd
260 Summary(pl_PL.UTF-8): Wtyczka snmp dla collectd
262 Requires: %{name} = %{version}-%{release}
265 snmp plugin for collectd.
268 Summary: uuid-plugin for collectd
269 Summary(pl_PL.UTF-8): Wtyczka uuid dla collectd
271 Requires: %{name} = %{version}-%{release}
274 This plugin collectd UUID data.
277 Summary: xmms-plugin for collectd
278 Summary(pl_PL.UTF-8): Wtyczka xmms dla collectd
280 Requires: %{name} = %{version}-%{release}
284 This plugin collectd data provided by XMMS.
289 cat >> collection.conf <<'EOF'
290 datadir: "/var/lib/collectd/"
291 libdir: "/usr/lib/collectd/"
302 --with-libstatgrab=/usr \
303 --with-lm-sensors=/usr \
304 --with-libmysql=/usr \
305 --%{?with_ipmi:en}%{!?with_ipmi:dis}able-ipmi \
306 --%{?with_multimeter:en}%{!?with_multimeter:dis}able-multimeter \
307 --%{?with_dns:en}%{!?with_dns:dis}able-dns \
308 --%{?with_iptables:en}%{!?with_iptables:dis}able-iptables \
309 --%{?with_netlink:en}%{!?with_netlink:dis}able-netlink
312 %{__make} LDFLAGS="%{rpmldflags} -lstatgrab" \
313 BUILD_WITH_OPENIPMI_CFLAGS="-I/usr/include" \
314 BUILD_WITH_OPENIPMI_LIBS="-L/usr/lib64 -lOpenIPMIutils -lOpenIPMIpthread"
317 rm -rf $RPM_BUILD_ROOT
318 install -d $RPM_BUILD_ROOT{%{_var}/{log/,lib/%{name}},/etc/rc.d/init.d/} \
319 $RPM_BUILD_ROOT{%{_appdir}/cgi-bin,%{_webappdir},%{_pkglibdir}}
322 DESTDIR=$RPM_BUILD_ROOT
324 #install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
325 touch $RPM_BUILD_ROOT%{_var}/log/collectd.log
326 install src/collectd.conf $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
327 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
330 install contrib/collection.conf $RPM_BUILD_ROOT%{_webappdir}
331 install contrib/collection.cgi $RPM_BUILD_ROOT%{_appdir}/cgi-bin
332 install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
333 install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
336 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
339 rm -rf $RPM_BUILD_ROOT
342 /sbin/chkconfig --add %{name}
343 %service %{name} restart
346 if [ "$1" = "0" ]; then
347 %service -q %{name} stop
348 /sbin/chkconfig --del %{name}
351 %triggerin collection -- apache1 < 1.3.37-3, apache1-base
352 %webapp_register apache %{_webapp}
354 %triggerun collection -- apache1 < 1.3.37-3, apache1-base
355 %webapp_unregister apache %{_webapp}
357 %triggerin collection -- apache < 2.2.0, apache-base
358 %webapp_register httpd %{_webapp}
360 %triggerun collection -- apache < 2.2.0, apache-base
361 %webapp_unregister httpd %{_webapp}
364 %defattr(644,root,root,755)
365 %doc AUTHORS ChangeLog README TODO contrib
367 %attr(755,root,root) %{_sbindir}/collectd
368 %attr(755,root,root) %{_sbindir}/collectdmon
369 %attr(755,root,root) %{_bindir}/collectd-nagios
370 %dir %{_libdir}/%{name}
371 %attr(755,root,root) %{_libdir}/%{name}/apcups.so
372 #%attr(755,root,root) %{_libdir}/%{name}/apple_sensors.so
373 %attr(755,root,root) %{_libdir}/%{name}/battery.so
374 %attr(755,root,root) %{_libdir}/%{name}/cpufreq.so
375 %attr(755,root,root) %{_libdir}/%{name}/cpu.so
376 %attr(755,root,root) %{_libdir}/%{name}/csv.so
377 %attr(755,root,root) %{_libdir}/%{name}/df.so
378 %attr(755,root,root) %{_libdir}/%{name}/disk.so
379 %attr(755,root,root) %{_libdir}/%{name}/email.so
380 %attr(755,root,root) %{_libdir}/%{name}/entropy.so
381 %attr(755,root,root) %{_libdir}/%{name}/exec.so
382 %attr(755,root,root) %{_libdir}/%{name}/interface.so
384 %attr(755,root,root) %{_libdir}/%{name}/iptables.so
386 %attr(755,root,root) %{_libdir}/%{name}/irq.so
387 %attr(755,root,root) %{_libdir}/%{name}/load.so
388 %attr(755,root,root) %{_libdir}/%{name}/logfile.so
389 %attr(755,root,root) %{_libdir}/%{name}/mbmon.so
390 %attr(755,root,root) %{_libdir}/%{name}/memcached.so
391 %attr(755,root,root) %{_libdir}/%{name}/memory.so
392 %if %{with multimeter}
393 %attr(755,root,root) %{_libdir}/%{name}/multimeter.so
396 %attr(755,root,root) %{_libdir}/%{name}/netlink.so
398 %attr(755,root,root) %{_libdir}/%{name}/network.so
399 %attr(755,root,root) %{_libdir}/%{name}/nut.so
400 %attr(755,root,root) %{_libdir}/%{name}/nfs.so
401 %attr(755,root,root) %{_libdir}/%{name}/ntpd.so
402 #%attr(755,root,root) %{_libdir}/%{name}/perl.so
403 %attr(755,root,root) %{_libdir}/%{name}/processes.so
404 %attr(755,root,root) %{_libdir}/%{name}/serial.so
405 %attr(755,root,root) %{_libdir}/%{name}/swap.so
406 %attr(755,root,root) %{_libdir}/%{name}/syslog.so
407 %attr(755,root,root) %{_libdir}/%{name}/tail.so
408 #%attr(755,root,root) %{_libdir}/%{name}/tape.so
409 %attr(755,root,root) %{_libdir}/%{name}/teamspeak2.so
410 %attr(755,root,root) %{_libdir}/%{name}/tcpconns.so
411 #%attr(755,root,root) %{_libdir}/%{name}/traffic.so
412 %attr(755,root,root) %{_libdir}/%{name}/unixsock.so
413 %attr(755,root,root) %{_libdir}/%{name}/users.so
414 %attr(755,root,root) %{_libdir}/%{name}/vmem.so
415 %attr(755,root,root) %{_libdir}/%{name}/vserver.so
416 %attr(755,root,root) %{_libdir}/%{name}/wireless.so
417 %{_libdir}/%{name}/types.db
419 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
421 %attr(754,root,root) /etc/rc.d/init.d/%{name}
423 %{_mandir}/man1/collectd.1*
424 %{_mandir}/man1/collectd-nagios.1*
425 %{_mandir}/man5/collectd.conf.5*
426 %{_mandir}/man5/collectd-email.5*
427 %{_mandir}/man5/collectd-exec.5*
428 %{_mandir}/man5/collectd-perl.5*
429 %{_mandir}/man5/collectd-snmp.5*
430 %{_mandir}/man5/collectd-unixsock.5*
431 %{_mandir}/man1/collectdmon.1*
432 %{_mandir}/man5/types.db.5*
433 %{_var}/log/collectd.log
434 %dir %{_var}/lib/%{name}
438 %defattr(644,root,root,755)
439 %attr(755,root,root) %{_libdir}/%{name}/ascent.so
442 %defattr(644,root,root,755)
443 %attr(755,root,root) %{_libdir}/%{name}/apache.so
446 %defattr(644,root,root,755)
447 %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/collection.conf
448 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
449 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
450 %attr(755,root,root) %{_appdir}/cgi-bin/collection.cgi
453 %defattr(644,root,root,755)
454 %attr(755,root,root) %{_libdir}/%{name}/dns.so
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_libdir}/%{name}/hddtemp.so
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/%{name}/ipmi.so
467 %defattr(644,root,root,755)
468 %attr(755,root,root) %{_libdir}/%{name}/mysql.so
471 %defattr(644,root,root,755)
472 %attr(755,root,root) %{_libdir}/%{name}/nginx.so
475 %defattr(644,root,root,755)
476 %attr(755,root,root) %{_libdir}/%{name}/ping.so
479 %defattr(644,root,root,755)
480 %attr(755,root,root) %{_libdir}/%{name}/powerdns.so
483 %defattr(644,root,root,755)
484 %attr(755,root,root) %{_libdir}/%{name}/rrdtool.so
487 %defattr(644,root,root,755)
488 %attr(755,root,root) %{_libdir}/%{name}/sensors.so
491 %defattr(644,root,root,755)
492 %attr(755,root,root) %{_libdir}/%{name}/snmp.so
495 %defattr(644,root,root,755)
496 %attr(755,root,root) %{_libdir}/%{name}/uuid.so
499 %defattr(644,root,root,755)
500 %attr(755,root,root) %{_libdir}/%{name}/xmms.so