diff --git a/Config.in b/Config.in index 54bc297..3593ec2 100644 --- a/Config.in +++ b/Config.in @@ -1,4 +1,3 @@ source "$BR2_EXTERNAL_metricspi_PATH/package/alertmanager/Config.in" source "$BR2_EXTERNAL_metricspi_PATH/package/grafana/Config.in" source "$BR2_EXTERNAL_metricspi_PATH/package/victoriametrics/Config.in" -source "$BR2_EXTERNAL_metricspi_PATH/package/vmutils/Config.in" diff --git a/configs/metricspi_defconfig b/configs/metricspi_defconfig index 037af6e..2b30723 100644 --- a/configs/metricspi_defconfig +++ b/configs/metricspi_defconfig @@ -109,6 +109,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y BR2_PACKAGE_ALERTMANAGER=y BR2_PACKAGE_GRAFANA=y BR2_PACKAGE_VICTORIAMETRICS=y -BR2_PACKAGE_VMUTILS=y -BR2_PACKAGE_VMUTILS_VMAGENT=y -BR2_PACKAGE_VMUTILS_VMALERT=y +BR2_PACKAGE_VICTORIAMETRICS_SINGLE=y +BR2_PACKAGE_VICTORIAMETRICS_VMUTILS=y +BR2_PACKAGE_VICTORIAMETRICS_VMAGENT=y +BR2_PACKAGE_VICTORIAMETRICS_VMALERT=y diff --git a/package/victoriametrics/Config.in b/package/victoriametrics/Config.in index 39b4b48..23436ac 100644 --- a/package/victoriametrics/Config.in +++ b/package/victoriametrics/Config.in @@ -1,4 +1,71 @@ -config BR2_PACKAGE_VICTORIAMETRICS - bool "victoriametrics" +menuconfig BR2_PACKAGE_VICTORIAMETRICS + bool "VictoriaMetrics" help Victoria Metrics + +if BR2_PACKAGE_VICTORIAMETRICS + +config BR2_PACKAGE_VICTORIAMETRICS_SINGLE + bool "VictoriaMetrics" + help + Single node version of Victoria Metrics + +config BR2_PACKAGE_VICTORIAMETRICS_VMUTILS + bool "vmutils" + help + Victoria Metrics utilities + +if BR2_PACKAGE_VICTORIAMETRICS_VMUTILS + +config BR2_PACKAGE_VICTORIAMETRICS_VMAGENT + bool "vmagent" + help + vmagent is a tiny but mighty agent which helps you collect metrics + from various sources and store them in VictoriaMetrics or any other + Prometheus-compatible storage systems that support the remote_write + protocol. + +config BR2_PACKAGE_VICTORIAMETRICS_VMALERT + bool "vmalert" + help + vmalert executes a list of the given alerting or recording rules + against configured -datasource.url. For sending alerting + notifications vmalert relies on Alertmanager configured via + -notifier.url flag. Recording rules results are persisted via remote + write protocol and require -remoteWrite.url to be configured. Vmalert + is heavily inspired by Prometheus implementation and aims to be + compatible with its syntax. + +config BR2_PACKAGE_VICTORIAMETRICS_VMAUTH + bool "vmauth" + help + vmauth is a simple auth proxy, router and load balancer for + VictoriaMetrics. It reads auth credentials from Authorization http + header (Basic Auth, Bearer token and InfluxDB authorization is + supported), matches them against configs pointed by -auth.config + command-line flag and proxies incoming HTTP requests to the + configured per-user url_prefix on successful match. The -auth.config + can point to either local file or to http url. + +config BR2_PACKAGE_VICTORIAMETRICS_VMBACKUP + bool "vmbackup" + help + vmbackup creates VictoriaMetrics data backups from instant snapshots. + +config BR2_PACKAGE_VICTORIAMETRICS_VMRESTORE + bool "vmrestore" + help + vmrestore restores data from backups created by vmbackup. + VictoriaMetrics v1.29.0 and newer versions must be used for working + with the restored data. + +config BR2_PACKAGE_VICTORIAMETRICS_VMCTL + bool "vmctl" + help + VictoriaMetrics command-line tool + + vmctl provides various useful actions with VictoriaMetrics components. + +endif + +endif diff --git a/package/victoriametrics/victoriametrics.hash b/package/victoriametrics/victoriametrics.hash new file mode 100644 index 0000000..15fd7c1 --- /dev/null +++ b/package/victoriametrics/victoriametrics.hash @@ -0,0 +1 @@ +sha256 256e1081e6dc9831af8a586cb33e46c3c7b9b9987ec6c1a0b5182b235520b285 victoriametrics-1.78.0.tar.gz diff --git a/package/victoriametrics/victoriametrics.mk b/package/victoriametrics/victoriametrics.mk index 8b0b120..cd45e2e 100644 --- a/package/victoriametrics/victoriametrics.mk +++ b/package/victoriametrics/victoriametrics.mk @@ -3,15 +3,67 @@ VICTORIAMETRICS_SITE = $(call github,VictoriaMetrics,VictoriaMetrics,v$(VICTORIA VICTORIAMETRICS_LICENSE = Apache-2.0 VICTORIAMETRICS_LICENSE_FILES = LICENSE -VICTORIAMETRICS_BUILD_TARGETS = app/victoria-metrics VICTORIAMETRICS_LDFLAGS = -extldflags '-static' VICTORIAMETRICS_TAGS = netgo osusergo nethttpomithttp2 musl -VICTORIAMETRICS_INSTALL_BINS = victoria-metrics +VICTORIAMETRICS_INSTALL_BINS = -define VICTORIAMETRICS_INSTALL_INIT_SYSTEMD +ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_SINGLE),y) +VICTORIAMETRICS_BUILD_TARGETS = app/victoria-metrics +VICTORIAMETRICS_INSTALL_BINS += victoria-metrics +endif + +ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMAGENT),y) +VICTORIAMETRICS_BUILD_TARGETS += app/vmagent +VICTORIAMETRICS_INSTALL_BINS += vmagent +endif + +ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMALERT),y) +VICTORIAMETRICS_BUILD_TARGETS += app/vmalert +VICTORIAMETRICS_INSTALL_BINS += vmalert +endif + +ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMAUTH),y) +VICTORIAMETRICS_BUILD_TARGETS += app/vmauth +VICTORIAMETRICS_INSTALL_BINS += vmauth +endif + +ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMBACKUP),y) +VICTORIAMETRICS_BUILD_TARGETS += app/vmbackup +VICTORIAMETRICS_INSTALL_BINS += vmbackup +endif + +ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMRESTORE),y) +VICTORIAMETRICS_BUILD_TARGETS += app/vmrestore +VICTORIAMETRICS_INSTALL_BINS += vmrestore +endif + +ifeq ($(BR2_PACKAGE_VICTORIAMETRICS_VMCTL),y) +VICTORIAMETRICS_BUILD_TARGETS += app/vmctl +VICTORIAMETRICS_INSTALL_BINS += vmctl +endif + +define VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_SINGLE $(INSTALL) -D -m u=rw,go=r \ $(BR2_EXTERNAL_metricspi_PATH)/package/victoriametrics/victoria-metrics.service \ $(TARGET_DIR)/usr/lib/systemd/system/victoria-metrics.service endef +define VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_VMAGENT + $(INSTALL) -D -m u=rw,go=r \ + $(BR2_EXTERNAL_metricspi_PATH)/package/victoriametrics/vmagent.service \ + $(TARGET_DIR)/usr/lib/systemd/system/vmagent.service +endef + +define VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_VMALERT + $(INSTALL) -D -m u=rw,go=r \ + $(BR2_EXTERNAL_metricspi_PATH)/package/victoriametrics/vmalert.service \ + $(TARGET_DIR)/usr/lib/systemd/system/vmalert.service +endef + +define VICTORIAMETRICS_INSTALL_INIT_SYSTEMD + $(if $(BR2_PACKAGE_VICTORIAMETRICS_SINGLE),$(VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_SINGLE)) + $(if $(BR2_PACKAGE_VICTORIAMETRICS_VMAGENT),$(VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_VMAGENT)) + $(if $(BR2_PACKAGE_VICTORIAMETRICS_VMALERT),$(VICTORIAMETRICS_INSTALL_INIT_SYSTEMD_VMALERT)) +endef + $(eval $(golang-package)) diff --git a/package/vmutils/vmagent.service b/package/victoriametrics/vmagent.service similarity index 100% rename from package/vmutils/vmagent.service rename to package/victoriametrics/vmagent.service diff --git a/package/vmutils/vmalert.service b/package/victoriametrics/vmalert.service similarity index 100% rename from package/vmutils/vmalert.service rename to package/victoriametrics/vmalert.service diff --git a/package/vmutils/Config.in b/package/vmutils/Config.in deleted file mode 100644 index ced80a7..0000000 --- a/package/vmutils/Config.in +++ /dev/null @@ -1,57 +0,0 @@ -menuconfig BR2_PACKAGE_VMUTILS - bool "vmutils" - help - Victoria Metrics utilities - -if BR2_PACKAGE_VMUTILS - -config BR2_PACKAGE_VMUTILS_VMAGENT - bool "vmagent" - help - vmagent is a tiny but mighty agent which helps you collect metrics - from various sources and store them in VictoriaMetrics or any other - Prometheus-compatible storage systems that support the remote_write - protocol. - -config BR2_PACKAGE_VMUTILS_VMALERT - bool "vmalert" - help - vmalert executes a list of the given alerting or recording rules - against configured -datasource.url. For sending alerting - notifications vmalert relies on Alertmanager configured via - -notifier.url flag. Recording rules results are persisted via remote - write protocol and require -remoteWrite.url to be configured. Vmalert - is heavily inspired by Prometheus implementation and aims to be - compatible with its syntax. - -config BR2_PACKAGE_VMUTILS_VMAUTH - bool "vmauth" - help - vmauth is a simple auth proxy, router and load balancer for - VictoriaMetrics. It reads auth credentials from Authorization http - header (Basic Auth, Bearer token and InfluxDB authorization is - supported), matches them against configs pointed by -auth.config - command-line flag and proxies incoming HTTP requests to the - configured per-user url_prefix on successful match. The -auth.config - can point to either local file or to http url. - -config BR2_PACKAGE_VMUTILS_VMBACKUP - bool "vmbackup" - help - vmbackup creates VictoriaMetrics data backups from instant snapshots. - -config BR2_PACKAGE_VMUTILS_VMRESTORE - bool "vmrestore" - help - vmrestore restores data from backups created by vmbackup. - VictoriaMetrics v1.29.0 and newer versions must be used for working - with the restored data. - -config BR2_PACKAGE_VMUTILS_VMCTL - bool "vmctl" - help - VictoriaMetrics command-line tool - - vmctl provides various useful actions with VictoriaMetrics components. - -endif diff --git a/package/vmutils/vmutils.mk b/package/vmutils/vmutils.mk deleted file mode 100644 index 89edaf5..0000000 --- a/package/vmutils/vmutils.mk +++ /dev/null @@ -1,56 +0,0 @@ -VMUTILS_VERSION = 1.78.0 -VMUTILS_SITE = $(call github,VictoriaMetrics,VictoriaMetrics,v$(VMUTILS_VERSION)) -VMUTILS_LICENSE = Apache-2.0 -VMUTILS_LICENSE_FILES = LICENSE - -VMUTILS_LDFLAGS = -extldflags '-static' -VMUTILS_TAGS = netgo osusergo nethttpomithttp2 musl - -ifeq ($(BR2_PACKAGE_VMUTILS_VMAGENT),y) -VMUTILS_BUILD_TARGETS += app/vmagent -VMUTILS_INSTALL_BINS += vmagent -endif - -ifeq ($(BR2_PACKAGE_VMUTILS_VMALERT),y) -VMUTILS_BUILD_TARGETS += app/vmalert -VMUTILS_INSTALL_BINS += vmalert -endif - -ifeq ($(BR2_PACKAGE_VMUTILS_VMAUTH),y) -VMUTILS_BUILD_TARGETS += app/vmauth -VMUTILS_INSTALL_BINS += vmauth -endif - -ifeq ($(BR2_PACKAGE_VMUTILS_VMBACKUP),y) -VMUTILS_BUILD_TARGETS += app/vmbackup -VMUTILS_INSTALL_BINS += vmbackup -endif - -ifeq ($(BR2_PACKAGE_VMUTILS_VMRESTORE),y) -VMUTILS_BUILD_TARGETS += app/vmrestore -VMUTILS_INSTALL_BINS += vmrestore -endif - -ifeq ($(BR2_PACKAGE_VMUTILS_VMCTL),y) -VMUTILS_BUILD_TARGETS += app/vmctl -VMUTILS_INSTALL_BINS += vmctl -endif - -define VMUTILS_VMAGENT_INSTALL_INIT_SYSTEMD - $(INSTALL) -D -m u=rw,go=r \ - $(BR2_EXTERNAL_metricspi_PATH)/package/vmutils/vmagent.service \ - $(TARGET_DIR)/usr/lib/systemd/system/vmagent.service -endef - -define VMUTILS_VMALERT_INSTALL_INIT_SYSTEMD - $(INSTALL) -D -m u=rw,go=r \ - $(BR2_EXTERNAL_metricspi_PATH)/package/vmutils/vmalert.service \ - $(TARGET_DIR)/usr/lib/systemd/system/vmalert.service -endef - -define VMUTILS_INSTALL_INIT_SYSTEMD - $(if $(BR2_PACKAGE_VMUTILS_VMAGENT),$(VMUTILS_VMAGENT_INSTALL_INIT_SYSTEMD)) - $(if $(BR2_PACKAGE_VMUTILS_VMALERT),$(VMUTILS_VMALERT_INSTALL_INIT_SYSTEMD)) -endef - -$(eval $(golang-package))