The PagerDuty Agent is a program that lets you easily integrate your

monitoring system with PagerDuty.

WWW: https://github.com/PagerDuty/pdagent
This commit is contained in:
Mark Felder 2017-09-14 17:37:53 +00:00
parent 165bdc6d54
commit 840db43d71
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=449844
6 changed files with 117 additions and 0 deletions

View file

@ -294,6 +294,7 @@
SUBDIR += pushgateway
SUBDIR += py-ipcalc
SUBDIR += py-ipy
SUBDIR += py-pdagent
SUBDIR += py-pyang
SUBDIR += py-pysmi
SUBDIR += py-pyzabbix

View file

@ -0,0 +1,39 @@
# Created by: Mark Felder <feld@FreeBSD.org>
# $FreeBSD$
PORTNAME= pdagent
DISTVERSION= v1.4
CATEGORIES= net-mgmt python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= feld@FreeBSD.org
COMMENT= PagerDuty Agent software
LICENSE= BSD3CLAUSE
USES= python:2.7 shebangfix
SHEBANG_FILES= bin/*
NO_ARCH= yes
NO_BUILD= yes
USE_RC_SUBR= pdagentd
USE_GITHUB= YES
GH_ACCOUNT= PagerDuty
SUB_LIST+= PYTHON_CMD="${PYTHON_CMD}"
BINFILES= pd-queue pd-send pdagentd.py
do-patch:
${REINPLACE_CMD} -e 's|/var/lib/pdagent|/var/db/pdagent|' -e 's|/etc|${ETCDIR}|' ${WRKSRC}/pdagent/confdirs.py
do-install:
${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} ${STAGEDIR}/${ETCDIR}
(cd ${WRKSRC} && ${COPYTREE_SHARE} pdagent ${STAGEDIR}${PYTHON_SITELIBDIR})
.for i in ${BINFILES}
${INSTALL_SCRIPT} ${WRKSRC}/bin/${i} ${STAGEDIR}/${PREFIX}/bin/${i}
.endfor
${INSTALL_DATA} ${WRKSRC}/conf/pdagent.conf ${STAGEDIR}/${ETCDIR}/pdagent.conf.sample
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1505398696
SHA256 (PagerDuty-pdagent-v1.4_GH0.tar.gz) = 69f79d9c912db8e2fa9fed7c0f5f0113968739df316b6a79eec9ac94c368046f
SIZE (PagerDuty-pdagent-v1.4_GH0.tar.gz) = 248170

View file

@ -0,0 +1,49 @@
#!/bin/sh
#
# Author: Mark Felder <feld@FreeBSD.org>
#
# $FreeBSD$
#
# PROVIDE: pdagentd
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable pdagentd:
# pdagentd_enable="YES"
. /etc/rc.subr
name="pdagentd"
rcvar=pdagentd_enable
load_rc_config $name
: ${pdagentd_enable="NO"}
: ${pdagentd_user:="nobody"}
: ${pdagentd_group:="nogroup"}
pidfile="/var/run/pdagent/pdagentd.pid"
command="%%PREFIX%%/bin/pdagentd.py"
command_args="${rc_arg}"
start_precmd=pdagentd_precmd
procname=%%PYTHON_CMD%%
pdagent_mkdirs="/var/db/pdagent /var/db/pdagent/outqueue /var/db/pdagent/db /var/db/pdagent/outqueue/pdq \
/var/db/pdagent/outqueue/tmp /var/db/pdagent/outqueue/suc /var/db/pdagent/outqueue/err"
pdagentd_precmd()
{
for i in ${pdagent_mkdirs}; do
install -d -o ${pdagentd_user} -g ${pdagentd_group} -m 775 ${i}
done
if [ ! -d /var/log/pdagent ]; then
install -d -o ${pdagentd_user} /var/log/pdagent
fi
if [ ! -d /var/run/pdagent ]; then
install -d -o ${pdagentd_user} /var/run/pdagent
fi
}
run_rc_command "$1"

View file

@ -0,0 +1,4 @@
The PagerDuty Agent is a program that lets you easily integrate your
monitoring system with PagerDuty.
WWW: https://github.com/PagerDuty/pdagent

View file

@ -0,0 +1,21 @@
bin/pd-queue
bin/pd-send
bin/pdagentd.py
@sample etc/pdagent/pdagent.conf.sample
%%PYTHON_SITELIBDIR%%/pdagent/__init__.py
%%PYTHON_SITELIBDIR%%/pdagent/confdirs.py
%%PYTHON_SITELIBDIR%%/pdagent/config.py
%%PYTHON_SITELIBDIR%%/pdagent/constants.py
%%PYTHON_SITELIBDIR%%/pdagent/heartbeat.py
%%PYTHON_SITELIBDIR%%/pdagent/jsonstore.py
%%PYTHON_SITELIBDIR%%/pdagent/pdagentutil.py
%%PYTHON_SITELIBDIR%%/pdagent/pdqueue.py
%%PYTHON_SITELIBDIR%%/pdagent/pdthread.py
%%PYTHON_SITELIBDIR%%/pdagent/root_certs/ca_certs.pem
%%PYTHON_SITELIBDIR%%/pdagent/sendevent.py
%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/__init__.py
%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/argparse.py
%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/daemon.py
%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/filelock.py
%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/httpswithverify.py
%%PYTHON_SITELIBDIR%%/pdagent/thirdparty/ssl_match_hostname.py