mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
A highly available daemon to send notifications and reminders based on
Consul health checks. Including profile selection based on service, check, or host that enables specific handlers and reminder intervals. consul-alerts makes use of consul services to provide leader election and automatic failover amongst multiple instances. URL: https://github.com/AcalephStorage/consul-alerts PR: 211253 Submitted by: John Hixson <john@pcbsd.org>
This commit is contained in:
parent
0fcb865d79
commit
9b4aebe868
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=418850
@ -169,6 +169,7 @@
|
||||
SUBDIR += consolehm
|
||||
SUBDIR += consolekit
|
||||
SUBDIR += consul
|
||||
SUBDIR += consul-alerts
|
||||
SUBDIR += contractor
|
||||
SUBDIR += copytape
|
||||
SUBDIR += coreutils
|
||||
|
52
sysutils/consul-alerts/Makefile
Normal file
52
sysutils/consul-alerts/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= consul-alerts
|
||||
PORTVERSION= 0.3.3
|
||||
DISTVERSIONPREFIX= v
|
||||
CATEGORIES= sysutils
|
||||
|
||||
MAINTAINER= john@pcbsd.org
|
||||
COMMENT= Simple daemon to send notifications based on Consul health checks
|
||||
|
||||
LICENSE= GPLv2+
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/bin/go:lang/go
|
||||
|
||||
USES= compiler
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= AcalephStorage
|
||||
GH_TAGNAME= v0.3.3
|
||||
|
||||
PLIST_FILES= ${PREFIX}/bin/consul-alerts
|
||||
|
||||
USE_RC_SUBR= consul-alerts
|
||||
|
||||
STRIP=
|
||||
|
||||
post-patch:
|
||||
@${MKDIR} ${WRKSRC}/src/github.com/AcalephStorage/consul-alerts
|
||||
.for src in .buildkite .buildkite-release .gitignore .travis.yml \
|
||||
check-handler.go consul consul-alerts.go Dockerfile \
|
||||
event-handler.go Godeps health-handler.go leader-election.go \
|
||||
LICENSE Makefile notifier provision README.md send-notifs.go \
|
||||
Vagrantfile watchers.go
|
||||
@${MV} ${WRKSRC}/${src} \
|
||||
${WRKSRC}/src/github.com/AcalephStorage/consul-alerts
|
||||
.endfor
|
||||
|
||||
do-build:
|
||||
@cd ${WRKSRC}/src/github.com/AcalephStorage/consul-alerts; \
|
||||
${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -v -x \
|
||||
-ldflags "-X main.GitDescribe=v${PORTVERSION}" -o bin/consul-alerts
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/AcalephStorage/consul-alerts/bin/consul-alerts ${STAGEDIR}${PREFIX}/bin/consul-alerts
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${COMPILER_TYPE} == clang
|
||||
BUILD_ENV= CC=clang
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
3
sysutils/consul-alerts/distinfo
Normal file
3
sysutils/consul-alerts/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1468785601
|
||||
SHA256 (AcalephStorage-consul-alerts-v0.3.3_GH0.tar.gz) = a71acd454fadd193900d484e76437f68b96d91d6331c7ddee40dc3a6f8e52706
|
||||
SIZE (AcalephStorage-consul-alerts-v0.3.3_GH0.tar.gz) = 206900
|
32
sysutils/consul-alerts/files/consul-alerts.in
Normal file
32
sysutils/consul-alerts/files/consul-alerts.in
Normal file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: consul-alerts
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
||||
# to enable this service:
|
||||
#
|
||||
# consul_alerts_enable (bool): Set to NO by default.
|
||||
# Set it to YES to enable consul-alerts
|
||||
# consul_alerts_env (string): Set environment variables used with consul-alerts
|
||||
# Default is "".
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=consul_alerts
|
||||
rcvar=consul_alerts_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${consul_alerts_enable:="NO"}
|
||||
: ${consul_alerts_env:=""}
|
||||
|
||||
pidfile=/var/run/consul-alerts.pid
|
||||
procname="%%PREFIX%%/bin/consul-alerts"
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-f -p ${pidfile} /usr/bin/env ${consul_alerts_env} ${procname} start ${consul_alerts_args}"
|
||||
|
||||
run_rc_command "$1"
|
7
sysutils/consul-alerts/pkg-descr
Normal file
7
sysutils/consul-alerts/pkg-descr
Normal file
@ -0,0 +1,7 @@
|
||||
A highly available daemon to send notifications and reminders based on
|
||||
Consul health checks. Including profile selection based on service,
|
||||
check, or host that enables specific handlers and reminder intervals.
|
||||
consul-alerts makes use of consul services to provide leader election
|
||||
and automatic failover amongst multiple instances.
|
||||
|
||||
URL: https://github.com/AcalephStorage/consul-alerts
|
Loading…
Reference in New Issue
Block a user