From 737f89c19e7e786aaeae1663a47e6fbddf394dcf Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Wed, 23 Nov 2016 07:00:12 +0100 Subject: [PATCH] collectd.spec: enable write_prometheus --- contrib/redhat/collectd.spec | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/contrib/redhat/collectd.spec b/contrib/redhat/collectd.spec index eaf6f31a..74c02ea7 100644 --- a/contrib/redhat/collectd.spec +++ b/contrib/redhat/collectd.spec @@ -148,6 +148,7 @@ %define with_write_graphite 0%{!?_without_write_graphite:1} %define with_write_http 0%{!?_without_write_http:1} %define with_write_log 0%{!?_without_write_log:1} +%define with_write_prometheus 0%{!?_without_write_prometheus:1} %define with_write_redis 0%{!?_without_write_redis:1} %define with_write_sensu 0%{!?_without_write_sensu:1} %define with_write_tsdb 0%{!?_without_write_tsdb:1} @@ -217,6 +218,7 @@ %define with_redis 0 %define with_smart 0 %define with_turbostat 0 +%define with_write_prometheus 0 %define with_write_redis 0 %endif @@ -828,6 +830,17 @@ BuildRequires: librdkafka-devel The write_kafka plugin sends values to kafka, a distributed messaging system. %endif +%if %{with_write_prometheus} +%package write_prometheus +Summary: Write-prometheus plugin for collectd +Group: System Environment/Daemons +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: libmicrohttpd-devel +%description write_prometheus +The Write Prometheus plugin exposes collected values using an embedded HTTP +server, turning the collectd daemon into a Prometheus exporter. +%endif + %if %{with_write_redis} %package write_redis Summary: Write-Redis plugin for collectd @@ -1689,6 +1702,12 @@ Collectd utilities %define _with_write_mongodb --disable-write_mongodb %endif +%if %{with_write_prometheus} +%define _with_write_prometheus --enable-write_prometheus +%else +%define _with_write_prometheus --disable-write_prometheus +%endif + %if %{with_write_redis} %define _with_write_redis --enable-write_redis %else @@ -1886,6 +1905,7 @@ Collectd utilities %{?_with_write_kafka} \ %{?_with_write_log} \ %{?_with_write_mongodb} \ + %{?_with_write_prometheus} \ %{?_with_write_redis} \ %{?_with_write_riemann} \ %{?_with_write_sensu} \ @@ -2528,6 +2548,11 @@ fi %{_libdir}/%{name}/write_kafka.so %endif +%if %{with_write_prometheus} +%files write_prometheus +%{_libdir}/%{name}/write_prometheus.so +%endif + %if %{with_write_redis} %files write_redis %{_libdir}/%{name}/write_redis.so @@ -2562,7 +2587,7 @@ fi %changelog * Mon Oct 10 2016 Marc Fournier - 5.7.0-1 - New PRE-RELEASE version -- New plugins enabled by default: hugepages +- New plugins enabled by default: hugepages, write_prometheus - New plugins disabled by default: dpdkstat, intel_rdt * Mon Oct 10 2016 Victor Demonchy - 5.6.1-1 -- 2.11.0