mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
databases/py-powa-collector: New port
PoWA (PostgreSQL Workload Analyzer) is a performance tool for PostgreSQL 9.4 and newer allowing to collect, aggregate and purge statistics on multiple PostgreSQL instances from various Stats Extensions. PoWA-collector is the daemon that gather performance metrics from remote PostgreSQL instances (optional) on a dedicated repository server.
This commit is contained in:
parent
4e1134e14d
commit
4f4643368e
@ -806,6 +806,7 @@
|
||||
SUBDIR += py-pickleshare
|
||||
SUBDIR += py-pony
|
||||
SUBDIR += py-postgresql
|
||||
SUBDIR += py-powa-collector
|
||||
SUBDIR += py-psycogreen
|
||||
SUBDIR += py-psycopg
|
||||
SUBDIR += py-psycopg-c
|
||||
|
31
databases/py-powa-collector/Makefile
Normal file
31
databases/py-powa-collector/Makefile
Normal file
@ -0,0 +1,31 @@
|
||||
PORTNAME= powa-collector
|
||||
DISTVERSION= 1.3.0
|
||||
CATEGORIES= databases python
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= girgen@FreeBSD.org
|
||||
COMMENT= Performs powa snapshots for remote servers
|
||||
WWW= https://powa.readthedocs.io/en/stable/components/powa-collector/
|
||||
|
||||
LICENSE= PostgreSQL
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/psycopg2/__init__.py:databases/py-psycopg2@${PY_FLAVOR}
|
||||
|
||||
USES= python
|
||||
USE_PYTHON= distutils autoplist
|
||||
NO_ARCH= yes
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= powa-team
|
||||
|
||||
PLIST_FILES= "@sample etc/powa-collector.conf.sample"
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/powa_collector/options.py
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/powa-collector.conf-dist ${STAGEDIR}${PREFIX}/etc/powa-collector.conf.sample
|
||||
|
||||
.include <bsd.port.mk>
|
3
databases/py-powa-collector/distinfo
Normal file
3
databases/py-powa-collector/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1730822338
|
||||
SHA256 (powa-team-powa-collector-1.3.0_GH0.tar.gz) = 793464ad0fae41edd8b40f81376e7d050ffcdd8a4a76453bf94319cfecca595d
|
||||
SIZE (powa-team-powa-collector-1.3.0_GH0.tar.gz) = 22279
|
@ -0,0 +1,11 @@
|
||||
--- powa_collector/options.py.orig 2024-11-03 01:42:37 UTC
|
||||
+++ powa_collector/options.py
|
||||
@@ -18,7 +18,7 @@ CONF_LOCATIONS = [
|
||||
"""
|
||||
|
||||
CONF_LOCATIONS = [
|
||||
- '/etc/powa-collector.conf',
|
||||
+ '/usr/local/etc/powa-collector.conf',
|
||||
os.path.expanduser('~/.config/powa-collector.conf'),
|
||||
os.path.expanduser('~/.powa-collector.conf'),
|
||||
'./powa-collector.conf'
|
40
databases/py-powa-collector/files/powa-collector.in
Normal file
40
databases/py-powa-collector/files/powa-collector.in
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: powa-collector
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following lines to /etc/rc.conf to enable fluent-bit:
|
||||
#
|
||||
# powa_collector_enable (bool): Set to YES to enable fluent-bit
|
||||
# Default: NO
|
||||
# powa_collector_config (str): config files to use
|
||||
# Default: %%ETCDIR%%/fluent-bit.conf
|
||||
# powa_collector_flags (str): Extra flags passed to fluent-bit
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="powa_collector"
|
||||
rcvar=${name}_enable
|
||||
load_rc_config $name
|
||||
|
||||
: ${powa_collector_enable:="NO"}
|
||||
: ${powa_collector_user:="nobody"}
|
||||
: ${powa_collector_group:="nogroup"}
|
||||
|
||||
pidfile=/var/run/${name}.pid
|
||||
procname="%%PREFIX%%/bin/powa-collector.py"
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-H -p ${pidfile} -o /var/log/${name}/${name}.log ${procname}"
|
||||
|
||||
start_precmd=powa_collector_startprecmd
|
||||
|
||||
powa_collector_startprecmd()
|
||||
{
|
||||
install -o ${powa_collector_user} -g ${powa_collector_group} -d /var/log/${name}
|
||||
if [ ! -e ${pidfile} ]; then
|
||||
install -o ${powa_collector_user} -g ${powa_collector_group} /dev/null ${pidfile};
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
6
databases/py-powa-collector/pkg-descr
Normal file
6
databases/py-powa-collector/pkg-descr
Normal file
@ -0,0 +1,6 @@
|
||||
PoWA (PostgreSQL Workload Analyzer) is a performance tool for PostgreSQL
|
||||
allowing to collect, aggregate and purge statistics on multiple PostgreSQL
|
||||
instances from various Stats Extensions.
|
||||
|
||||
PoWA-collector is the daemon that gather performance metrics from remote
|
||||
PostgreSQL instances (optional) on a dedicated repository server.
|
Loading…
Reference in New Issue
Block a user