-
Notifications
You must be signed in to change notification settings - Fork 4
/
collectd.spec
2321 lines (1797 loc) · 64.4 KB
/
collectd.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%global _hardened_build 1
%global __provides_exclude_from ^%{_libdir}/collectd/.*\\.so$
%undefine _strict_symbol_defs_build
%global enable_amqp_09 1
%global enable_amqp1 1
# x86_64 required for building dpdk
# dpdkstat feature requires dpdk >= 16.11
%ifarch x86_64
# dpdk-* disabled, it's not recommended to use in combintation with
# ovs https://github.com/collectd/collectd/pull/2613
%global enable_dpdkstat 0
%global enable_dpdkevents 0
%else
%global enable_dpdkstat 0
%global enable_dpdkevents 0
%endif
%global enable_dcpmm 0
%global enable_dpdk_telemetry 0
%global enable_ganglia 0
# there is no java in centos9s atm
%if 0%{?rhel} > 8
%global enable_java 0
%else
%global enable_java 1
%endif
%global enable_logparser 1
%if 0%{?rhel} > 8
%global enable_memcachec 0
%else
%global enable_memcachec 1
%endif
%global enable_mysql 1
%ifarch x86_64
%global enable_pcie_errors 1
%else
%global enable_pcie_errors 0
%endif
%if 0%{?rhel} > 8
# iptables does not provide iptc anymore
%global enable_iptables 0
%else
%global enable_iptables 1
%endif
%global enable_snmp 1
# pmu requires libjevents to be available
# pmu is only available on Intel architectures
%ifarch x86_64
%global enable_intel_pmu 0
%else
%global enable_intel_pmu 0
%endif
# lvm uses deprecated interface
%global enable_lvm 0
# pinba plugin collects stuff from specific php extension
%global enable_pinba 0
%global enable_ovs_events 1
%global enable_ovs_stats 1
%ifnarch ppc sparc sparc64 ppc64le
%global enable_sensors 1
%else
%global enable_sensors 0
%endif
%if 0%{?rhel} > 8
%global enable_write_redis 0
%else
%global enable_write_redis 1
%endif
%global enable_write_syslog 1
# mic disabled, MicAccessAPI required
%global enable_mic 0
%ifarch x86_64
%global enable_intel_rdt 1
%else
%global enable_intel_rdt 0
%endif
%global enable_libaquaero5 0
%global enable_write_kafka 1
%global enable_prometheus 1
%if 0%{?rhel} > 8
%global enable_riemann 0
%else
%global enable_riemann 1
%endif
%global enable_web 0
# pulls in X as dep
%global enable_notify_desktop 0
%dump
Summary: Statistics collection daemon for filling RRD files
Name: collectd
Version: 5.12.0
Release: 9%{?dist}
License: MIT and GPLv2
URL: https://collectd.org/
Source: https://github.com/collectd/collectd/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
Source1: collectd-httpd.conf
Source2: collectd.service
Source11: default-plugins-cpu.conf
Source12: default-plugins-interface.conf
Source13: default-plugins-load.conf
Source14: default-plugins-memory.conf
Source15: default-plugins-syslog.conf
Source83: mcelog.conf
Source84: pmu.conf
Source85: write_prometheus.conf
Source86: virt.conf
Source87: hugepages.conf
Source88: ovs-events.conf
Source89: ovs-stats.conf
Source90: rdt.conf
Source91: apache.conf
Source92: email.conf
Source93: mysql.conf
Source94: nginx.conf
Source95: sensors.conf
Source96: snmp.conf
Source97: rrdtool.conf
Patch0001: 0001-Include-collectd.d-and-disable-default-loading.patch
# DES support was removed from openssl3.0 in rhel/centos 9
%if 0%{?rhel} > 8 || 0%{?fedora}
# Remove DES support in snmp plugin
# https://github.com/collectd/collectd/commit/1483ef8e03603bb8e1f89745325a17ba50fbbedf
Patch0002: %{name}-remove-des-support-from-snmp-plugin.patch
%endif
# virt plugin: Add hugetlb_ metrics
# https://github.com/collectd/collectd/commit/8c781279e9c4789936323670b729f9a979c976db
Patch0003: %{name}-virt-Add-hugetlb-metrics.patch
# virt plugin does not return names of VMs for nova
Patch0004: 3acf3440e76734401bb61d58b98f033449f827e7.patch
Patch0005: 0001-Fix-compile-of-the-prometheus-plugin.patch
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(ExtUtils::Embed)
BuildRequires: libgcrypt-devel
BuildRequires: git-core
BuildRequires: automake
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%if !0%{?enable_amqp1}
Obsoletes: %{name}-amqp1 < %{version}-%{release}
%endif
%if !0%{?enable_dpdk_telemetry}
Obsoletes: %{name}-dpdk_telemetry < %{version}-%{release}
%endif
%if !0%{?enable_iptables}
Obsoletes: %{name}-iptables < %{version}-%{release}
%endif
# generic-gmx depends on availability of -java.
%if !0%{?enable_java}
Obsoletes: %{name}-java < %{version}-%{release}
Obsoletes: %{name}-generic-jmx < %{version}-%{release}
%endif
%if !0%{?enable_lvm}
Obsoletes: %{name}-lvm < %{version}-%{release}
%endif
%if !0%{?enable_memcachec}
Obsoletes: %{name}-memcachec < %{version}-%{release}
%endif
%if !0%{?enable_mysql}
Obsoletes: %{name}-mysql < %{version}-%{release}
%endif
%if !0%{?enable_notify_desktop}
Obsoletes: %{name}-notify_desktop < %{version}-%{release}
%endif
%if !0%{?enable_pinba}
Obsoletes: %{name}-pinba < %{version}-%{release}
%endif
%if !0%{?enable_snmp}
Obsoletes: %{name}-snmp < %{version}-%{release}
Obsoletes: %{name}-snmp-agent < %{version}-%{release}
%endif
%if !0%{?enable_write_redis}
Obsoletes: %{name}-write_redis < %{version}-%{release}
%endif
%if !0%{?enable_riemann}
Obsoletes: %{name}-write_riemann < %{version}-%{release}
%endif
%if !0%{?enable_web}
Obsoletes: %{name}-web < %{version}-%{release}
%endif
%description
collectd is a small daemon written in C for performance. It reads various
system statistics and updates RRD files, creating them if necessary.
Since the daemon doesn't need to startup every time it wants to update the
files it's very fast and easy on the system. Also, the statistics are very
fine grained since the files are updated every 10 seconds.
%if 0%{?enable_amqp_09}
%package amqp
Summary: AMQP 0.9 plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: librabbitmq-devel
%description amqp
This plugin can be used to communicate with other instances of collectd
or third party applications using an AMQP-0.9 message broker.
%endif
%if 0%{enable_amqp1}
%package amqp1
Summary: Sends JSON-encoded data to an Advanced Message Queuing Protocol
BuildRequires: qpid-proton-c-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
%description amqp1
Sends JSON-encoded data to an Advanced Message Queuing Protocol (AMQP)
1.0 server, such as Qpid Dispatch Router or Apache Artemis Broker.
%endif
%package apache
Summary: Apache plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
%description apache
This plugin collects data provided by Apache's 'mod_status'.
%package ascent
Summary: Ascent plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: curl-devel
BuildRequires: libxml2-devel
%description ascent
This plugin collects data about an Ascent server,
a free server for the "World of Warcraft" game.
%package bind
Summary: Bind plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: curl-devel
BuildRequires: libxml2-devel
%description bind
This plugin retrieves statistics from the BIND dns server.
%package check-uptime
Summary: Check for cache events for uptime metric
Requires: %{name}%{?_isa} = %{version}-%{release}
%description check-uptime
Checks for cache events for uptime metric, and send notifications
when metric state changed.
%package ceph
Summary: Ceph plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: yajl-devel
%description ceph
This plugin collects data from Ceph.
%package chrony
Summary: Chrony plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
%description chrony
Chrony plugin for collectd
%package -n collectd-utils
Summary: Collectd utilities
Requires: libcollectdclient%{?_isa} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n collectd-utils
Collectd utilities
%package connectivity
Summary: Monitors network interface up/down status via netlink library
Requires: %{name}%{?_isa} = %{version}-%{release}
%description connectivity
Plugin that monitors network interface up/down status via netlink library
%package curl
Summary: Curl plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: curl-devel
%description curl
This plugin reads webpages with curl
%package curl_json
Summary: Curl JSON plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: curl-devel
BuildRequires: yajl-devel
%description curl_json
This plugin retrieves JSON data via curl.
%package curl_xml
Summary: Curl XML plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: curl-devel
BuildRequires: libxml2-devel
%description curl_xml
This plugin retrieves XML data via curl.
%if 0%{?enable_dcpmm} > 0
%package dcpmm
Summary: Plugin for Intel Optane DC Presistent Memory (DCPMM)
Provides: %{name}-dcpmm = %{version}-%{release}
%description dcpmm
Collect performance and health statistics from Intel Optane DC Persistent Memory.
%endif
%package dbi
Summary: DBI plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: libdbi-devel
%description dbi
This plugin uses the dbi library to connect to various databases,
execute SQL statements and read back the results.
%package disk
Summary: Disk plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: systemd-devel
%description disk
This plugin collects statistics of harddisk and, where supported, partitions.
%package dns
Summary: DNS traffic analysis plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: libpcap-devel
%description dns
This plugin collects DNS traffic data.
%if 0%{?enable_dpdkstat} == 1
%package dpdkstat
Summary: DPDKstat plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: dpdk-devel
%description dpdkstat
This plugin collects data from dpdkstat
%endif
%if 0%{?enable_dpdkevents} == 1
%package dpdkevents
Summary: DPDKevents plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: dpdk-devel >= 16.07
%description dpdkevents
Dpdkevents plugin collects and reports following events from DPDK based
applications:
- link status of network ports bound with DPDK
- keep alive events related to DPDK logical cores
%endif
%if 0%{?enable_dpdk_telemetry} > 0
%package dpdk_telemetry
Summary: Plugin to fetch DPDK metrics
Provides: %{name}-dpdk_telemetry = %{version}-%{release}
BuildRequires: jansson-devel
%description dpdk_telemetry
Provides an easy way to use the DPDK telemetry API to query ethernet device metrics.
%endif
%package drbd
Summary: DRBD plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
%description drbd
This plugin collects data from DRBD.
%package email
Summary: Email plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
%description email
This plugin collects data provided by spamassassin.
%if 0%{?enable_java}
%package generic-jmx
Summary: Generic JMX plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
%description generic-jmx
This plugin collects data provided by JMX.
%endif
%package hugepages
Summary: Number of hugepages on Linux
Requires: %{name}%{?_isa} = %{version}-%{release}
%description hugepages
This plugin reports the number of used and free hugepages on Linux.
%package infiniband
Summary: Collect metrics about infiniband ports
%description infiniband
Collect metrics about infiniband ports
%if 0%{?enable_intel_pmu} > 0
%package pmu
Summary: Intel PMU plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
# jevents-devel is part of the PMU-tools package
Requires: pmu-data
BuildRequires: jevents-devel
%description pmu
The intel_pmu plugin collects information about system performance
counters using kernel Linux perf interface.
%endif
%if 0%{?enable_intel_rdt} > 0
%package rdt
Summary: Intel RDT plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: intel-cmt-cat-devel
%description rdt
The intel_rdt plugin collects information provided by monitoring features of
Intel Resource Director Technology (Intel(R) RDT).
%endif
%package ipmi
Summary: IPMI plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: OpenIPMI-devel
%description ipmi
This plugin for collectd provides IPMI support.
%if 0%{?enable_iptables}
%package iptables
Summary: Iptables plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: iptables-devel
%description iptables
This plugin collects data from iptables counters.
%endif
%package ipvs
Summary: IPVS plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
%description ipvs
This plugin collects data from IPVS.
%if 0%{?enable_java}
%package java
Summary: Java bindings for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: java-devel
BuildRequires: jpackage-utils
%description java
These are the Java bindings for collectd.
%endif
%package -n libcollectdclient
Summary: Collectd client library
%description -n libcollectdclient
Collectd client library.
%package -n libcollectdclient-devel
Summary: Development files for libcollectdclient
Requires: libcollectdclient%{?_isa} = %{version}-%{release}
%description -n libcollectdclient-devel
Development files for libcollectdclient.
%if 0%{?enable_logparser} > 0
%package logparser
Summary: Parse different kinds of logs
Provides: %{name}-logparser = %{version}-%{release}
%description logparser
Plugin searches the log file for messages which contain several matches
(two or more). When all mandatory matches are found then it sends proper
notification containing all fetched values.
%endif
%package log_logstash
Summary: Logstash plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: yajl-devel
%description log_logstash
This plugin formats messages as JSON events for Logstash
%package mcelog
Summary: Machine Check Exceptions notifications
Requires: %{name}%{?_isa} = %{version}-%{release}
%description mcelog
This plugin monitors machine check exceptions reported by mcelog and generates
appropriate notifications when machine check exceptions are detected.
%package mdevents
Summary: Get events from RAID arrays in syslog
%description mdevents
This plugin, named mdevents, is responsible for gathering the events
from RAID arrays that were written to syslog by mdadm utility (which
is a user-space software for managing the RAIDs). Then, based on
configuration provided by user, plugin will decide whether to send the
collectd notification or not.
Mdevents needs the syslog and mdadm to be present on a platform that
collectd is launched.
%if 0%{?enable_memcachec}
%package memcachec
Summary: Memcachec plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: libmemcached-devel
%description memcachec
This plugin connects to a memcached server, queries one or more
given pages and parses the returned data according to user specification.
%endif
%if 0%{?enable_mic} > 0
%package mic
Summary: mic plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
# BuildRequires: MicAccessApi
%description mic
The mic plugin collects CPU usage, memory usage, temperatures and power
consumption from Intel Many Integrated Core (MIC) CPUs.
%endif
%if 0%{?enable_mysql} > 0
%package mysql
Summary: MySQL plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: mariadb-connector-c-devel
%description mysql
MySQL querying plugin. This plugin provides data of issued commands,
called handlers and database traffic.
%endif
%package netlink
Summary: Netlink plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: iproute-static
BuildRequires: libmnl-devel
%description netlink
This plugin uses a netlink socket to query the Linux kernel
about statistics of various interface and routing aspects.
%package nginx
Summary: Nginx plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
%description nginx
This plugin collects data provided by Nginx.
%if 0%{?enable_notify_desktop} > 0
%package notify_desktop
Summary: Notify desktop plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: libnotify-devel
%description notify_desktop
This plugin sends a desktop notification to a notification daemon,
as defined in the Desktop Notification Specification.
%endif
%package notify_email
Summary: Notify email plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: libesmtp-devel
%description notify_email
This plugin uses the ESMTP library to send
notifications to a configured email address.
%package openldap
Summary: OpenLDAP plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: openldap-devel
%description openldap
This plugin for collectd reads monitoring information
from OpenLDAP's cn=Monitor subtree.
%if 0%{?enable_ovs_events} > 0
%package ovs-events
Summary: Open vSwitch events plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: yajl-devel
Provides: %{name}-ovs_events = %{version}-%{release}
%description ovs-events
This plugin monitors the link status of Open vSwitch (OVS) connected
interfaces, dispatches the values to collectd and sends notifications
whenever a link state change occurs in the OVS database.
%endif
%if 0%{?enable_ovs_stats} > 0
%package ovs-stats
Summary: Open vSwitch statsevents plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: yajl-devel
Provides: %{name}-ovs_stats = %{version}-%{release}
%description ovs-stats
The plugin collects the statistics of OVS connected bridges and interfaces.
%endif
%if 0%{?enable_pcie_errors} > 0
%package pcie-errors
Summary: Read errors from PCI Express Device Status
Provides: %{name}-pcie_errors = %{version}-%{release}
BuildRequires: kernel-headers
%description pcie-errors
Read errors from PCI Express Device Status and AER extended capabilities
%endif
%package -n perl-Collectd
Summary: Perl bindings for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: perl-srpm-macros
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description -n perl-Collectd
This package contains the Perl bindings and plugin for collectd.
%if 0%{?enable_pinba} > 0
%package pinba
Summary: Pinba plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: protobuf-c-devel
%description pinba
This plugin receives profiling information from Pinba,
an extension for the PHP interpreter.
%endif
%package ping
Summary: Ping plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: liboping-devel
%description ping
This plugin for collectd provides network latency statistics.
%package postgresql
Summary: PostgreSQL plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: postgresql-devel
%description postgresql
PostgreSQL querying plugin. This plugins provides data of issued commands,
called handlers and database traffic.
%package procevent
Summary: Plugin that monitors process starts/stops via netlink library
Requires: %{name}%{?_isa} = %{version}-%{release}
%description procevent
Plugin that monitors process starts/stops via netlink library
%package python
Summary: Python plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
%if 0%{?rhel} > 7
BuildRequires: python3-devel
%else
BuildRequires: python-devel
%endif
%description python
The Python plugin embeds a Python interpreter into Collectd and exposes the
application programming interface (API) to Python-scripts.
%package rrdcached
Summary: RRDCacheD plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: rrdtool-devel
%description rrdcached
This plugin uses the RRDtool accelerator daemon, rrdcached(1),
to store values to RRD files in an efficient manner.
%package rrdtool
Summary: RRDTool plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: rrdtool-devel
%description rrdtool
This plugin for collectd provides rrdtool support.
%if 0%{?enable_sensors}
%package sensors
Summary: Libsensors module for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: lm_sensors-devel
%description sensors
This plugin for collectd provides querying of sensors supported by
lm_sensors.
%endif
%package smart
Summary: SMART plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: libatasmart-devel
%description smart
This plugin for collectd collects SMART statistics,
notably load cycle count, temperature and bad sectors.
%if 0%{?enable_snmp}
%package snmp
Summary: SNMP module for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: net-snmp-devel
%description snmp
This plugin for collectd provides querying of net-snmp.
%package snmp-agent
Summary: SNMP agent module for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: net-snmp-devel
Provides: %{name}-snmp_agent = %{version}-%{release}
%description snmp-agent
Receives and handles queries from SNMP master agent and returns the data
collected by read plugins. Handles requests only for OIDs specified in
configuration file. To handle SNMP queries the plugin gets data from
collectd and translates requested values from collectd's internal format
to SNMP format.
%endif
%package sysevent
Summary: Plugin that monitors rsyslog for system events
Requires: %{name}%{?_isa} = %{version}-%{release}
%description sysevent
Plugin that monitors rsyslog for system events
%ifarch %ix86 x86_64
%package turbostat
Summary: Turbostat module for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: libcap-devel
%description turbostat
This plugin for collectd reads CPU frequency and C-state residency
on modern Intel turbo-capable processors.
%endif
%ifnarch ppc sparc sparc64
%package virt
Summary: Libvirt plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: libvirt-devel
BuildRequires: libxml2-devel
%description virt
This plugin collects information from virtualized guests.
%endif
%if 0%{?enable_web}
%package web
Summary: Contrib web interface to viewing rrd files
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: collectd-rrdtool = %{version}-%{release}
Requires: perl-HTML-Parser, perl-Regexp-Common, rrdtool-perl, httpd
%description web
This package will allow for a simple web interface to view rrd files created by
collectd.
%endif
%package write_http
Summary: HTTP output plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: curl-devel
Provides: %{name}-write-http = %{version}-%{release}
%description write_http
Write metrics via HTTP POST.
%if 0%{?enable_write_kafka} > 0
%package write_kafka
Summary: Kafka output plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: librdkafka-devel
Provides: %{name}-write-kafka = %{version}-%{release}
%description write_kafka
This sends values to Kafka, a distributed messaging system.
%endif
%if 0%{?enable_prometheus}
%package write_prometheus
Summary: Prometheus output plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: libmicrohttpd-devel
BuildRequires: protobuf-c-devel
Provides: %{name}-write-prometheus = %{version}-%{release}
%description write_prometheus
This plugin exposes collected values using an embedded HTTP
server, turning the collectd daemon into a Prometheus exporter.
%endif
%if 0%{?enable_write_redis}
%package write_redis
Summary: Redis output plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: hiredis-devel
%description write_redis
This plugin can send data to Redis.
%endif
%if 0%{?enable_riemann}
%package write_riemann
Summary: Riemann output plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: riemann-c-client-devel
Provides: %{name}-write-riemann = %{version}-%{release}
%description write_riemann
This plugin can send data to Riemann.
%endif
%if 0%{?enable_write_syslog}
%package write_syslog
Summary: syslog output plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: %{name}-write-syslog = %{version}-%{release}
%description write_syslog
This plugin can send data to syslog.
%endif
%package write_sensu
Summary: Sensu output plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: %{name}-write-sensu = %{version}-%{release}
%description write_sensu
This plugin can send data to Sensu.
%package write_tsdb
Summary: OpenTSDB output plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: %{name}-write-tsdb = %{version}-%{release}
%description write_tsdb
This plugin can send data to OpenTSDB.
%package zookeeper
Summary: Zookeeper plugin for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
%description zookeeper
This is a collectd plugin that reads data from Zookeeper's MNTR command.
%if 0%{?enable_web}
%package collection3
Summary: Web-based viewer for collectd
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: httpd
%description collection3
collection3 is a graphing front-end for the RRD files created by and filled
with collectd. It is written in Perl and should be run as an CGI-script.
Graphs are generated on-the-fly, so no cron job or similar is necessary.
%endif
%prep
%autosetup -v -p1 -S git
# recompile generated files
touch src/pinba.proto
%build
export CFLAGS="$RPM_OPT_FLAGS -fPIE -Wno-deprecated-declarations"
export CPPFLAGS="$RPM_OPT_FLAGS -fPIE -Wno-deprecated-declarations"
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
# rebuild configure and friends
autoheader
aclocal -I m4
libtoolize --copy --force
automake --add-missing --copy
autoconf
%configure \
--disable-dependency-tracking \
--disable-silent-rules \
--disable-barometer \
--enable-all-plugins \
--disable-static \
--disable-apple_sensors \
--disable-aquaero \
--disable-buddyinfo \
--disable-capabilities \
--disable-synproxy \
--disable-write_stackdriver \
--disable-gpu_nvidia \
--disable-ipstats \
--disable-redfish \
--disable-slurm \
--disable-ubi \
--disable-write_influxdb_udp \
--disable-lpar \
--disable-netapp \
--disable-netstat_udp \
--disable-nut \
--disable-oracle \
--disable-pf \
--disable-routeros \
%if 0%{?enable_sensors} == 0