]>
Commit | Line | Data |
---|---|---|
373d486f | 1 | # TODO: |
373d486f | 2 | # - lm_sensors subpackage |
762d0c28 | 3 | # - initscripts for local/client/server mode (subpackage ?) |
373d486f | 4 | # - package contrib scripts as %doc |
8bf13ddb PG |
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 | |
62 | ||
7df111b4 | 63 | Summary: Collects system information in RRD files |
322f1351 | 64 | Summary(pl.UTF-8): Zbieranie informacji o systemie w plikach RRD |
373d486f | 65 | Name: collectd |
e105712e | 66 | Version: 4.4.0 |
96376a8d | 67 | Release: 0.5 |
373d486f | 68 | License: GPL v2 |
81857fc6 | 69 | Group: Daemons |
f6984413 | 70 | Source0: http://collectd.org/files/%{name}-%{version}.tar.gz |
e105712e | 71 | # Source0-md5: a677ddcad97fdb3cdd09efac4842b11d |
f6984413 | 72 | Source1: %{name}.conf |
ec8f9a12 | 73 | Source2: %{name}.init |
96376a8d | 74 | Source3: %{name}-http.conf |
f6984413 | 75 | URL: http://collectd.org/ |
e105712e | 76 | BuildRequires: OpenIPMI-devel |
373d486f AF |
77 | BuildRequires: autoconf |
78 | BuildRequires: automake | |
762d0c28 | 79 | BuildRequires: curl-devel |
8bf13ddb | 80 | BuildRequires: iptables-devel |
e105712e | 81 | BuildRequires: libnetlink-devel |
907cfb56 | 82 | BuildRequires: liboping-devel |
762d0c28 | 83 | BuildRequires: libpcap-devel |
8bf13ddb | 84 | BuildRequires: libstatgrab-devel >= 0.12 |
373d486f | 85 | BuildRequires: libtool |
3a1b5393 | 86 | BuildRequires: lm_sensors-devel |
762d0c28 | 87 | BuildRequires: mysql-devel |
18e77dbc | 88 | BuildRequires: perl-devel |
c7024cdb | 89 | BuildRequires: rpmbuild(macros) >= 1.268 |
762d0c28 | 90 | BuildRequires: rrdtool-devel |
8bf13ddb | 91 | BuildRequires: xmms-devel |
7df111b4 | 92 | Requires(post,preun): /sbin/chkconfig |
c7024cdb | 93 | Requires: rc-scripts |
373d486f AF |
94 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
95 | ||
9259a6ab PG |
96 | %define _pkglibdir /var/lib/%{name} |
97 | %define _webapps /etc/webapps | |
98 | %define _webapp %{name} | |
99 | %define _webappdir %{_webapps}/%{_webapp} | |
100 | %define _appdir %{_datadir}/%{_webapp} | |
101 | ||
373d486f | 102 | %description |
7df111b4 JB |
103 | collectd is a small daemon which collects system information every 10 |
104 | seconds and writes the results in an RRD-file. | |
105 | ||
106 | In contrast to most similar software, collectd is not a script but | |
107 | written in plain C for performance and portability. As a daemon it | |
108 | stays in memory, so there is no need to start up a heavy interpreter | |
109 | every time new values should be logged. This allows collectd to have a | |
110 | 10 second resolution while being nice to the system. | |
111 | ||
19cbcad3 | 112 | %description -l pl.UTF-8 |
c7024cdb ER |
113 | collectd to mały demon zbierający co 10 sekund informacje o systemie i |
114 | zapisujący wyniki do pliku RRD. | |
373d486f | 115 | |
19cbcad3 JR |
116 | W odróżnieniu od innych podobnych programów collectd nie jest |
117 | skryptem, lecz jest napisany w czystym C z myślą o wydajności i | |
118 | przenośności. Jako demon pozostaje w pamięci, więc nie ma potrzeby | |
c7024cdb ER |
119 | urychamiania ciężkiego interpretera za każdym razem, kiedy powinny być |
120 | zapisane nowe wartości. Dzięki temu collect może mieć rozdzielczość 10 | |
121 | sekund i nie obciążać zbytnio systemu. | |
373d486f | 122 | |
8bf13ddb PG |
123 | %package ascent |
124 | Summary: ascent-plugin for collectd | |
125 | Summary(pl_PL.UTF-8): Wtyczka ascent dla collectd | |
126 | Group: Daemons | |
127 | Requires: %{name} = %{version}-%{release} | |
128 | ||
129 | %description ascent | |
130 | ascent plugin for collectd. | |
131 | ||
18e77dbc | 132 | %package apache |
273ffc81 JB |
133 | Summary: apache-plugin for collectd |
134 | Summary(pl_PL.UTF-8): Wtyczka apache dla collectd | |
18e77dbc | 135 | Group: Daemons |
273ffc81 | 136 | Requires: %{name} = %{version}-%{release} |
18e77dbc | 137 | |
138 | %description apache | |
139 | This plugin collectd data provided by Apache's `mod_status'. | |
140 | ||
141 | %description apache -l pl.UTF-8 | |
273ffc81 JB |
142 | Wtyczka collectd zbierająca informacje udostępniane przez moduł |
143 | 'mod_status' Apacha. | |
18e77dbc | 144 | |
133ab397 | 145 | %package collection |
5fafedfc | 146 | Summary: Web script for collectiond |
147 | Summary(pl_PL.UTF-8): Web script for collectiond | |
148 | Group: Applications/WWW | |
149 | Requires: %{name} = %{version}-%{release} | |
150 | ||
133ab397 | 151 | %description collection |
5fafedfc | 152 | Web script for collectiond |
153 | ||
8bf13ddb PG |
154 | %package dns |
155 | Summary: dns-plugin for collectd | |
156 | Summary(pl_PL.UTF-8): Wtyczka dns dla collectd | |
157 | Group: Daemons | |
158 | Requires: %{name} = %{version}-%{release} | |
3a1b5393 | 159 | Requires: perl-rrdtool |
ef79d9ea | 160 | |
8bf13ddb PG |
161 | %description dns |
162 | dns plugin for collectd. | |
163 | ||
164 | %package hddtemp | |
165 | Summary: hddtemp-plugin for collectd | |
166 | Summary(pl_PL.UTF-8): Wtyczka hddtemp dla collectd | |
167 | Group: Daemons | |
168 | Requires: %{name} = %{version}-%{release} | |
169 | ||
170 | %description hddtemp | |
171 | hddtemp plugin for collectd. | |
172 | ||
18e77dbc | 173 | %package mysql |
273ffc81 JB |
174 | Summary: mysql-plugin for collectd |
175 | Summary(pl_PL.UTF-8): Moduł mysql dla collectd. | |
18e77dbc | 176 | Group: Daemons |
273ffc81 | 177 | Requires: %{name} = %{version}-%{release} |
18e77dbc | 178 | |
179 | %description mysql | |
273ffc81 | 180 | MySQL querying plugin. This plugins provides data of issued commands, |
18e77dbc | 181 | called handlers and database traffic. |
182 | ||
183 | %description mysql -l pl.UTF-8 | |
273ffc81 JB |
184 | Moduł odpytujący MySQL. Wtyczka udostępnia dane o wydawanych |
185 | poleceniach, wywoływanych procedurach obsługi i ruchu bazodanowym. | |
18e77dbc | 186 | |
8bf13ddb PG |
187 | %package nginx |
188 | Summary: nginx-plugin for collectd | |
189 | Summary(pl_PL.UTF-8): Wtyczka nginx dla collectd | |
190 | Group: Daemons | |
191 | Requires: %{name} = %{version}-%{release} | |
192 | ||
193 | %description nginx | |
194 | nginx plugin for collectd. | |
195 | ||
907cfb56 PG |
196 | %package ping |
197 | Summary: ping-plugin for collectd | |
198 | Summary(pl_PL.UTF-8): Wtyczka ping dla collectd | |
199 | Group: Daemons | |
200 | Requires: %{name} = %{version}-%{release} | |
201 | ||
202 | %description ping | |
203 | ping plugin for collectd. | |
204 | ||
8bf13ddb PG |
205 | %package rrdtool |
206 | Summary: rrdtool-plugin for collectd | |
207 | Summary(pl_PL.UTF-8): Wtyczka rrdtool dla collectd | |
208 | Group: Daemons | |
209 | Requires: %{name} = %{version}-%{release} | |
210 | Requires: rrdtool | |
211 | ||
212 | %description rrdtool | |
213 | RRDTOOL plugin for collectd. | |
214 | ||
215 | %package sensors | |
216 | Summary: sensors-plugin for collectd | |
217 | Summary(pl_PL.UTF-8): Wtyczka sensors dla collectd | |
218 | Group: Daemons | |
219 | Requires: %{name} = %{version}-%{release} | |
220 | ||
221 | %description sensors | |
222 | This plugin collectd data provided by hardware sensors. | |
223 | ||
224 | %package snmp | |
225 | Summary: snmp-plugin for collectd | |
226 | Summary(pl_PL.UTF-8): Wtyczka snmp dla collectd | |
227 | Group: Daemons | |
228 | Requires: %{name} = %{version}-%{release} | |
229 | ||
230 | %description snmp | |
231 | snmp plugin for collectd. | |
232 | ||
233 | %package uuid | |
234 | Summary: uuid-plugin for collectd | |
235 | Summary(pl_PL.UTF-8): Wtyczka uuid dla collectd | |
236 | Group: Daemons | |
237 | Requires: %{name} = %{version}-%{release} | |
238 | ||
239 | %description uuid | |
240 | This plugin collectd UUID data. | |
241 | ||
242 | %package xmms | |
243 | Summary: xmms-plugin for collectd | |
244 | Summary(pl_PL.UTF-8): Wtyczka xmms dla collectd | |
245 | Group: Daemons | |
246 | Requires: %{name} = %{version}-%{release} | |
247 | Requires: xmms-libs | |
248 | ||
249 | %description xmms | |
250 | This plugin collectd data provided by XMMS. | |
251 | ||
373d486f AF |
252 | %prep |
253 | %setup -q | |
254 | ||
526f2b1b | 255 | cat >> collection.conf <<'EOF' |
256 | datadir: "/var/lib/collectd/" | |
257 | libdir: "/usr/lib/collectd/" | |
258 | EOF | |
259 | ||
373d486f AF |
260 | %build |
261 | %{__libtoolize} | |
262 | %{__aclocal} | |
263 | %{__autoconf} | |
264 | %{__autoheader} | |
265 | %{__automake} | |
266 | %configure \ | |
267 | --with-libstatgrab=/usr \ | |
268 | --with-lm-sensors=/usr \ | |
5fafedfc | 269 | --with-libmysql=/usr |
e105712e | 270 | %{__make} LDFLAGS="%{rpmldflags} -lstatgrab" |
373d486f AF |
271 | |
272 | %install | |
273 | rm -rf $RPM_BUILD_ROOT | |
96376a8d PG |
274 | install -d $RPM_BUILD_ROOT{%{_var}/{log/,lib/%{name}},/etc/rc.d/init.d/} \ |
275 | $RPM_BUILD_ROOT{%{_appdir}/cgi-bin,%{_webappdir},%{_pkglibdir}} | |
373d486f AF |
276 | |
277 | %{__make} install \ | |
278 | DESTDIR=$RPM_BUILD_ROOT | |
81857fc6 | 279 | |
e105712e | 280 | #install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf |
281 | touch $RPM_BUILD_ROOT%{_var}/log/collectd.log | |
282 | install src/collectd.conf $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf | |
ff0d0ea0 | 283 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
373d486f | 284 | |
96376a8d PG |
285 | # Web frontend: |
286 | install contrib/collection.conf $RPM_BUILD_ROOT%{_webappdir} | |
287 | install contrib/collection.cgi $RPM_BUILD_ROOT%{_appdir}/cgi-bin | |
288 | install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/apache.conf | |
289 | install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf | |
290 | ||
291 | # Cleanups: | |
292 | rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la | |
293 | ||
373d486f AF |
294 | %clean |
295 | rm -rf $RPM_BUILD_ROOT | |
296 | ||
81857fc6 | 297 | %post |
373d486f AF |
298 | /sbin/chkconfig --add %{name} |
299 | %service %{name} restart | |
300 | ||
81857fc6 | 301 | %preun |
373d486f AF |
302 | if [ "$1" = "0" ]; then |
303 | %service -q %{name} stop | |
304 | /sbin/chkconfig --del %{name} | |
305 | fi | |
306 | ||
96376a8d PG |
307 | %triggerin collection -- apache1 < 1.3.37-3, apache1-base |
308 | %webapp_register apache %{_webapp} | |
309 | ||
310 | %triggerun collection -- apache1 < 1.3.37-3, apache1-base | |
311 | %webapp_unregister apache %{_webapp} | |
312 | ||
313 | %triggerin collection -- apache < 2.2.0, apache-base | |
314 | %webapp_register httpd %{_webapp} | |
315 | ||
316 | %triggerun collection -- apache < 2.2.0, apache-base | |
317 | %webapp_unregister httpd %{_webapp} | |
318 | ||
373d486f AF |
319 | %files |
320 | %defattr(644,root,root,755) | |
e105712e | 321 | %doc AUTHORS ChangeLog README TODO contrib |
373d486f AF |
322 | |
323 | %attr(755,root,root) %{_sbindir}/collectd | |
e105712e | 324 | %attr(755,root,root) %{_sbindir}/collectdmon |
18e77dbc | 325 | %attr(755,root,root) %{_bindir}/collectd-nagios |
373d486f | 326 | %dir %{_libdir}/%{name} |
c1bbd93e | 327 | %attr(755,root,root) %{_libdir}/%{name}/apcups.so |
18e77dbc | 328 | #%attr(755,root,root) %{_libdir}/%{name}/apple_sensors.so |
373d486f | 329 | %attr(755,root,root) %{_libdir}/%{name}/battery.so |
373d486f | 330 | %attr(755,root,root) %{_libdir}/%{name}/cpufreq.so |
c1bbd93e | 331 | %attr(755,root,root) %{_libdir}/%{name}/cpu.so |
18e77dbc | 332 | %attr(755,root,root) %{_libdir}/%{name}/csv.so |
373d486f AF |
333 | %attr(755,root,root) %{_libdir}/%{name}/df.so |
334 | %attr(755,root,root) %{_libdir}/%{name}/disk.so | |
762d0c28 | 335 | %attr(755,root,root) %{_libdir}/%{name}/email.so |
18e77dbc | 336 | %attr(755,root,root) %{_libdir}/%{name}/entropy.so |
337 | %attr(755,root,root) %{_libdir}/%{name}/exec.so | |
18e77dbc | 338 | %attr(755,root,root) %{_libdir}/%{name}/interface.so |
e105712e | 339 | %attr(755,root,root) %{_libdir}/%{name}/iptables.so |
18e77dbc | 340 | %attr(755,root,root) %{_libdir}/%{name}/irq.so |
373d486f | 341 | %attr(755,root,root) %{_libdir}/%{name}/load.so |
18e77dbc | 342 | %attr(755,root,root) %{_libdir}/%{name}/logfile.so |
762d0c28 | 343 | %attr(755,root,root) %{_libdir}/%{name}/mbmon.so |
e6f53b24 | 344 | %attr(755,root,root) %{_libdir}/%{name}/memcached.so |
373d486f | 345 | %attr(755,root,root) %{_libdir}/%{name}/memory.so |
762d0c28 | 346 | %attr(755,root,root) %{_libdir}/%{name}/multimeter.so |
e105712e | 347 | %attr(755,root,root) %{_libdir}/%{name}/netlink.so |
18e77dbc | 348 | %attr(755,root,root) %{_libdir}/%{name}/network.so |
373d486f | 349 | %attr(755,root,root) %{_libdir}/%{name}/nfs.so |
c1bbd93e | 350 | %attr(755,root,root) %{_libdir}/%{name}/ntpd.so |
e6f53b24 | 351 | #%attr(755,root,root) %{_libdir}/%{name}/perl.so |
e105712e | 352 | %attr(755,root,root) %{_libdir}/%{name}/powerdns.so |
373d486f | 353 | %attr(755,root,root) %{_libdir}/%{name}/processes.so |
373d486f AF |
354 | %attr(755,root,root) %{_libdir}/%{name}/serial.so |
355 | %attr(755,root,root) %{_libdir}/%{name}/swap.so | |
e6f53b24 | 356 | %attr(755,root,root) %{_libdir}/%{name}/syslog.so |
e105712e | 357 | %attr(755,root,root) %{_libdir}/%{name}/tail.so |
18e77dbc | 358 | #%attr(755,root,root) %{_libdir}/%{name}/tape.so |
e105712e | 359 | %attr(755,root,root) %{_libdir}/%{name}/teamspeak2.so |
e6f53b24 | 360 | %attr(755,root,root) %{_libdir}/%{name}/tcpconns.so |
18e77dbc | 361 | #%attr(755,root,root) %{_libdir}/%{name}/traffic.so |
18e77dbc | 362 | %attr(755,root,root) %{_libdir}/%{name}/unixsock.so |
e6f53b24 | 363 | %attr(755,root,root) %{_libdir}/%{name}/users.so |
e105712e | 364 | %attr(755,root,root) %{_libdir}/%{name}/vmem.so |
c1bbd93e | 365 | %attr(755,root,root) %{_libdir}/%{name}/vserver.so |
f6984413 | 366 | %attr(755,root,root) %{_libdir}/%{name}/wireless.so |
e6f53b24 | 367 | %{_libdir}/%{name}/types.db |
373d486f AF |
368 | |
369 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf | |
370 | ||
ff0d0ea0 | 371 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
373d486f AF |
372 | |
373 | %{_mandir}/man1/collectd.1* | |
18e77dbc | 374 | %{_mandir}/man1/collectd-nagios.1* |
373d486f | 375 | %{_mandir}/man5/collectd.conf.5* |
18e77dbc | 376 | %{_mandir}/man5/collectd-email.5* |
377 | %{_mandir}/man5/collectd-exec.5* | |
378 | %{_mandir}/man5/collectd-perl.5* | |
379 | %{_mandir}/man5/collectd-snmp.5* | |
380 | %{_mandir}/man5/collectd-unixsock.5* | |
e105712e | 381 | %{_mandir}/man1/collectdmon.1* |
382 | %{_mandir}/man5/types.db.5* | |
383 | %{_var}/log/collectd.log | |
384 | %dir %{_var}/lib/%{name} | |
385 | ||
8bf13ddb PG |
386 | ########## PLUGINS: |
387 | %files ascent | |
388 | %defattr(644,root,root,755) | |
389 | %attr(755,root,root) %{_libdir}/%{name}/ascent.so | |
18e77dbc | 390 | |
391 | %files apache | |
392 | %defattr(644,root,root,755) | |
393 | %attr(755,root,root) %{_libdir}/%{name}/apache.so | |
394 | ||
133ab397 | 395 | %files collection |
5fafedfc | 396 | %defattr(644,root,root,755) |
96376a8d PG |
397 | %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/collection.conf |
398 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
399 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
400 | %attr(755,root,root) %{_appdir}/cgi-bin/collection.cgi | |
5fafedfc | 401 | |
8bf13ddb PG |
402 | %files dns |
403 | %defattr(644,root,root,755) | |
404 | %attr(755,root,root) %{_libdir}/%{name}/dns.so | |
405 | ||
406 | %files hddtemp | |
407 | %defattr(644,root,root,755) | |
408 | %attr(755,root,root) %{_libdir}/%{name}/hddtemp.so | |
409 | ||
18e77dbc | 410 | %files mysql |
411 | %defattr(644,root,root,755) | |
412 | %attr(755,root,root) %{_libdir}/%{name}/mysql.so | |
8bf13ddb PG |
413 | |
414 | %files nginx | |
415 | %defattr(644,root,root,755) | |
416 | %attr(755,root,root) %{_libdir}/%{name}/nginx.so | |
417 | ||
907cfb56 PG |
418 | %files ping |
419 | %defattr(644,root,root,755) | |
420 | %attr(755,root,root) %{_libdir}/%{name}/ping.so | |
421 | ||
8bf13ddb PG |
422 | %files rrdtool |
423 | %defattr(644,root,root,755) | |
424 | %attr(755,root,root) %{_libdir}/%{name}/rrdtool.so | |
425 | ||
426 | %files sensors | |
427 | %defattr(644,root,root,755) | |
428 | %attr(755,root,root) %{_libdir}/%{name}/sensors.so | |
429 | ||
430 | %files snmp | |
431 | %defattr(644,root,root,755) | |
432 | %attr(755,root,root) %{_libdir}/%{name}/snmp.so | |
433 | ||
434 | %files uuid | |
435 | %defattr(644,root,root,755) | |
436 | %attr(755,root,root) %{_libdir}/%{name}/uuid.so | |
437 | ||
438 | %files xmms | |
439 | %defattr(644,root,root,755) | |
440 | %attr(755,root,root) %{_libdir}/%{name}/xmms.so |