From 62c2da0e7a54e96a12190bcaa79e552b497e634b Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Fri, 5 Nov 2021 18:30:48 +0100 Subject: [PATCH] package/netdata: add prometheus remote write backend support prometheus remote write backend depends on protobuf and snappy and is enabled by default since the addition of the package in commit 1d2bb469078b5818aa2390b9868cd632200f17a2 Signed-off-by: Fabrice Fontaine Signed-off-by: Peter Korsgaard --- package/netdata/Config.in | 19 +++++++++++++++++++ package/netdata/netdata.mk | 10 ++++++++++ 2 files changed, 29 insertions(+) diff --git a/package/netdata/Config.in b/package/netdata/Config.in index 88f88cb7ed..34d139125d 100644 --- a/package/netdata/Config.in +++ b/package/netdata/Config.in @@ -16,6 +16,25 @@ config BR2_PACKAGE_NETDATA https://github.com/netdata/netdata +if BR2_PACKAGE_NETDATA + +config BR2_PACKAGE_NETDATA_PROMETHEUS + bool "prometheus remote write backend" + depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS + depends on BR2_INSTALL_LIBSTDCPP # protobuf, snappy + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf + select BR2_PACKAGE_PROTOBUF + select BR2_PACKAGE_SNAPPY + help + Enable prometheus remote write backend + +comment "prometheus remote write backend needs a toolchain w/ C++, gcc >= 4.8" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS + +endif + comment "netdata needs a toolchain w/ NPTL, dynamic library" depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS depends on BR2_USE_MMU diff --git a/package/netdata/netdata.mk b/package/netdata/netdata.mk index b20d5ea37b..6def59764a 100644 --- a/package/netdata/netdata.mk +++ b/package/netdata/netdata.mk @@ -61,6 +61,16 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) NETDATA_CONF_ENV += LIBS=-latomic endif +ifeq ($(BR2_PACKAGE_NETDATA_PROMETHEUS),y) +# Override the result of AC_PATH_PROG([CXX_BINARY], [${CXX}], [no]) +# which fails because CXX is set to the full CXX binary path +NETDATA_CONF_ENV += ac_cv_path_CXX_BINARY=yes +NETDATA_CONF_OPTS += --enable-backend-prometheus-remote-write +NETDATA_DEPENDENCIES += protobuf snappy +else +NETDATA_CONF_OPTS += --disable-backend-prometheus-remote-write +endif + define NETDATA_INSTALL_INIT_SYSV $(INSTALL) -D -m 755 package/netdata/S60netdata \ $(TARGET_DIR)/etc/init.d/S60netdata