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