]> git.pld-linux.org Git - packages/collectd.git/blob - collectd.spec
9b5b73445fcd5d05e60f4dc3abfbce83fad4ec7f
[packages/collectd.git] / collectd.spec
1 # TODO:
2 # - package contrib scripts as %doc
3 # - perl modules with Collectd classes package to separate package
4 # - Disabled modules:
5 #    apple_sensors . . . no             (obvious)
6 #    ipvs  . . . . . . . no             (ip_vs.h not found - llh to be fixed)
7 #    libvirt . . . . . . no             (requires library)
8 #    multimeter  . . . . no             ?
9 #    onewire . . . . . . no             (needs libowfs)
10 #    perl  . . . . . . . no             (needs libperl)
11 #    tape  . . . . . . . no             ?
12 # - logrotate file for logfile plugin
13 #
14 # Conditional build:
15 %bcond_without  dns             # ???
16 %bcond_without  ipmi            # ipmi plugin package
17 %bcond_without  iptables        # iptables plugin
18 %bcond_with     multimeter      # multimeter plugin
19 %bcond_without  netlink         # netlink plugin
20 #
21 #http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358637
22 %ifarch %{x8664}
23 %undefine with_iptables
24 %undefine with_netlink
25 %endif
26 Summary:        Collects system information in RRD files
27 Summary(pl.UTF-8):      Zbieranie informacji o systemie w plikach RRD
28 Name:           collectd
29 Version:        4.5.1
30 Release:        3
31 License:        GPL v2
32 Group:          Daemons
33 Source0:        http://collectd.org/files/%{name}-%{version}.tar.gz
34 # Source0-md5:  ab900d15662859b8793abf99eda15c29
35 Source1:        %{name}.conf
36 Source2:        %{name}.init
37 Source3:        %{name}-http.conf
38 Source4:        %{name}-lighttpd.conf
39 Source10:       %{name}-df.conf
40 Source11:       %{name}-rrdtool.conf
41 Patch0:         %{name}-collection.patch
42 URL:            http://collectd.org/
43 %{?with_ipmi:BuildRequires:     OpenIPMI-devel >= 2.0.14-3}
44 BuildRequires:  autoconf
45 BuildRequires:  automake
46 BuildRequires:  curl-devel
47 %{?with_iptables:BuildRequires: iptables-devel >= 1.4.1.1-4}
48 BuildRequires:  libesmtp-devel
49 BuildRequires:  libnetlink-devel
50 BuildRequires:  libnotify-devel
51 BuildRequires:  liboping-devel
52 BuildRequires:  libpcap-devel
53 BuildRequires:  libstatgrab-devel >= 0.12
54 BuildRequires:  libtool
55 BuildRequires:  lm_sensors-devel
56 BuildRequires:  mysql-devel
57 BuildRequires:  nut-devel
58 BuildRequires:  perl-devel
59 BuildRequires:  rpmbuild(macros) >= 1.268
60 BuildRequires:  rrdtool-devel
61 BuildRequires:  net-snmp-devel
62 BuildRequires:  xmms-devel
63 Requires(post,preun):   /sbin/chkconfig
64 Requires:       rc-scripts
65 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66
67 %define         _pkglibdir      /var/lib/%{name}
68 %define         _webapps        /etc/webapps 
69 %define         _webapp         %{name}
70 %define         _webappdir      %{_webapps}/%{_webapp}
71 %define         _appdir         %{_datadir}/%{_webapp}
72
73 %description
74 collectd is a small daemon which collects system information every 10
75 seconds and writes the results in an RRD-file.
76
77 In contrast to most similar software, collectd is not a script but
78 written in plain C for performance and portability. As a daemon it
79 stays in memory, so there is no need to start up a heavy interpreter
80 every time new values should be logged. This allows collectd to have a
81 10 second resolution while being nice to the system.
82
83 %description -l pl.UTF-8
84 collectd to mały demon zbierający co 10 sekund informacje o systemie i
85 zapisujący wyniki do pliku RRD.
86
87 W odróżnieniu od innych podobnych programów collectd nie jest
88 skryptem, lecz jest napisany w czystym C z myślą o wydajności i
89 przenośności. Jako demon pozostaje w pamięci, więc nie ma potrzeby
90 urychamiania ciężkiego interpretera za każdym razem, kiedy powinny być
91 zapisane nowe wartości. Dzięki temu collect może mieć rozdzielczość 10
92 sekund i nie obciążać zbytnio systemu.
93
94 %package apache
95 Summary:        apache-plugin for collectd
96 Summary(pl_PL.UTF-8):   Wtyczka apache dla collectd
97 Group:          Daemons
98 Requires:       %{name} = %{version}-%{release}
99
100 %description apache
101 This plugin collectd data provided by Apache's `mod_status'.
102
103 %description apache -l pl.UTF-8
104 Wtyczka collectd zbierająca informacje udostępniane przez moduł
105 'mod_status' Apacha.
106
107 %package apcups
108 Summary:        APC UPS plugin for collectd
109 Summary(pl_PL.UTF-8):   Wtyczka APC UPS dla collectd
110 Group:          Daemons
111 Requires:       %{name} = %{version}-%{release}
112
113 %description apcups
114 APC UPS plugin for collectd.
115
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
125 %package battery
126 Summary:        battery plugin for collectd
127 Summary(pl_PL.UTF-8):   Wtyczka battery dla collectd
128 Group:          Daemons
129 Requires:       %{name} = %{version}-%{release}
130
131 %description battery
132 This plugin collects the battery's charge, the drawn current and the
133 battery's voltage.
134
135 %package collection
136 Summary:        Web script for collectiond
137 Summary(pl_PL.UTF-8):   Web script for collectiond
138 Group:          Applications/WWW
139 Requires:       %{name} = %{version}-%{release}
140 Requires:       perl(CGI)
141 Requires:       perl(Data::Dumper)
142 Requires:       perl(HTML::Entities)
143 Requires:       perl(RRDs)
144 Requires:       perl(URI::Escape)
145 Requires:       webserver(cgi)
146 # It might be not the best choice:
147 Suggests:       fonts-TTF-RedHat-liberation
148
149 %description collection
150 Web script for collectiond
151
152 %package cpu
153 Summary:        cpu-plugin for collectd
154 Summary(pl_PL.UTF-8):   Wtyczka cpu dla collectd
155 Group:          Daemons
156 Requires:       %{name} = %{version}-%{release}
157
158 %description cpu
159 The cpu-plugin collects the amount of time spent by the CPU in various states,
160 most notably executing user code, executing system code, waiting for IO
161 operations and being idle.
162
163 %package cpufreq
164 Summary:        cpufreq-plugin for collectd
165 Summary(pl_PL.UTF-8):   Wtyczka cpufreq dla collectd
166 Group:          Daemons
167 Requires:       %{name} = %{version}-%{release}
168
169 %description cpufreq
170 Collects the current CPU's frequency, mostly for mobile computers.
171
172 %package csv
173 Summary:        CSV output plugin for collectd
174 Summary(pl_PL.UTF-8):   Wtyczka wyjściowa CSV dla collectd
175 Group:          Daemons
176 Requires:       %{name} = %{version}-%{release}
177
178 %description csv
179 CSV output plugin for collectd.
180
181 %package df
182 Summary:        df-plugin for collectd
183 Summary(pl_PL.UTF-8):   Wtyczka df dla collectd
184 Group:          Daemons
185 Requires:       %{name} = %{version}-%{release}
186
187 %description df
188 The df-plugin collects file system usage information, i. e. basically how
189 much space on a mounted partition is used and how much is available. It's
190 named after and very similar to the df(1) UNIX command that's been around
191 forever.
192
193 %package disk
194 Summary:        disk-plugin for collectd
195 Summary(pl_PL.UTF-8):   Wtyczka disk dla collectd
196 Group:          Daemons
197 Requires:       %{name} = %{version}-%{release}
198
199 %description disk
200 This plugin collects performance statistics of harddisks and, where
201 supported, partitions.
202
203 %package dns
204 Summary:        dns-plugin for collectd
205 Summary(pl_PL.UTF-8):   Wtyczka dns dla collectd
206 Group:          Daemons
207 Requires:       %{name} = %{version}-%{release}
208 Requires:       perl-rrdtool
209
210 %description dns
211 This plugin has a similar functionality to dnstop: It uses libpcap to get
212 a copy of all traffic from/to port UDP/53 (that's the DNS port), interprets
213 the packets and collects statistics of your DNS traffic.
214
215 %package email
216 Summary:        email-plugin for collectd
217 Summary(pl_PL.UTF-8):   Wtyczka email dla collectd
218 Group:          Daemons
219 Requires:       %{name} = %{version}-%{release}
220
221 %description email
222 The email plugin opens an UNIX-socket over which one can submit email
223 statistics, such as the number of ``ham'', ``spam'', ``virus'', etc. mails
224 received/handled, spam scores and matched spam checks.
225
226 This plugin is intended to be used with the the
227 Mail::SpamAssassin::Plugin::Collectd manpage SpamAssassin-plugin which is
228 included in contrib/, but is of course not limited to that use.
229
230 %package entropy
231 Summary:        entropy-plugin for collectd
232 Summary(pl_PL.UTF-8):   Wtyczka entropy dla collectd
233 Group:          Daemons
234 Requires:       %{name} = %{version}-%{release}
235
236 %description entropy
237 entropy plugin for collectd.
238
239 %package exec
240 Summary:        exec-plugin for collectd
241 Summary(pl_PL.UTF-8):   Wtyczka exec dla collectd
242 Group:          Daemons
243 Requires:       %{name} = %{version}-%{release}
244
245 %description exec
246 The exec plugin forks of an executable either to receive values or to
247 dispatch notifications to the outside world.
248
249 %package filecount
250 Summary:        filecount-plugin for collectd
251 Summary(pl_PL.UTF-8):   Wtyczka filecount dla collectd
252 Group:          Daemons
253 Requires:       %{name} = %{version}-%{release}
254
255 %description filecount
256 The filecount-plugin does something very simple: Count the number of files
257 in a directory and all its subdirectories. This can be used for a variety of
258 statistics, for example the queue length of an MTA, the number of PHP
259 sessions of a web server or simply the number of files in your home
260 directory.
261
262 %package hddtemp
263 Summary:        hddtemp-plugin for collectd
264 Summary(pl_PL.UTF-8):   Wtyczka hddtemp dla collectd
265 Group:          Daemons
266 Requires:       %{name} = %{version}-%{release}
267
268 %description hddtemp
269 Temperature of harddisks. The temperatures are provided via S.M.A.R.T. and
270 queried by the external hddtemp-daemon.
271
272 %package interface
273 Summary:        interface-plugin for collectd
274 Summary(pl_PL.UTF-8):   Wtyczka interface dla collectd
275 Group:          Daemons
276 Requires:       %{name} = %{version}-%{release}
277
278 %description interface
279 The interface-plugin collects information about the traffic (octets), packets
280 and errors of interfaces.
281
282 %package iptables
283 Summary:        iptables-plugin for collectd
284 Summary(pl_PL.UTF-8):   Wtyczka iptables dla collectd
285 Group:          Daemons
286 Requires:       %{name} = %{version}-%{release}
287
288 %description iptables
289 With this plugin you can gather statistics from your ip_tables based
290 packetfilter (aka. firewall). It can collect the byte- and packet-counters
291 of selected rules and submit them to collectd. You can select rules that
292 should be collected wither by its position (e.g. "the fourth rule in the
293 INPUT queue in the filter table") or by its comment (using the COMMENT
294 match). This means that depending on your firewall layout you can collect
295 certain services (such as the amount of web-traffic), source or destination
296 hosts or networks, dropped packets and much more.
297
298 %package ipmi
299 Summary:        ipmi-plugin for collectd
300 Summary(pl_PL.UTF-8):   Wtyczka ipmi dla collectd
301 Group:          Daemons
302 Requires:       %{name} = %{version}-%{release}
303
304 %description ipmi
305 ipmi plugin for collectd.
306
307 %description ipmi -l pl.UTF-8
308 Wtyczka ipmi dla collectd.
309
310 %package irq
311 Summary:        IRQs-plugin for collectd
312 Summary(pl_PL.UTF-8):   Wtyczka IRQs dla collectd
313 Group:          Daemons
314 Requires:       %{name} = %{version}-%{release}
315
316 %description irq
317 IRQs plugin for collectd.
318
319 %package load
320 Summary:        load-plugin for collectd
321 Summary(pl_PL.UTF-8):   Wtyczka load dla collectd
322 Group:          Daemons
323 Requires:       %{name} = %{version}-%{release}
324
325 %description load
326 Collects the system load. These numbers give a rough overview over the
327 utilization of a machine, though their meaning is mostly overrated.
328
329 %package logfile
330 Summary:        logfile-plugin for collectd
331 Summary(pl_PL.UTF-8):   Wtyczka logfile dla collectd
332 Group:          Daemons
333 Requires:       %{name} = %{version}-%{release}
334
335 %description logfile
336 Logfile plugin for collectd.
337
338 %module_scripts mbmon
339 %package mbmon
340 Summary:        mbmon-plugin for collectd
341 Summary(pl_PL.UTF-8):   Wtyczka mbmon dla collectd
342 Group:          Daemons
343 Requires:       %{name} = %{version}-%{release}
344
345 %description mbmon
346 The mbmon plugin uses mbmon to retrieve temperature, voltage, etc.
347
348 %package memcached
349 Summary:        memcached-plugin for collectd
350 Summary(pl_PL.UTF-8):   Wtyczka memcached dla collectd
351 Group:          Daemons
352 Requires:       %{name} = %{version}-%{release}
353
354 %description memcached
355 The memcached plugin connects to a memcached daemon and collects the number
356 of connections and requests handled by the daemon, the CPU resources consumed,
357 number of items cached, number of threads, and bytes sent and received.
358
359 %package memory
360 Summary:        memory-plugin for collectd
361 Summary(pl_PL.UTF-8):   Wtyczka memory dla collectd
362 Group:          Daemons
363 Requires:       %{name} = %{version}-%{release}
364
365 %description memory
366 Collects physical memory utilization for collectd.
367
368 %package multimeter
369 Summary:        multimeter-plugin for collectd
370 Summary(pl_PL.UTF-8):   Wtyczka multimeter dla collectd
371 Group:          Daemons
372 Requires:       %{name} = %{version}-%{release}
373
374 %description multimeter
375 Multimeter plugin for collectd.
376
377 %package mysql
378 Summary:        mysql-plugin for collectd
379 Summary(pl_PL.UTF-8):   Moduł mysql dla collectd.
380 Group:          Daemons
381 Requires:       %{name} = %{version}-%{release}
382
383 %description mysql
384 MySQL querying plugin. This plugins provides data of issued commands,
385 called handlers and database traffic.
386
387 %description mysql -l pl.UTF-8
388 Moduł odpytujący MySQL. Wtyczka udostępnia dane o wydawanych
389 poleceniach, wywoływanych procedurach obsługi i ruchu bazodanowym.
390
391 %package netlink
392 Summary:        netlink-plugin for collectd
393 Summary(pl_PL.UTF-8):   Wtyczka netlink dla collectd
394 Group:          Daemons
395 Requires:       %{name} = %{version}-%{release}
396
397 %description netlink
398 This plugin will open a netlink socket to the Linux kernel and use it to get
399 statistics for interfaces, qdiscs, classes, and, if you can make use of it,
400 filters. Since in most setups many of the statistics this plugin can collect
401 aren't of interest, you can select which information to gather using the
402 configuration.
403
404 %package network
405 Summary:        network-plugin for collectd
406 Summary(pl_PL.UTF-8):   Wtyczka network dla collectd
407 Group:          Daemons
408 Requires:       %{name} = %{version}-%{release}
409
410 %description network
411 nginx plugin for collectd.
412
413 %package nfs
414 Summary:        NFS-plugin for collectd
415 Summary(pl_PL.UTF-8):   Wtyczka NFS dla collectd
416 Group:          Daemons
417 Requires:       %{name} = %{version}-%{release}
418
419 %description nfs
420 The nfs plugin counts the number of procedure calls of the different NFS
421 procedures.
422
423 %package nginx
424 Summary:        nginx-plugin for collectd
425 Summary(pl_PL.UTF-8):   Wtyczka nginx dla collectd
426 Group:          Daemons
427 Requires:       %{name} = %{version}-%{release}
428
429 %description nginx
430 This plugin collects the number of connections and requests handled by the
431 nginx daemon, a HTTP and mail server/proxy. It queries the page provided by
432 the ngx_http_stub_status_module module, which isn't compiled by default.
433
434 %package notify_desktop
435 Summary:        notify_desktop for collectd
436 Summary(pl_PL.UTF-8):   Wtyczka notify_desktop dla collectd
437 Group:          Daemons
438 Requires:       %{name} = %{version}-%{release}
439
440 %description notify_desktop
441 This plugin sends a desktop notification to a notification daemon, as
442 defined in the Desktop Notification Specification. To actually display the
443 notifications, notification-daemon is required and collectd has to be able
444 to access the X server.
445
446 %package notify_email
447 Summary:        notify_email-plugin for collectd
448 Summary(pl_PL.UTF-8):   Wtyczka notify_email dla collectd
449 Group:          Daemons
450 Requires:       %{name} = %{version}-%{release}
451
452 %description notify_email
453 notify_email plugin for collectd.
454
455 %package ntpd
456 Summary:        ntpd-plugin for collectd
457 Summary(pl_PL.UTF-8):   Wtyczka ntpd dla collectd
458 Group:          Daemons
459 Requires:       %{name} = %{version}-%{release}
460
461 %description ntpd
462 NTPd plugin for collectd.
463
464 %package nut
465 Summary:        nut-plugin for collectd
466 Summary(pl_PL.UTF-8):   Wtyczka nut dla collectd
467 Group:          Daemons
468 Requires:       %{name} = %{version}-%{release}
469
470 %description nut
471 UPS statistics using the Network UPS Tools. These statistics include
472 basically everything NUT will give us, including voltages, currents, power,
473 frequencies, load, and temperatures.
474
475 %package ping
476 Summary:        ping-plugin for collectd
477 Summary(pl_PL.UTF-8):   Wtyczka ping dla collectd
478 Group:          Daemons
479 Requires:       %{name} = %{version}-%{release}
480
481 %description ping
482 The network latency is measured as a roundtrip time. An ICMP-echo-request
483 (aka. "ping")is sent to a host and the time needed for his echo-reply (aka.
484 "pong") to arrive is measured. If a reply is not received within one second
485 the plugin will no longer expect a reply and return. This may happen in
486 several circumstances, e. g. the packet is lost, the host is down, a router
487 has dismissed the packet, etc.
488
489 %package postgresql
490 Summary:        mysql-plugin for collectd
491 Summary(pl_PL.UTF-8):   Moduł postgresql dla collectd.
492 Group:          Daemons
493 Requires:       %{name} = %{version}-%{release}
494
495 %description postgresql
496 The postgresql plugin queries statistics from PostgreSQL databases. It keeps
497 a persistent connection to all configured databases and tries to reconnect
498 if the connection has been interrupted.
499
500 %package powerdns
501 Summary:        powerdns-plugin for collectd
502 Summary(pl_PL.UTF-8):   Wtyczka powerdns dla collectd
503 Group:          Daemons
504 Requires:       %{name} = %{version}-%{release}
505
506 %description powerdns
507 The powerdns plugin queries statistics from an authoritative PowerDNS
508 nameserver and/or a PowerDNS recursor. Since both offer a wide variety of
509 values, many of which are probably meaningless to most users, but may be
510 useful for some.
511
512 %package processes
513 Summary:        processes-plugin for collectd
514 Summary(pl_PL.UTF-8):   Wtyczka processes dla collectd
515 Group:          Daemons
516 Requires:       %{name} = %{version}-%{release}
517
518 %description processes
519 This plugin collects the number of processes, grouped by their state (e.g.
520 running, sleeping, zombies, etc.). In addition to that, it can select
521 detailed statistics about selected processes, grouped by name.
522
523 %package rrdtool
524 Summary:        rrdtool-plugin for collectd
525 Summary(pl_PL.UTF-8):   Wtyczka rrdtool dla collectd
526 Group:          Daemons
527 Requires:       %{name} = %{version}-%{release}
528 Requires:       rrdtool
529
530 %description rrdtool
531 RRDTOOL plugin for collectd.
532
533 %package sensors
534 Summary:        sensors-plugin for collectd
535 Summary(pl_PL.UTF-8):   Wtyczka sensors dla collectd
536 Group:          Daemons
537 Requires:       %{name} = %{version}-%{release}
538
539 %description sensors
540 This plugin uses lm-sensors to read hardware sensors. You will need to
541 configure lm-sensors before this plugin will collect any usefull and correct
542 data.
543
544 %module_scripts serial
545 %package serial
546 Summary:        serial-plugin for collectd
547 Summary(pl_PL.UTF-8):   Wtyczka serial dla collectd
548 Group:          Daemons
549 Requires:       %{name} = %{version}-%{release}
550
551 %description serial
552 Serial plugin for collectd.
553
554 %package snmp
555 Summary:        snmp-plugin for collectd
556 Summary(pl_PL.UTF-8):   Wtyczka snmp dla collectd
557 Group:          Daemons
558 Requires:       %{name} = %{version}-%{release}
559
560 %description snmp
561 The snmp plugin queries other hosts using SNMP, the Simple Network
562 Management Protocol, and translates the value it receives to collectd's
563 internal format and dispatches them. Depending on the write plugins you have
564 loaded they may be written to disk or submitted to another instance or
565 whatever you configured.
566
567 %package swap
568 Summary:        swap-plugin for collectd
569 Summary(pl_PL.UTF-8):   Wtyczka swap dla collectd
570 Group:          Daemons
571 Requires:       %{name} = %{version}-%{release}
572
573 %description swap
574 Swap space plugin for collectd.
575
576 %package syslog
577 Summary:        syslog-plugin for collectd
578 Summary(pl_PL.UTF-8):   Wtyczka syslog dla collectd
579 Group:          Daemons
580 Requires:       %{name} = %{version}-%{release}
581
582 %description syslog
583 Syslog plugin for collectd.
584
585 %package tail
586 Summary:        tail-plugin for collectd
587 Summary(pl_PL.UTF-8):   Wtyczka tail dla collectd
588 Group:          Daemons
589 Requires:       %{name} = %{version}-%{release}
590
591 %description tail
592 The tail-plugin can be used to "tail" logfiles, i.e. follow them as tail -F
593 does. Each line is given to one or more "matches" which test if the line is
594 relevant for any statistics using a regular expression.
595
596 %package tcpconns
597 Summary:        tcpconns-plugin for collectd
598 Summary(pl_PL.UTF-8):   Wtyczka tcpconns dla collectd
599 Group:          Daemons
600 Requires:       %{name} = %{version}-%{release}
601
602 %description tcpconns
603 The tcpconns-plugin counts the number of TCP connections to or from a
604 specified port. Typically the connectioins where you specify the local port
605 are incoming connections while the connections where you specify the remote
606 port are outgoing connections.
607
608 %package teamspeak2
609 Summary:        teamspeak2-plugin for collectd
610 Summary(pl_PL.UTF-8):   Wtyczka teamspeak2 dla collectd
611 Group:          Daemons
612 Requires:       %{name} = %{version}-%{release}
613
614 %description teamspeak2
615 The teamspeak2 plugin connects to the query port of a teamspeak2 server and
616 polls interesting global and virtual server data. The plugin can query only
617 one physical server but unlimited virtual servers.
618
619 %package thermal
620 Summary:        thermal-plugin for collectd
621 Summary(pl_PL.UTF-8):   Wtyczka thermal dla collectd
622 Group:          Daemons
623 Requires:       %{name} = %{version}-%{release}
624
625 %description thermal
626 Thermal plugin for collectd.
627
628 %package unixsock
629 Summary:        unixsock-plugin for collectd
630 Summary(pl_PL.UTF-8):   Wtyczka unixsock dla collectd
631 Group:          Daemons
632 Requires:       %{name} = %{version}-%{release}
633
634 %description unixsock
635 The unixsock plugin opens an UNIX-socket over which one can interact with
636 the daemon. This can be used to use the values collected by collectd in
637 other applications, such as monitoring, or submit externally collected
638 values to collectd.
639
640 %package users
641 Summary:        users-plugin for collectd
642 Summary(pl_PL.UTF-8):   Wtyczka users dla collectd
643 Group:          Daemons
644 Requires:       %{name} = %{version}-%{release}
645
646 %description users
647 Number of users currently logged in.
648
649 %package uuid
650 Summary:        uuid-plugin for collectd
651 Summary(pl_PL.UTF-8):   Wtyczka uuid dla collectd
652 Group:          Daemons
653 Requires:       %{name} = %{version}-%{release}
654
655 %description uuid
656 This plugin, if loaded, causes the Hostname to be taken from the machine's
657 UUID. The UUID is a universally unique designation for the machine, usually
658 taken from the machine's BIOS. This is most useful if the machine is
659 running in a virtual environment such as Xen, in which case the UUID is
660 preserved across shutdowns and migration.
661
662 %package vmem
663 Summary:        vmem-plugin for collectd
664 Summary(pl_PL.UTF-8):   Wtyczka vmem dla collectd
665 Group:          Daemons
666 Requires:       %{name} = %{version}-%{release}
667
668 %description vmem
669 The vmem plugin collects information about the usage of virtual memory.
670 Since the statistics provided by the Linux kernel are very detailed, they
671 are collected very detailed.
672
673 %package vserver
674 Summary:        vserver-plugin for collectd
675 Summary(pl_PL.UTF-8):   Wtyczka vserver dla collectd
676 Group:          Daemons
677 Requires:       %{name} = %{version}-%{release}
678
679 %description vserver
680 Collects information about the virtual servers running on a system, using
681 Linux-Vserver.
682
683 %package wireless
684 Summary:        wireless-plugin for collectd
685 Summary(pl_PL.UTF-8):   Wtyczka wireless dla collectd
686 Group:          Daemons
687 Requires:       %{name} = %{version}-%{release}
688
689 %description wireless
690 Wireless plugin for collectd.
691
692 %package xmms
693 Summary:        xmms-plugin for collectd
694 Summary(pl_PL.UTF-8):   Wtyczka xmms dla collectd
695 Group:          Daemons
696 Requires:       %{name} = %{version}-%{release}
697
698 %description xmms
699 This plugin collectd data provided by XMMS.
700
701 %prep
702 %setup -q
703 %patch0 -p1
704
705 %build
706 %{__libtoolize}
707 %{__aclocal}
708 %{__autoconf}
709 %{__autoheader}
710 %{__automake}
711
712 %configure \
713         --with-libstatgrab=/usr \
714         --with-lm-sensors=/usr \
715         --with-libmysql=/usr \
716         --%{?with_ipmi:en}%{!?with_ipmi:dis}able-ipmi \
717         --%{?with_multimeter:en}%{!?with_multimeter:dis}able-multimeter \
718         --%{?with_dns:en}%{!?with_dns:dis}able-dns \
719         --%{?with_iptables:en}%{!?with_iptables:dis}able-iptables \
720         --%{?with_netlink:en}%{!?with_netlink:dis}able-netlink \
721         --disable-ipvs \
722         --disable-libvirt \
723         --disable-perl
724
725
726 %{__make} LDFLAGS="%{rpmldflags} -lstatgrab" \
727         BUILD_WITH_OPENIPMI_CFLAGS="-I/usr/include" \
728         BUILD_WITH_OPENIPMI_LIBS="-L/usr/lib64 -lOpenIPMIutils -lOpenIPMIpthread"
729
730 %install
731 rm -rf $RPM_BUILD_ROOT
732 install -d $RPM_BUILD_ROOT{%{_var}/{log/,lib/%{name}},/etc/{rc.d/init.d/,collectd.d}} \
733         $RPM_BUILD_ROOT{%{_appdir}/cgi-bin,%{_webappdir},%{_pkglibdir}}
734
735 %{__make} install \
736         DESTDIR=$RPM_BUILD_ROOT
737
738 touch $RPM_BUILD_ROOT%{_var}/log/collectd.log
739 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
740
741 # Web frontend:
742 install contrib/collection.conf $RPM_BUILD_ROOT%{_webappdir}
743 install contrib/collection.cgi $RPM_BUILD_ROOT%{_appdir}/cgi-bin
744 install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
745 install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
746 install %{SOURCE4} $RPM_BUILD_ROOT%{_webappdir}/lighttpd.conf
747
748 ### Configs instalation ###
749 for i in `egrep "^LoadPlugin" src/collectd.conf |awk '{print $NF}' ` ; do
750         egrep "LoadPlugin $i$" src/collectd.conf > $RPM_BUILD_ROOT%{_sysconfdir}/collectd.d/$i.conf
751         grep -v LoadPlugin src/collectd.conf |%{__sed} -e '/./{H;$!d;}' -e "x;/ $i>/!d;" >> $RPM_BUILD_ROOT%{_sysconfdir}/collectd.d/$i.conf
752 done
753
754 # Example config in sources: src/collectd.conf
755 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
756
757 # Overwrite only files which we want to change:
758 install %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.d/df.conf
759 install %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.d/rrdtool.conf
760
761 # Cleanups:
762 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
763
764 %clean
765 rm -rf $RPM_BUILD_ROOT
766
767 %post
768 /sbin/chkconfig --add %{name}
769 %service %{name} restart
770
771 %preun
772 if [ "$1" = "0" ]; then
773         %service -q %{name} stop
774         /sbin/chkconfig --del %{name}
775 fi
776
777 %define module_scripts() \
778 %post %1 \
779 %service %{name} restart \
780 \
781 %postun %1 \
782 %service %{name} restart
783
784 %module_scripts apache
785 %module_scripts apcups
786 %module_scripts ascent
787 %module_scripts battery
788 %module_scripts cpufreq
789 %module_scripts cpu
790 %module_scripts csv
791 %module_scripts df
792 %module_scripts disk
793 %{?with_dns:%module_scripts dns}
794 %module_scripts email
795 %module_scripts entropy
796 %module_scripts exec
797 %module_scripts filecount
798 %module_scripts hddtemp
799 %module_scripts interface
800 %{?with_ipmi:%module_scripts ipmi}
801 %{?with_iptables:%module_scripts iptables}
802 %module_scripts irq
803 %module_scripts load
804 %module_scripts logfile
805 %module_scripts mbmon
806 %module_scripts memcached
807 %module_scripts memory
808 %{?with_multimeter:%module_scripts multimeter}
809 %module_scripts mysql
810 %{?with_netlink:%module_scripts netlink}
811 %module_scripts network
812 %module_scripts nfs
813 %module_scripts nginx
814 %module_scripts notify_desktop
815 %module_scripts notify_email
816 %module_scripts ntpd
817 %module_scripts nut
818 %module_scripts ping
819 %module_scripts postgresql
820 %module_scripts powerdns
821 %module_scripts processes
822 %module_scripts rrdtool
823 %module_scripts sensors
824 %module_scripts serial
825 %module_scripts snmp
826 %module_scripts swap
827 %module_scripts syslog
828 %module_scripts tail
829 %module_scripts tcpconns
830 %module_scripts teamspeak2
831 %module_scripts thermal
832 %module_scripts unixsock
833 %module_scripts users
834 %module_scripts uuid
835 %module_scripts vmem
836 %module_scripts vserver
837 %module_scripts wireless
838 %module_scripts xmms
839
840 %triggerin collection -- apache1 < 1.3.37-3, apache1-base
841 %webapp_register apache %{_webapp}
842
843 %triggerun collection -- apache1 < 1.3.37-3, apache1-base
844 %webapp_unregister apache %{_webapp}
845
846 %triggerin collection -- apache < 2.2.0, apache-base
847 %webapp_register httpd %{_webapp}
848
849 %triggerun collection -- apache < 2.2.0, apache-base
850 %webapp_unregister httpd %{_webapp}
851
852 %triggerin collection -- lighttpd
853 %webapp_register lighttpd %{_webapp}
854
855 %triggerun collection -- lighttpd
856 %webapp_unregister lighttpd %{_webapp}
857
858 %files
859 %defattr(644,root,root,755)
860 %doc AUTHORS ChangeLog README TODO contrib
861 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
862 %dir %{_sysconfdir}/%{name}.d
863 %attr(755,root,root) %{_sbindir}/collectd
864 %attr(755,root,root) %{_sbindir}/collectdmon
865 %attr(755,root,root) %{_bindir}/collectd-nagios
866 %dir %{_libdir}/%{name}
867 %{_libdir}/%{name}/types.db
868 %attr(754,root,root) /etc/rc.d/init.d/%{name}
869 %{_mandir}/man1/collectd.1*
870 %{_mandir}/man1/collectd-nagios.1*
871 %{_mandir}/man5/collectd.conf.5*
872 %{_mandir}/man5/collectd-perl.5*
873 %{_mandir}/man1/collectdmon.1*
874 %{_mandir}/man5/types.db.5*
875 %dir %{_var}/lib/%{name}
876
877 %files collection
878 %defattr(644,root,root,755)
879 %dir %{_webappdir}
880 %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/collection.conf
881 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
882 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
883 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/lighttpd.conf
884 %dir %{_appdir}
885 %dir %{_appdir}/cgi-bin
886 %attr(755,root,root) %{_appdir}/cgi-bin/collection.cgi
887
888 ########## PLUGINS:
889 %files apcups
890 %defattr(644,root,root,755)
891 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/apcups.conf
892 %attr(755,root,root) %{_libdir}/%{name}/apcups.so
893
894 %files ascent
895 %defattr(644,root,root,755)
896 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/ascent.conf
897 %attr(755,root,root) %{_libdir}/%{name}/ascent.so
898
899 %files apache
900 %defattr(644,root,root,755)
901 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/apache.conf
902 %attr(755,root,root) %{_libdir}/%{name}/apache.so
903
904 %files battery
905 %defattr(644,root,root,755)
906 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/battery.conf
907 %attr(755,root,root) %{_libdir}/%{name}/battery.so
908
909 %files cpu
910 %defattr(644,root,root,755)
911 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/cpu.conf
912 %attr(755,root,root) %{_libdir}/%{name}/cpu.so
913
914 %files cpufreq
915 %defattr(644,root,root,755)
916 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/cpufreq.conf
917 %attr(755,root,root) %{_libdir}/%{name}/cpufreq.so
918
919 %files csv
920 %defattr(644,root,root,755)
921 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/csv.conf
922 %attr(755,root,root) %{_libdir}/%{name}/csv.so
923
924 %files df
925 %defattr(644,root,root,755)
926 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/df.conf
927 %attr(755,root,root) %{_libdir}/%{name}/df.so
928
929 %files disk
930 %defattr(644,root,root,755)
931 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/disk.conf
932 %attr(755,root,root) %{_libdir}/%{name}/disk.so
933
934 %files dns
935 %defattr(644,root,root,755)
936 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/dns.conf
937 %attr(755,root,root) %{_libdir}/%{name}/dns.so
938
939 %files email
940 %defattr(644,root,root,755)
941 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/email.conf
942 %attr(755,root,root) %{_libdir}/%{name}/email.so
943 %{_mandir}/man5/collectd-email.5*
944
945 %files entropy
946 %defattr(644,root,root,755)
947 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/entropy.conf
948 %attr(755,root,root) %{_libdir}/%{name}/entropy.so
949
950 %files exec
951 %defattr(644,root,root,755)
952 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/exec.conf
953 %attr(755,root,root) %{_libdir}/%{name}/exec.so
954 %{_mandir}/man5/collectd-exec.5*
955
956 %files filecount
957 %defattr(644,root,root,755)
958 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/filecount.conf
959 %attr(755,root,root) %{_libdir}/%{name}/filecount.so
960
961 %files hddtemp
962 %defattr(644,root,root,755)
963 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/hddtemp.conf
964 %attr(755,root,root) %{_libdir}/%{name}/hddtemp.so
965
966 %files interface
967 %defattr(644,root,root,755)
968 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/interface.conf
969 %attr(755,root,root) %{_libdir}/%{name}/interface.so
970
971 %if %{with ipmi}
972 %files ipmi
973 %defattr(644,root,root,755)
974 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/ipmi.conf
975 %attr(755,root,root) %{_libdir}/%{name}/ipmi.so
976 %endif
977
978 %if %{with iptables}
979 %files iptables
980 %defattr(644,root,root,755)
981 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/iptables.conf
982 %attr(755,root,root) %{_libdir}/%{name}/iptables.so
983 %endif
984
985 %files irq
986 %defattr(644,root,root,755)
987 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/irq.conf
988 %attr(755,root,root) %{_libdir}/%{name}/irq.so
989
990 %files load
991 %defattr(644,root,root,755)
992 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/load.conf
993 %attr(755,root,root) %{_libdir}/%{name}/load.so
994
995 %files logfile
996 %defattr(644,root,root,755)
997 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/logfile.conf
998 %attr(755,root,root) %{_libdir}/%{name}/logfile.so
999 %{_var}/log/collectd.log
1000
1001 %files mbmon
1002 %defattr(644,root,root,755)
1003 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/mbmon.conf
1004 %attr(755,root,root) %{_libdir}/%{name}/mbmon.so
1005
1006 %files memcached
1007 %defattr(644,root,root,755)
1008 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/memcached.conf
1009 %attr(755,root,root) %{_libdir}/%{name}/memcached.so
1010
1011 %files memory
1012 %defattr(644,root,root,755)
1013 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/memory.conf
1014 %attr(755,root,root) %{_libdir}/%{name}/memory.so
1015
1016 %if %{with multimeter}
1017 %files multimeter
1018 %defattr(644,root,root,755)
1019 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/multimeter.conf
1020 %attr(755,root,root) %{_libdir}/%{name}/multimeter.so
1021 %endif
1022
1023 %files mysql
1024 %defattr(644,root,root,755)
1025 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/mysql.conf
1026 %attr(755,root,root) %{_libdir}/%{name}/mysql.so
1027
1028 %if %{with netlink}
1029 %files netlink
1030 %defattr(644,root,root,755)
1031 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/netlink.conf
1032 %attr(755,root,root) %{_libdir}/%{name}/netlink.so
1033 %endif
1034
1035 %files network
1036 %defattr(644,root,root,755)
1037 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/network.conf
1038 %attr(755,root,root) %{_libdir}/%{name}/network.so
1039
1040 %files nfs
1041 %defattr(644,root,root,755)
1042 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/nfs.conf
1043 %attr(755,root,root) %{_libdir}/%{name}/nfs.so
1044
1045 %files nginx
1046 %defattr(644,root,root,755)
1047 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/nginx.conf
1048 %attr(755,root,root) %{_libdir}/%{name}/nginx.so
1049
1050 %files notify_desktop
1051 %defattr(644,root,root,755)
1052 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/notify_desktop.conf
1053 %attr(755,root,root) %{_libdir}/%{name}/notify_desktop.so
1054
1055 %files notify_email
1056 %defattr(644,root,root,755)
1057 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/notify_email.conf
1058 %attr(755,root,root) %{_libdir}/%{name}/notify_email.so
1059
1060 %files ntpd
1061 %defattr(644,root,root,755)
1062 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/ntpd.conf
1063 %attr(755,root,root) %{_libdir}/%{name}/ntpd.so
1064
1065 %files nut
1066 %defattr(644,root,root,755)
1067 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/nut.conf
1068 %attr(755,root,root) %{_libdir}/%{name}/nut.so
1069
1070 %files ping
1071 %defattr(644,root,root,755)
1072 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/ping.conf
1073 %attr(755,root,root) %{_libdir}/%{name}/ping.so
1074
1075 %files postgresql
1076 %defattr(644,root,root,755)
1077 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/postgresql.conf
1078 %attr(755,root,root) %{_libdir}/%{name}/postgresql.so
1079
1080 %files powerdns
1081 %defattr(644,root,root,755)
1082 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/powerdns.conf
1083 %attr(755,root,root) %{_libdir}/%{name}/powerdns.so
1084
1085 %files processes
1086 %defattr(644,root,root,755)
1087 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/processes.conf
1088 %attr(755,root,root) %{_libdir}/%{name}/processes.so
1089
1090 %files rrdtool
1091 %defattr(644,root,root,755)
1092 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/rrdtool.conf
1093 %attr(755,root,root) %{_libdir}/%{name}/rrdtool.so
1094
1095 %files sensors
1096 %defattr(644,root,root,755)
1097 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/sensors.conf
1098 %attr(755,root,root) %{_libdir}/%{name}/sensors.so
1099
1100 %files serial
1101 %defattr(644,root,root,755)
1102 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/serial.conf
1103 %attr(755,root,root) %{_libdir}/%{name}/serial.so
1104
1105 %files snmp
1106 %defattr(644,root,root,755)
1107 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/snmp.conf
1108 %attr(755,root,root) %{_libdir}/%{name}/snmp.so
1109 %{_mandir}/man5/collectd-snmp.5*
1110
1111 %files swap
1112 %defattr(644,root,root,755)
1113 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/swap.conf
1114 %attr(755,root,root) %{_libdir}/%{name}/swap.so
1115
1116 %files syslog
1117 %defattr(644,root,root,755)
1118 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/syslog.conf
1119 %attr(755,root,root) %{_libdir}/%{name}/syslog.so
1120
1121 %files tail
1122 %defattr(644,root,root,755)
1123 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/tail.conf
1124 %attr(755,root,root) %{_libdir}/%{name}/tail.so
1125
1126 %files tcpconns
1127 %defattr(644,root,root,755)
1128 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/tcpconns.conf
1129 %attr(755,root,root) %{_libdir}/%{name}/tcpconns.so
1130
1131 %files teamspeak2
1132 %defattr(644,root,root,755)
1133 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/teamspeak2.conf
1134 %attr(755,root,root) %{_libdir}/%{name}/teamspeak2.so
1135
1136 %files thermal
1137 %defattr(644,root,root,755)
1138 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/thermal.conf
1139 %attr(755,root,root) %{_libdir}/%{name}/thermal.so
1140
1141 %files unixsock
1142 %defattr(644,root,root,755)
1143 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/unixsock.conf
1144 %attr(755,root,root) %{_libdir}/%{name}/unixsock.so
1145 %{_mandir}/man5/collectd-unixsock.5*
1146
1147 %files users
1148 %defattr(644,root,root,755)
1149 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/users.conf
1150 %attr(755,root,root) %{_libdir}/%{name}/users.so
1151
1152 %files uuid
1153 %defattr(644,root,root,755)
1154 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/uuid.conf
1155 %attr(755,root,root) %{_libdir}/%{name}/uuid.so
1156
1157 %files vmem
1158 %defattr(644,root,root,755)
1159 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/vmem.conf
1160 %attr(755,root,root) %{_libdir}/%{name}/vmem.so
1161
1162 %files vserver
1163 %defattr(644,root,root,755)
1164 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/vserver.conf
1165 %attr(755,root,root) %{_libdir}/%{name}/vserver.so
1166
1167 %files wireless
1168 %defattr(644,root,root,755)
1169 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/wireless.conf
1170 %attr(755,root,root) %{_libdir}/%{name}/wireless.so
1171
1172 %files xmms
1173 %defattr(644,root,root,755)
1174 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.d/xmms.conf
1175 %attr(755,root,root) %{_libdir}/%{name}/xmms.so
This page took 0.184786 seconds and 2 git commands to generate.