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 . . . . . . . no
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 . . . . yes
33 # mysql . . . . . . . yes
34 # netlink . . . . . . yes
35 # network . . . . . . yes
36 # nfs . . . . . . . . yes
37 # nginx . . . . . . . yes
38 # ntpd . . . . . . . yes
39 # nut . . . . . . . . no
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
62 %bcond_without iptables
63 %bcond_without netlink
65 #http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358637
67 %undefine with_iptables
68 %undefine with_netlink
70 Summary: Collects system information in RRD files
71 Summary(pl.UTF-8): Zbieranie informacji o systemie w plikach RRD
77 Source0: http://collectd.org/files/%{name}-%{version}.tar.gz
78 # Source0-md5: dbffe35a2d19840e86253c7052485ff0
81 Source3: %{name}-http.conf
82 URL: http://collectd.org/
83 BuildRequires: OpenIPMI-devel
84 BuildRequires: autoconf
85 BuildRequires: automake
86 BuildRequires: curl-devel
87 BuildRequires: iptables-devel
88 BuildRequires: libnetlink-devel
89 BuildRequires: liboping-devel
90 BuildRequires: libpcap-devel
91 BuildRequires: libstatgrab-devel >= 0.12
92 BuildRequires: libtool
93 BuildRequires: lm_sensors-devel
94 BuildRequires: mysql-devel
95 BuildRequires: perl-devel
96 BuildRequires: rpmbuild(macros) >= 1.268
97 BuildRequires: rrdtool-devel
98 BuildRequires: net-snmp-devel
99 BuildRequires: xmms-devel
100 Requires(post,preun): /sbin/chkconfig
102 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
104 %define _pkglibdir /var/lib/%{name}
105 %define _webapps /etc/webapps
106 %define _webapp %{name}
107 %define _webappdir %{_webapps}/%{_webapp}
108 %define _appdir %{_datadir}/%{_webapp}
111 collectd is a small daemon which collects system information every 10
112 seconds and writes the results in an RRD-file.
114 In contrast to most similar software, collectd is not a script but
115 written in plain C for performance and portability. As a daemon it
116 stays in memory, so there is no need to start up a heavy interpreter
117 every time new values should be logged. This allows collectd to have a
118 10 second resolution while being nice to the system.
120 %description -l pl.UTF-8
121 collectd to mały demon zbierający co 10 sekund informacje o systemie i
122 zapisujący wyniki do pliku RRD.
124 W odróżnieniu od innych podobnych programów collectd nie jest
125 skryptem, lecz jest napisany w czystym C z myślą o wydajności i
126 przenośności. Jako demon pozostaje w pamięci, więc nie ma potrzeby
127 urychamiania ciężkiego interpretera za każdym razem, kiedy powinny być
128 zapisane nowe wartości. Dzięki temu collect może mieć rozdzielczość 10
129 sekund i nie obciążać zbytnio systemu.
132 Summary: ascent-plugin for collectd
133 Summary(pl_PL.UTF-8): Wtyczka ascent dla collectd
135 Requires: %{name} = %{version}-%{release}
138 ascent plugin for collectd.
141 Summary: apache-plugin for collectd
142 Summary(pl_PL.UTF-8): Wtyczka apache dla collectd
144 Requires: %{name} = %{version}-%{release}
147 This plugin collectd data provided by Apache's `mod_status'.
149 %description apache -l pl.UTF-8
150 Wtyczka collectd zbierająca informacje udostępniane przez moduł
154 Summary: Web script for collectiond
155 Summary(pl_PL.UTF-8): Web script for collectiond
156 Group: Applications/WWW
157 Requires: %{name} = %{version}-%{release}
159 %description collection
160 Web script for collectiond
163 Summary: dns-plugin for collectd
164 Summary(pl_PL.UTF-8): Wtyczka dns dla collectd
166 Requires: %{name} = %{version}-%{release}
167 Requires: perl-rrdtool
170 dns plugin for collectd.
173 Summary: hddtemp-plugin for collectd
174 Summary(pl_PL.UTF-8): Wtyczka hddtemp dla collectd
176 Requires: %{name} = %{version}-%{release}
179 hddtemp plugin for collectd.
182 Summary: mysql-plugin for collectd
183 Summary(pl_PL.UTF-8): Moduł mysql dla collectd.
185 Requires: %{name} = %{version}-%{release}
188 MySQL querying plugin. This plugins provides data of issued commands,
189 called handlers and database traffic.
191 %description mysql -l pl.UTF-8
192 Moduł odpytujący MySQL. Wtyczka udostępnia dane o wydawanych
193 poleceniach, wywoływanych procedurach obsługi i ruchu bazodanowym.
196 Summary: nginx-plugin for collectd
197 Summary(pl_PL.UTF-8): Wtyczka nginx dla collectd
199 Requires: %{name} = %{version}-%{release}
202 nginx plugin for collectd.
205 Summary: ping-plugin for collectd
206 Summary(pl_PL.UTF-8): Wtyczka ping dla collectd
208 Requires: %{name} = %{version}-%{release}
211 ping plugin for collectd.
214 Summary: powerdns-plugin for collectd
215 Summary(pl_PL.UTF-8): Wtyczka powerdns dla collectd
217 Requires: %{name} = %{version}-%{release}
219 %description powerdns
220 powerdns plugin for collectd.
223 Summary: rrdtool-plugin for collectd
224 Summary(pl_PL.UTF-8): Wtyczka rrdtool dla collectd
226 Requires: %{name} = %{version}-%{release}
230 RRDTOOL plugin for collectd.
233 Summary: sensors-plugin for collectd
234 Summary(pl_PL.UTF-8): Wtyczka sensors dla collectd
236 Requires: %{name} = %{version}-%{release}
239 This plugin collectd data provided by hardware sensors.
242 Summary: snmp-plugin for collectd
243 Summary(pl_PL.UTF-8): Wtyczka snmp dla collectd
245 Requires: %{name} = %{version}-%{release}
248 snmp plugin for collectd.
251 Summary: uuid-plugin for collectd
252 Summary(pl_PL.UTF-8): Wtyczka uuid dla collectd
254 Requires: %{name} = %{version}-%{release}
257 This plugin collectd UUID data.
260 Summary: xmms-plugin for collectd
261 Summary(pl_PL.UTF-8): Wtyczka xmms dla collectd
263 Requires: %{name} = %{version}-%{release}
267 This plugin collectd data provided by XMMS.
272 cat >> collection.conf <<'EOF'
273 datadir: "/var/lib/collectd/"
274 libdir: "/usr/lib/collectd/"
285 --with-libstatgrab=/usr \
286 --with-lm-sensors=/usr \
287 --with-libmysql=/usr \
288 --%{?with_dns:en}%{?!with_dns:dis}able-dns \
289 --%{?with_iptables:en}%{?!with_iptables:dis}able-iptables \
290 --%{?with_netlink:en}%{?!with_netlink:dis}able-netlink
293 %{__make} LDFLAGS="%{rpmldflags} -lstatgrab"
296 rm -rf $RPM_BUILD_ROOT
297 install -d $RPM_BUILD_ROOT{%{_var}/{log/,lib/%{name}},/etc/rc.d/init.d/} \
298 $RPM_BUILD_ROOT{%{_appdir}/cgi-bin,%{_webappdir},%{_pkglibdir}}
301 DESTDIR=$RPM_BUILD_ROOT
303 #install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
304 touch $RPM_BUILD_ROOT%{_var}/log/collectd.log
305 install src/collectd.conf $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
306 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
309 install contrib/collection.conf $RPM_BUILD_ROOT%{_webappdir}
310 install contrib/collection.cgi $RPM_BUILD_ROOT%{_appdir}/cgi-bin
311 install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
312 install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
315 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
318 rm -rf $RPM_BUILD_ROOT
321 /sbin/chkconfig --add %{name}
322 %service %{name} restart
325 if [ "$1" = "0" ]; then
326 %service -q %{name} stop
327 /sbin/chkconfig --del %{name}
330 %triggerin collection -- apache1 < 1.3.37-3, apache1-base
331 %webapp_register apache %{_webapp}
333 %triggerun collection -- apache1 < 1.3.37-3, apache1-base
334 %webapp_unregister apache %{_webapp}
336 %triggerin collection -- apache < 2.2.0, apache-base
337 %webapp_register httpd %{_webapp}
339 %triggerun collection -- apache < 2.2.0, apache-base
340 %webapp_unregister httpd %{_webapp}
343 %defattr(644,root,root,755)
344 %doc AUTHORS ChangeLog README TODO contrib
346 %attr(755,root,root) %{_sbindir}/collectd
347 %attr(755,root,root) %{_sbindir}/collectdmon
348 %attr(755,root,root) %{_bindir}/collectd-nagios
349 %dir %{_libdir}/%{name}
350 %attr(755,root,root) %{_libdir}/%{name}/apcups.so
351 #%attr(755,root,root) %{_libdir}/%{name}/apple_sensors.so
352 %attr(755,root,root) %{_libdir}/%{name}/battery.so
353 %attr(755,root,root) %{_libdir}/%{name}/cpufreq.so
354 %attr(755,root,root) %{_libdir}/%{name}/cpu.so
355 %attr(755,root,root) %{_libdir}/%{name}/csv.so
356 %attr(755,root,root) %{_libdir}/%{name}/df.so
357 %attr(755,root,root) %{_libdir}/%{name}/disk.so
358 %attr(755,root,root) %{_libdir}/%{name}/email.so
359 %attr(755,root,root) %{_libdir}/%{name}/entropy.so
360 %attr(755,root,root) %{_libdir}/%{name}/exec.so
361 %attr(755,root,root) %{_libdir}/%{name}/interface.so
363 %attr(755,root,root) %{_libdir}/%{name}/iptables.so
365 %attr(755,root,root) %{_libdir}/%{name}/irq.so
366 %attr(755,root,root) %{_libdir}/%{name}/load.so
367 %attr(755,root,root) %{_libdir}/%{name}/logfile.so
368 %attr(755,root,root) %{_libdir}/%{name}/mbmon.so
369 %attr(755,root,root) %{_libdir}/%{name}/memcached.so
370 %attr(755,root,root) %{_libdir}/%{name}/memory.so
371 %attr(755,root,root) %{_libdir}/%{name}/multimeter.so
373 %attr(755,root,root) %{_libdir}/%{name}/netlink.so
375 %attr(755,root,root) %{_libdir}/%{name}/network.so
376 %attr(755,root,root) %{_libdir}/%{name}/nfs.so
377 %attr(755,root,root) %{_libdir}/%{name}/ntpd.so
378 #%attr(755,root,root) %{_libdir}/%{name}/perl.so
379 %attr(755,root,root) %{_libdir}/%{name}/processes.so
380 %attr(755,root,root) %{_libdir}/%{name}/serial.so
381 %attr(755,root,root) %{_libdir}/%{name}/swap.so
382 %attr(755,root,root) %{_libdir}/%{name}/syslog.so
383 %attr(755,root,root) %{_libdir}/%{name}/tail.so
384 #%attr(755,root,root) %{_libdir}/%{name}/tape.so
385 %attr(755,root,root) %{_libdir}/%{name}/teamspeak2.so
386 %attr(755,root,root) %{_libdir}/%{name}/tcpconns.so
387 #%attr(755,root,root) %{_libdir}/%{name}/traffic.so
388 %attr(755,root,root) %{_libdir}/%{name}/unixsock.so
389 %attr(755,root,root) %{_libdir}/%{name}/users.so
390 %attr(755,root,root) %{_libdir}/%{name}/vmem.so
391 %attr(755,root,root) %{_libdir}/%{name}/vserver.so
392 %attr(755,root,root) %{_libdir}/%{name}/wireless.so
393 %{_libdir}/%{name}/types.db
395 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
397 %attr(754,root,root) /etc/rc.d/init.d/%{name}
399 %{_mandir}/man1/collectd.1*
400 %{_mandir}/man1/collectd-nagios.1*
401 %{_mandir}/man5/collectd.conf.5*
402 %{_mandir}/man5/collectd-email.5*
403 %{_mandir}/man5/collectd-exec.5*
404 %{_mandir}/man5/collectd-perl.5*
405 %{_mandir}/man5/collectd-snmp.5*
406 %{_mandir}/man5/collectd-unixsock.5*
407 %{_mandir}/man1/collectdmon.1*
408 %{_mandir}/man5/types.db.5*
409 %{_var}/log/collectd.log
410 %dir %{_var}/lib/%{name}
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_libdir}/%{name}/ascent.so
418 %defattr(644,root,root,755)
419 %attr(755,root,root) %{_libdir}/%{name}/apache.so
422 %defattr(644,root,root,755)
423 %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/collection.conf
424 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
425 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
426 %attr(755,root,root) %{_appdir}/cgi-bin/collection.cgi
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_libdir}/%{name}/dns.so
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/%{name}/hddtemp.so
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/%{name}/mysql.so
441 %defattr(644,root,root,755)
442 %attr(755,root,root) %{_libdir}/%{name}/nginx.so
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_libdir}/%{name}/ping.so
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_libdir}/%{name}/powerdns.so
453 %defattr(644,root,root,755)
454 %attr(755,root,root) %{_libdir}/%{name}/rrdtool.so
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_libdir}/%{name}/sensors.so
461 %defattr(644,root,root,755)
462 %attr(755,root,root) %{_libdir}/%{name}/snmp.so
465 %defattr(644,root,root,755)
466 %attr(755,root,root) %{_libdir}/%{name}/uuid.so
469 %defattr(644,root,root,755)
470 %attr(755,root,root) %{_libdir}/%{name}/xmms.so