diff --git a/cross/activebackup-prometheus-exporter/Makefile b/cross/activebackup-prometheus-exporter/Makefile new file mode 100644 index 00000000000..0b880e78f5d --- /dev/null +++ b/cross/activebackup-prometheus-exporter/Makefile @@ -0,0 +1,25 @@ +PKG_NAME = activebackup-prometheus-exporter +PKG_VERS = 1.0.2 +PKG_EXT = tar.gz +PKG_DIST_NAME = "v$(PKG_VERS).$(PKG_EXT)" +PKG_DIST_SITE = "https://github.com/codemonauts/$(PKG_NAME)/archive" +PKG_DIST_FILE = "$(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)" +PKG_DIR = $(PKG_NAME)-$(PKG_VERS) + + +DEPENDS = native/go + +HOMEPAGE = https://github.com/codemonauts/activebackup-prometheus-exporter +COMMENT = Prometheus exporter for the ActiveBackup program suite +LICENSE = MIT + +COMPILE_TARGET = activebackup_exporter_compile + +CGO_ENABLED = 1 +GO_BIN_DIR = $(WORK_DIR)/$(PKG_DIR)/$(PKG_NAME) + +include ../../mk/spksrc.cross-go.mk + + +activebackup_exporter_compile: + $(RUN) make build diff --git a/cross/activebackup-prometheus-exporter/PLIST b/cross/activebackup-prometheus-exporter/PLIST new file mode 100644 index 00000000000..30fa69dec2d --- /dev/null +++ b/cross/activebackup-prometheus-exporter/PLIST @@ -0,0 +1 @@ +bin:bin/activebackup-prometheus-exporter diff --git a/cross/activebackup-prometheus-exporter/digests b/cross/activebackup-prometheus-exporter/digests new file mode 100644 index 00000000000..c7106acac67 --- /dev/null +++ b/cross/activebackup-prometheus-exporter/digests @@ -0,0 +1,3 @@ +activebackup-prometheus-exporter-1.0.2.tar.gz SHA1 c463274f0b3e4ab62a19b23dfd0d0da03b4c90ec +activebackup-prometheus-exporter-1.0.2.tar.gz SHA256 ffc9d5b49fd8a75cee13cc3a60f1154706a81134048e31aa1ec11d7759789f7e +activebackup-prometheus-exporter-1.0.2.tar.gz MD5 c0022349c2d64907fd61f6ad41b01fd1 diff --git a/spk/activebackup-prometheus-exporter/Makefile b/spk/activebackup-prometheus-exporter/Makefile new file mode 100644 index 00000000000..55706a9f94b --- /dev/null +++ b/spk/activebackup-prometheus-exporter/Makefile @@ -0,0 +1,21 @@ +SPK_NAME = activebackup-prometheus-exporter +SPK_VERS = 1.0.3 +SPK_REV = 3 +SPK_ICON = + +DEPENDS = cross/$(SPK_NAME) + +MAINTAINER = fleaz +DESCRIPTION = Prometheus exporter for backup jobs from the ActiveBackup tool suite +STARTABLE = yes +DISPLAY_NAME = ActiveBackup Prometheus Exporter +CHANGELOG = "" + +HOMEPAGE = https://github.com/codemonauts/activebackup-prometheus-exporter +LICENSE = MIT + +SERVICE_SETUP = src/service-setup.sh +SERVICE_PORT=9763 +SERVICE_PORT_URL="/metrics" + +include ../../mk/spksrc.spk.mk diff --git a/spk/activebackup-prometheus-exporter/PLIST b/spk/activebackup-prometheus-exporter/PLIST new file mode 100644 index 00000000000..e69de29bb2d diff --git a/spk/activebackup-prometheus-exporter/src/service-setup.sh b/spk/activebackup-prometheus-exporter/src/service-setup.sh new file mode 100644 index 00000000000..fe8a6e59a95 --- /dev/null +++ b/spk/activebackup-prometheus-exporter/src/service-setup.sh @@ -0,0 +1,4 @@ +AB_EXPORTER="${SYNOPKG_PKGDEST}/bin/activebackup-prometheus-exporter" +SERVICE_COMMAND="${AB_EXPORTER} -port ${SERVICE_PORT}" +SVC_BACKGROUND=y +SVC_WRITE_PID=y