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