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 iptables
64 %bcond_with multimeter
65 %bcond_without netlink
67 #http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358637
69 %undefine with_iptables
70 %undefine with_netlink
72 Summary: Collects system information in RRD files
73 Summary(pl.UTF-8): Zbieranie informacji o systemie w plikach RRD
79 Source0: http://collectd.org/files/%{name}-%{version}.tar.gz
80 # Source0-md5: dbffe35a2d19840e86253c7052485ff0
83 Source3: %{name}-http.conf
84 URL: http://collectd.org/
85 BuildRequires: OpenIPMI-devel
86 BuildRequires: autoconf
87 BuildRequires: automake
88 BuildRequires: curl-devel
89 BuildRequires: iptables-devel
90 BuildRequires: libnetlink-devel
91 BuildRequires: liboping-devel
92 BuildRequires: libpcap-devel
93 BuildRequires: libstatgrab-devel >= 0.12
94 BuildRequires: libtool
95 BuildRequires: lm_sensors-devel
96 BuildRequires: mysql-devel
97 BuildRequires: nut-devel
98 BuildRequires: perl-devel
99 BuildRequires: rpmbuild(macros) >= 1.268
100 BuildRequires: rrdtool-devel
101 BuildRequires: net-snmp-devel
102 BuildRequires: xmms-devel
103 Requires(post,preun): /sbin/chkconfig
105 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
107 %define _pkglibdir /var/lib/%{name}
108 %define _webapps /etc/webapps
109 %define _webapp %{name}
110 %define _webappdir %{_webapps}/%{_webapp}
111 %define _appdir %{_datadir}/%{_webapp}
114 collectd is a small daemon which collects system information every 10
115 seconds and writes the results in an RRD-file.
117 In contrast to most similar software, collectd is not a script but
118 written in plain C for performance and portability. As a daemon it
119 stays in memory, so there is no need to start up a heavy interpreter
120 every time new values should be logged. This allows collectd to have a
121 10 second resolution while being nice to the system.
123 %description -l pl.UTF-8
124 collectd to mały demon zbierający co 10 sekund informacje o systemie i
125 zapisujący wyniki do pliku RRD.
127 W odróżnieniu od innych podobnych programów collectd nie jest
128 skryptem, lecz jest napisany w czystym C z myślą o wydajności i
129 przenośności. Jako demon pozostaje w pamięci, więc nie ma potrzeby
130 urychamiania ciężkiego interpretera za każdym razem, kiedy powinny być
131 zapisane nowe wartości. Dzięki temu collect może mieć rozdzielczość 10
132 sekund i nie obciążać zbytnio systemu.
135 Summary: ascent-plugin for collectd
136 Summary(pl_PL.UTF-8): Wtyczka ascent dla collectd
138 Requires: %{name} = %{version}-%{release}
141 ascent plugin for collectd.
144 Summary: apache-plugin for collectd
145 Summary(pl_PL.UTF-8): Wtyczka apache dla collectd
147 Requires: %{name} = %{version}-%{release}
150 This plugin collectd data provided by Apache's `mod_status'.
152 %description apache -l pl.UTF-8
153 Wtyczka collectd zbierająca informacje udostępniane przez moduł
157 Summary: Web script for collectiond
158 Summary(pl_PL.UTF-8): Web script for collectiond
159 Group: Applications/WWW
160 Requires: %{name} = %{version}-%{release}
162 %description collection
163 Web script for collectiond
166 Summary: dns-plugin for collectd
167 Summary(pl_PL.UTF-8): Wtyczka dns dla collectd
169 Requires: %{name} = %{version}-%{release}
170 Requires: perl-rrdtool
173 dns plugin for collectd.
176 Summary: hddtemp-plugin for collectd
177 Summary(pl_PL.UTF-8): Wtyczka hddtemp dla collectd
179 Requires: %{name} = %{version}-%{release}
182 hddtemp plugin for collectd.
185 Summary: ipmi-plugin for collectd
186 Summary(pl_PL.UTF-8): Wtyczka ipmi dla collectd
188 Requires: %{name} = %{version}-%{release}
191 ipmi plugin for collectd.
194 Summary: mysql-plugin for collectd
195 Summary(pl_PL.UTF-8): Moduł mysql dla collectd.
197 Requires: %{name} = %{version}-%{release}
200 MySQL querying plugin. This plugins provides data of issued commands,
201 called handlers and database traffic.
203 %description mysql -l pl.UTF-8
204 Moduł odpytujący MySQL. Wtyczka udostępnia dane o wydawanych
205 poleceniach, wywoływanych procedurach obsługi i ruchu bazodanowym.
208 Summary: nginx-plugin for collectd
209 Summary(pl_PL.UTF-8): Wtyczka nginx dla collectd
211 Requires: %{name} = %{version}-%{release}
214 nginx plugin for collectd.
217 Summary: ping-plugin for collectd
218 Summary(pl_PL.UTF-8): Wtyczka ping dla collectd
220 Requires: %{name} = %{version}-%{release}
223 ping plugin for collectd.
226 Summary: powerdns-plugin for collectd
227 Summary(pl_PL.UTF-8): Wtyczka powerdns dla collectd
229 Requires: %{name} = %{version}-%{release}
231 %description powerdns
232 powerdns plugin for collectd.
235 Summary: rrdtool-plugin for collectd
236 Summary(pl_PL.UTF-8): Wtyczka rrdtool dla collectd
238 Requires: %{name} = %{version}-%{release}
242 RRDTOOL plugin for collectd.
245 Summary: sensors-plugin for collectd
246 Summary(pl_PL.UTF-8): Wtyczka sensors dla collectd
248 Requires: %{name} = %{version}-%{release}
251 This plugin collectd data provided by hardware sensors.
254 Summary: snmp-plugin for collectd
255 Summary(pl_PL.UTF-8): Wtyczka snmp dla collectd
257 Requires: %{name} = %{version}-%{release}
260 snmp plugin for collectd.
263 Summary: uuid-plugin for collectd
264 Summary(pl_PL.UTF-8): Wtyczka uuid dla collectd
266 Requires: %{name} = %{version}-%{release}
269 This plugin collectd UUID data.
272 Summary: xmms-plugin for collectd
273 Summary(pl_PL.UTF-8): Wtyczka xmms dla collectd
275 Requires: %{name} = %{version}-%{release}
279 This plugin collectd data provided by XMMS.
284 cat >> collection.conf <<'EOF'
285 datadir: "/var/lib/collectd/"
286 libdir: "/usr/lib/collectd/"
297 --with-libstatgrab=/usr \
298 --with-lm-sensors=/usr \
299 --with-libmysql=/usr \
300 --%{?with_ipmi:en}%{?!with_ipmi:dis}able-ipmi \
301 --%{?with_multimeter:en}%{?!with_multimeter:dis}able-multimeter \
302 --%{?with_dns:en}%{?!with_dns:dis}able-dns \
303 --%{?with_iptables:en}%{?!with_iptables:dis}able-iptables \
304 --%{?with_netlink:en}%{?!with_netlink:dis}able-netlink
307 %{__make} LDFLAGS="%{rpmldflags} -lstatgrab" \
308 BUILD_WITH_OPENIPMI_CFLAGS="-I/usr/include" \
309 BUILD_WITH_OPENIPMI_LIBS="-L/usr/lib64 -lOpenIPMIutils -lOpenIPMIpthread"
312 rm -rf $RPM_BUILD_ROOT
313 install -d $RPM_BUILD_ROOT{%{_var}/{log/,lib/%{name}},/etc/rc.d/init.d/} \
314 $RPM_BUILD_ROOT{%{_appdir}/cgi-bin,%{_webappdir},%{_pkglibdir}}
317 DESTDIR=$RPM_BUILD_ROOT
319 #install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
320 touch $RPM_BUILD_ROOT%{_var}/log/collectd.log
321 install src/collectd.conf $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
322 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
325 install contrib/collection.conf $RPM_BUILD_ROOT%{_webappdir}
326 install contrib/collection.cgi $RPM_BUILD_ROOT%{_appdir}/cgi-bin
327 install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
328 install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
331 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
334 rm -rf $RPM_BUILD_ROOT
337 /sbin/chkconfig --add %{name}
338 %service %{name} restart
341 if [ "$1" = "0" ]; then
342 %service -q %{name} stop
343 /sbin/chkconfig --del %{name}
346 %triggerin collection -- apache1 < 1.3.37-3, apache1-base
347 %webapp_register apache %{_webapp}
349 %triggerun collection -- apache1 < 1.3.37-3, apache1-base
350 %webapp_unregister apache %{_webapp}
352 %triggerin collection -- apache < 2.2.0, apache-base
353 %webapp_register httpd %{_webapp}
355 %triggerun collection -- apache < 2.2.0, apache-base
356 %webapp_unregister httpd %{_webapp}
359 %defattr(644,root,root,755)
360 %doc AUTHORS ChangeLog README TODO contrib
362 %attr(755,root,root) %{_sbindir}/collectd
363 %attr(755,root,root) %{_sbindir}/collectdmon
364 %attr(755,root,root) %{_bindir}/collectd-nagios
365 %dir %{_libdir}/%{name}
366 %attr(755,root,root) %{_libdir}/%{name}/apcups.so
367 #%attr(755,root,root) %{_libdir}/%{name}/apple_sensors.so
368 %attr(755,root,root) %{_libdir}/%{name}/battery.so
369 %attr(755,root,root) %{_libdir}/%{name}/cpufreq.so
370 %attr(755,root,root) %{_libdir}/%{name}/cpu.so
371 %attr(755,root,root) %{_libdir}/%{name}/csv.so
372 %attr(755,root,root) %{_libdir}/%{name}/df.so
373 %attr(755,root,root) %{_libdir}/%{name}/disk.so
374 %attr(755,root,root) %{_libdir}/%{name}/email.so
375 %attr(755,root,root) %{_libdir}/%{name}/entropy.so
376 %attr(755,root,root) %{_libdir}/%{name}/exec.so
377 %attr(755,root,root) %{_libdir}/%{name}/interface.so
379 %attr(755,root,root) %{_libdir}/%{name}/iptables.so
381 %attr(755,root,root) %{_libdir}/%{name}/irq.so
382 %attr(755,root,root) %{_libdir}/%{name}/load.so
383 %attr(755,root,root) %{_libdir}/%{name}/logfile.so
384 %attr(755,root,root) %{_libdir}/%{name}/mbmon.so
385 %attr(755,root,root) %{_libdir}/%{name}/memcached.so
386 %attr(755,root,root) %{_libdir}/%{name}/memory.so
387 %if %{with multimeter}
388 %attr(755,root,root) %{_libdir}/%{name}/multimeter.so
391 %attr(755,root,root) %{_libdir}/%{name}/netlink.so
393 %attr(755,root,root) %{_libdir}/%{name}/network.so
394 %attr(755,root,root) %{_libdir}/%{name}/nut.so
395 %attr(755,root,root) %{_libdir}/%{name}/nfs.so
396 %attr(755,root,root) %{_libdir}/%{name}/ntpd.so
397 #%attr(755,root,root) %{_libdir}/%{name}/perl.so
398 %attr(755,root,root) %{_libdir}/%{name}/processes.so
399 %attr(755,root,root) %{_libdir}/%{name}/serial.so
400 %attr(755,root,root) %{_libdir}/%{name}/swap.so
401 %attr(755,root,root) %{_libdir}/%{name}/syslog.so
402 %attr(755,root,root) %{_libdir}/%{name}/tail.so
403 #%attr(755,root,root) %{_libdir}/%{name}/tape.so
404 %attr(755,root,root) %{_libdir}/%{name}/teamspeak2.so
405 %attr(755,root,root) %{_libdir}/%{name}/tcpconns.so
406 #%attr(755,root,root) %{_libdir}/%{name}/traffic.so
407 %attr(755,root,root) %{_libdir}/%{name}/unixsock.so
408 %attr(755,root,root) %{_libdir}/%{name}/users.so
409 %attr(755,root,root) %{_libdir}/%{name}/vmem.so
410 %attr(755,root,root) %{_libdir}/%{name}/vserver.so
411 %attr(755,root,root) %{_libdir}/%{name}/wireless.so
412 %{_libdir}/%{name}/types.db
414 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
416 %attr(754,root,root) /etc/rc.d/init.d/%{name}
418 %{_mandir}/man1/collectd.1*
419 %{_mandir}/man1/collectd-nagios.1*
420 %{_mandir}/man5/collectd.conf.5*
421 %{_mandir}/man5/collectd-email.5*
422 %{_mandir}/man5/collectd-exec.5*
423 %{_mandir}/man5/collectd-perl.5*
424 %{_mandir}/man5/collectd-snmp.5*
425 %{_mandir}/man5/collectd-unixsock.5*
426 %{_mandir}/man1/collectdmon.1*
427 %{_mandir}/man5/types.db.5*
428 %{_var}/log/collectd.log
429 %dir %{_var}/lib/%{name}
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/%{name}/ascent.so
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/%{name}/apache.so
441 %defattr(644,root,root,755)
442 %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/collection.conf
443 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
444 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
445 %attr(755,root,root) %{_appdir}/cgi-bin/collection.cgi
448 %defattr(644,root,root,755)
449 %attr(755,root,root) %{_libdir}/%{name}/dns.so
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_libdir}/%{name}/hddtemp.so
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_libdir}/%{name}/ipmi.so
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/%{name}/mysql.so
466 %defattr(644,root,root,755)
467 %attr(755,root,root) %{_libdir}/%{name}/nginx.so
470 %defattr(644,root,root,755)
471 %attr(755,root,root) %{_libdir}/%{name}/ping.so
474 %defattr(644,root,root,755)
475 %attr(755,root,root) %{_libdir}/%{name}/powerdns.so
478 %defattr(644,root,root,755)
479 %attr(755,root,root) %{_libdir}/%{name}/rrdtool.so
482 %defattr(644,root,root,755)
483 %attr(755,root,root) %{_libdir}/%{name}/sensors.so
486 %defattr(644,root,root,755)
487 %attr(755,root,root) %{_libdir}/%{name}/snmp.so
490 %defattr(644,root,root,755)
491 %attr(755,root,root) %{_libdir}/%{name}/uuid.so
494 %defattr(644,root,root,755)
495 %attr(755,root,root) %{_libdir}/%{name}/xmms.so