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
1d2bb46907

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Fabrice Fontaine 2021-11-05 18:30:48 +01:00 committed by Peter Korsgaard
parent 69255af229
commit 62c2da0e7a
2 changed files with 29 additions and 0 deletions

View File

@ -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

View File

@ -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