Date: Mon, 17 Jul 2017 21:12:41 +0000 (UTC) From: Boris Samorodov <bsam@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r446116 - in head/net-mgmt: . alertmanager alertmanager/files Message-ID: <201707172112.v6HLCgrP058860@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bsam Date: Mon Jul 17 21:12:41 2017 New Revision: 446116 URL: https://svnweb.freebsd.org/changeset/ports/446116 Log: The Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integrations such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts. WWW: https://prometheus.io/docs/alerting/alertmanager/ PR: 216119 Submitted by: Michal Hanula <michal@hanu.la> Added: head/net-mgmt/alertmanager/ head/net-mgmt/alertmanager/Makefile (contents, props changed) head/net-mgmt/alertmanager/distinfo (contents, props changed) head/net-mgmt/alertmanager/files/ head/net-mgmt/alertmanager/files/alertmanager.in (contents, props changed) head/net-mgmt/alertmanager/pkg-descr (contents, props changed) Modified: head/net-mgmt/Makefile Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Mon Jul 17 21:11:55 2017 (r446115) +++ head/net-mgmt/Makefile Mon Jul 17 21:12:41 2017 (r446116) @@ -8,6 +8,7 @@ SUBDIR += adcli SUBDIR += aggregate SUBDIR += aircrack-ng + SUBDIR += alertmanager SUBDIR += ap-utils SUBDIR += argus3 SUBDIR += argus3-clients Added: head/net-mgmt/alertmanager/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/alertmanager/Makefile Mon Jul 17 21:12:41 2017 (r446116) @@ -0,0 +1,38 @@ +# Created by: Michal Hanula <michal@hanu.la> +# $FreeBSD$ + +PORTNAME= alertmanager +PORTVERSION= 0.5.1 +DISTVERSIONPREFIX= v +CATEGORIES= net-mgmt + +MAINTAINER= michal@hanu.la +COMMENT= Alert routing for prometheus + +LICENSE= APACHE20 + +USES= go gmake +USE_GITHUB= yes +GH_ACCOUNT= prometheus + +GO_PKGNAME= github.com/prometheus/${PORTNAME} + +USE_RC_SUBR= alertmanager + +USERS= alertmanager +GROUPS= alertmanager + +PLIST_FILES= bin/alertmanager \ + etc/alertmanager/alertmanager.yml.sample + +STRIP= # stripping can break go binaries + +do-build: + (cd ${GO_WRKSRC}/cmd/alertmanager ; ${SETENV} ${GO_ENV} go install) + +do-install: + ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/alertmanager ${STAGEDIR}${PREFIX}/bin + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/alertmanager + ${INSTALL_DATA} ${WRKSRC}/doc/examples/simple.yml ${STAGEDIR}${PREFIX}/etc/alertmanager/alertmanager.yml.sample + +.include <bsd.port.mk> Added: head/net-mgmt/alertmanager/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/alertmanager/distinfo Mon Jul 17 21:12:41 2017 (r446116) @@ -0,0 +1,3 @@ +TIMESTAMP = 1484488566 +SHA256 (prometheus-alertmanager-v0.5.1_GH0.tar.gz) = 98a5f698896001313f2f9ad691fa75f0ae3b7220a97bbe560032b543e532d4a7 +SIZE (prometheus-alertmanager-v0.5.1_GH0.tar.gz) = 1191666 Added: head/net-mgmt/alertmanager/files/alertmanager.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/alertmanager/files/alertmanager.in Mon Jul 17 21:12:41 2017 (r446116) @@ -0,0 +1,67 @@ +#!/bin/sh + +# PROVIDE: alertmanager +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# alertmanager_enable (bool): Set to NO by default +# Set it to YES to enable alertmanager +# alertmanager_user (string): Set user to run alertmanager +# Default is "alertmanager" +# alertmanager_group (string): Set group to run alertmanager +# Default is "alertmanager" +# alertmanager_config (string): The configuration file +# Default is "%%PREFIX%%/etc/alertmanager/alertmanager.yml" +# alertmanager_data_dir (string): The configuration file +# Default is "/var/db/alertmanager" +# alertmanager_log_file (string): Set file that alertmanager will log to +# Default is "/var/log/alertmanager.log" +# alertmanager_args (string): Set additional command line arguments +# Default is "" + +. /etc/rc.subr + +name=alertmanager +rcvar=alertmanager_enable + +load_rc_config $name + +: ${alertmanager_enable:="NO"} +: ${alertmanager_user:="alertmanager"} +: ${alertmanager_group:="alertmanager"} +: ${alertmanager_config:="%%PREFIX%%/etc/alertmanager/alertmanager.yml"} +: ${alertmanager_data_dir:="/var/db/alertmanager"} +: ${alertmanager_log_file:="/var/log/alertmanager.log"} +: ${alertmanager_args:=""} + +pidfile=/var/run/alertmanager.pid +required_files="${alertmanager_config}" +command="/usr/sbin/daemon" +procname="%%PREFIX%%/bin/alertmanager" +sig_reload=HUP +extra_commands="reload" +command_args="-p ${pidfile} /usr/bin/env ${procname} \ + -config.file=${alertmanager_config} \ + -storage.path=${alertmanager_data_dir} \ + ${alertmanager_args} > ${alertmanager_log_file} 2>&1" + +start_precmd=alertmanager_startprecmd + +alertmanager_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${alertmanager_user} -g ${alertmanager_group} /dev/null ${pidfile}; + fi + if [ ! -f "${alertmanager_log_file}" ]; then + install -o ${alertmanager_user} -g ${alertmanager_group} -m 640 /dev/null ${alertmanager_log_file}; + fi + if [ ! -d ${alertmanager_data_dir} ]; then + install -d -o ${alertmanager_user} -g ${alertmanager_group} -m 750 ${alertmanager_data_dir} + fi +} + +load_rc_config $name +run_rc_command "$1" Added: head/net-mgmt/alertmanager/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/alertmanager/pkg-descr Mon Jul 17 21:12:41 2017 (r446116) @@ -0,0 +1,7 @@ +The Alertmanager handles alerts sent by client applications such +as the Prometheus server. It takes care of deduplicating, grouping, +and routing them to the correct receiver integrations such as email, +PagerDuty, or OpsGenie. It also takes care of silencing and inhibition +of alerts. + +WWW: https://prometheus.io/docs/alerting/alertmanager/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707172112.v6HLCgrP058860>