collectd: add write_prometheus plugin support

Add explicit support for the write_prometheus plugin, it requires the
libmicrohttpd and protobuf-c libraries.

[Peter: add note about where dependencies come from]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Gustavo Zacarias 2016-12-21 22:59:21 -03:00 committed by Peter Korsgaard
parent b0631a3858
commit 2db9867da9
2 changed files with 17 additions and 1 deletions

View File

@ -572,6 +572,20 @@ config BR2_PACKAGE_COLLECTD_WRITELOG
help
Writes data to the log.
config BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS
bool "write_prometheus"
depends on BR2_INSTALL_LIBSTDCPP # protobuf-c
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf-c
select BR2_PACKAGE_LIBMICROHTTPD
select BR2_PACKAGE_PROTOBUF_C
help
Publishes values using an embedded HTTP server, in a format
compatible with Prometheus' collectd_exporter.
comment "write_prometheus needs a toolchain w/ C++"
depends on !BR2_INSTALL_LIBSTDCPP
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
config BR2_PACKAGE_COLLECTD_WRITESENSU
bool "write_sensu"
help

View File

@ -119,6 +119,7 @@ COLLECTD_CONF_OPTS += \
$(if $(BR2_PACKAGE_COLLECTD_WIRELESS),--enable-wireless,--disable-wireless) \
$(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),--enable-write_http,--disable-write_http) \
$(if $(BR2_PACKAGE_COLLECTD_WRITELOG),--enable-write_log,--disable-write_log) \
$(if $(BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS),--enable-write_prometheus,--disable-write_prometheus) \
$(if $(BR2_PACKAGE_COLLECTD_WRITESENSU),--enable-write_sensu,--disable-write_sensu) \
$(if $(BR2_PACKAGE_COLLECTD_WRITETSDB),--enable-write_tsdb,--disable-write_tsdb) \
$(if $(BR2_PACKAGE_COLLECTD_ZOOKEEPER),--enable-zookeeper,--disable-zookeeper)
@ -150,7 +151,8 @@ COLLECTD_DEPENDENCIES = \
$(if $(BR2_PACKAGE_COLLECTD_SENSORS),lm-sensors) \
$(if $(BR2_PACKAGE_COLLECTD_SMART),libatasmart) \
$(if $(BR2_PACKAGE_COLLECTD_SNMP),netsnmp) \
$(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),libcurl)
$(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),libcurl) \
$(if $(BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS),libmicrohttpd protobuf-c)
# include/library fixups
ifeq ($(BR2_PACKAGE_LIBCURL),y)