metricspi/package/alertmanager/alertmanager.mk

33 lines
1.2 KiB
Makefile

###############################################################################
#
# Prometheus Alertmanager
#
# This is a very hacky way to install AlertMangager, using the upstream binary
# release packagkes. Building AlertManager requires Node.js/NPM, etc. to
# build the front-end, and I don't care to figure all that out right now.
###############################################################################
ALERTMANAGER_VERSION = 0.24.0
ALERTMANAGER_SOURCE = alertmanager-$(ALERTMANAGER_VERSION).linux-$(KERNEL_ARCH).tar.gz
ALERTMANAGER_SITE = https://github.com/prometheus/alertmanager/releases/download/v$(ALERTMANAGER_VERSION)
ALERTMANAGER_LICENSE = Apache-2.0
ALERTMANAGER_LICENSE_FILES = LICENSE
ALERTMANAGER_INSTALL_TARGET = YES
define ALERTMANAGER_INSTALL_TARGET_CMDS
$(INSTALL) -m u=rwx,go=rx $(@D)/alertmanager $(TARGET_DIR)/usr/sbin
endef
define ALERTMANAGER_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m u=rw,go=r \
$(BR2_EXTERNAL_metricspi_PATH)/package/alertmanager/alertmanager.service \
$(TARGET_DIR)/usr/lib/systemd/system/alertmanager.service
endef
define ALERTMANAGER_USERS
alertmanager -1 alertmanager -1 * - - - Prometheus Alertmanager
endef
$(eval $(generic-package))